This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Does Bedtools Intersect -V Consider Unmapped Reads "As Not In B"
bedtools intersect -v -abam my.bam -b myregions.gff > notinmyregions.bam

would we see reads with 4 in the FLAG field - i.e. unmapped reads in notinmyregions.bam

bedtools

1 answer

I dont think so, you could always pipe in unmapped reads only to bedtools and see if there are any results:

samtools view -f 0x04 –b my.bam | intersectBed –abam stdin -b myregions.gff > notinmyregions.bam

Log in to answer this question.