You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used bedtools intersect for genomic files. As these were very large I had to go with the -sorted and the -g option.
The -g file I obtained in the following way:
For the two bedfiles I used the same chromsome ordering for sorting and intersected them in the following way:
bedtools intersect
-s
-wao
-a $bedfile1
-b $bedfile2
-sorted
-g $out_path/genome_chrom_ordering.txt
| sort -nr -k13,13
> $interesectBedfile
This seemed to work, however I noticed after a while that I could not find any intersections for the X and Y chromosome which was weird. It turned out that one of my bedfiles did not have a region for the MT chromosome (being in front of X for the chromosome ordering). This resulted in intersections after the MT chromosome to be missed. I then included dummy regions in the bedfile missing the MT chromosome (null regions) and now the intersection is working also for the X and Y chromosome. I do not think that this behavior is desired, so I report my observations here.
The text was updated successfully, but these errors were encountered:
I have used bedtools intersect for genomic files. As these were very large I had to go with the -sorted and the -g option.
The -g file I obtained in the following way:
cut -f1,2 /path/Homo_sapiens.GRCh38.dna.primary_assembly_110.fa.fai >
$out_path/genome_chrom_ordering.txt
For the two bedfiles I used the same chromsome ordering for sorting and intersected them in the following way:
bedtools intersect
-s
-wao
-a $bedfile1
-b $bedfile2
-sorted
-g $out_path/genome_chrom_ordering.txt
| sort -nr -k13,13
> $interesectBedfile
This seemed to work, however I noticed after a while that I could not find any intersections for the X and Y chromosome which was weird. It turned out that one of my bedfiles did not have a region for the MT chromosome (being in front of X for the chromosome ordering). This resulted in intersections after the MT chromosome to be missed. I then included dummy regions in the bedfile missing the MT chromosome (null regions) and now the intersection is working also for the X and Y chromosome. I do not think that this behavior is desired, so I report my observations here.
The text was updated successfully, but these errors were encountered: