Thanks a lot, Pgibas and Devon, I need a bit further guidance. Regarding to the bedtools method, I follow the below steps, unfortunately got an error : Error: unable to open file or unable to determine types for file f1.bed
Step1 - Prepare site file and gff3 file, both of which should be in the same format.
Site file: f1.bed
Chr1 3000 3100 +
Chr1 3200 3280 +
GFF3 file: f2.bed
Chr1 ID=LOC_Os01g01010;Name=LOC_Os01g01010 2903 10817 +
Chr1 ID=LOC_Os01g01010.1;Name=LOC_Os01g01010.1 2903 10817 +
Chr1 ID=LOC_Os01g01010.1:exon_1 2903 3268 +
Chr1 ID=LOC_Os01g01010.1:intron_1 3269 3300 +
Step2 -- Use bedtools intersect to find their overlapped region.
I use this command: bedtools intersect -a f1.bed -b f2.bed
Does your site file contain any chromosome information?
Hi Pgibas, yes, I forget to add it.
A bit of coding with R and the GenomicRanges packages should make this doable.