Hi,
I am using samtools view -f option to output mate-pair reads that are properly placed in pair in the bam file.
My command is as follows: (67,131- first read, second read and 115,179 first , second mapped to reverse complement)
samtools view -b -f 67 -f 131 -f 179 -f 115 old.bam > new.bam
But in the new.bam file all i get are the reads with -f 115 flag. I assume that you can't use more than one flag for the view command and that's why the last flag overrules the other flag.
I can write four samtools view commands , each for one of the flag and merge the bam files but is there any proper or one step way to accomplish the same.
Also, is merging the right thing to do ?
Thanks.
I am using samtools view -f option to output mate-pair reads that are properly placed in pair in the bam file.
My command is as follows: (67,131- first read, second read and 115,179 first , second mapped to reverse complement)
samtools view -b -f 67 -f 131 -f 179 -f 115 old.bam > new.bam
But in the new.bam file all i get are the reads with -f 115 flag. I assume that you can't use more than one flag for the view command and that's why the last flag overrules the other flag.
I can write four samtools view commands , each for one of the flag and merge the bam files but is there any proper or one step way to accomplish the same.
Also, is merging the right thing to do ?
Thanks.
Comment