Hi, everyone
BAM files contain the informations like
"AS:i:-8 XM:i:0 XO:i:0 XG:i:0 MD:Z:100 NM:i:0 XS:A:+ NH:i:1".
NM means not matched bp numbers.
Now I wanted to pick the reads that are totally mapped to the ref sequence.
I have tried to use Picard SamToFastq and tophat/bowtie2 -N 0 to get the final BAM, but samtools view -f 8 cannot correctly pick the single mapped reads, so SamToFastq didin't work well.
So is there an easy way to filter SAM/BAM files with NM>0 .
Thanks.
BAM files contain the informations like
"AS:i:-8 XM:i:0 XO:i:0 XG:i:0 MD:Z:100 NM:i:0 XS:A:+ NH:i:1".
NM means not matched bp numbers.
Now I wanted to pick the reads that are totally mapped to the ref sequence.
I have tried to use Picard SamToFastq and tophat/bowtie2 -N 0 to get the final BAM, but samtools view -f 8 cannot correctly pick the single mapped reads, so SamToFastq didin't work well.
So is there an easy way to filter SAM/BAM files with NM>0 .
Thanks.
Comment