Entering edit mode
7.3 years ago
komal.rathi
★
4.1k
Hi everyone,
This is a sorted bam (by coordinates):
samtools view 7316-161-T_Aligned.out.sorted.bam | grep 'FCC78FRACXX:1:1101:6639:75204'
FCC78FRACXX:1:1101:6639:75204# 163 chr2 74156623 255 23M2445N77M = 74159237 8677 CGCCTATCAATCAGATTAAACTCCTGAACAAAGAAAATAAAGTGCTTAAAGGAGGTGTTGAGGTGGGCCTCCTCTTGCAGCTGCATCACAGAATCAAAGT bbbeeeeegggggiiiiihiiiihhiihiiiihiihiifhf]Yafaccfggfcgh^ceghhhi_ceghggggeeceedddcbccbccccc_bbcccc`c] NH:i:1 HI:i:1 AS:i:199 NM:i:0 MD:Z:100
FCC78FRACXX:1:1101:6639:75204# 83 chr2 74159237 255 18M5963N82M = 74156623 -8677 TTTTGGGAAATGGGACACCAATCTTAGAAGGAAAAAGAGTTTCATCATCAAGCTGATCTTGAACCCAAGTCATCAAATAGTCAATGTATTTTGGTGCAGA ^cccddddb`deeeedbbdggggagiiihiiihhiiiiihhhgchihhiihhhhhfiihihfciieiiiiihhiehihiiihiiiiigggggeeeeebbb NH:i:1 HI:i:1 AS:i:199 NM:i:0 MD:Z:100
I filtered out the reads mapped to a particular region like this:
head genes_10000Flanks.bed
chr2 74109441 74156992 ACTG2
samtools view -b -L genes_10000Flanks.bed 7316-161-T_Aligned.out.sorted.bam -o 7316-161-T_Aligned.out.filtered_new.bam
But when I look at the filtered bam file I only get one mate:
samtools view 7316-161-T_Aligned.out.filtered_new.bam | grep 'FCC78FRACXX:1:1101:6639:75204'
FCC78FRACXX:1:1101:6639:75204# 163 chr2 74156623 255 23M2445N77M = 74159237 8677 CGCCTATCAATCAGATTAAACTCCTGAACAAAGAAAATAAAGTGCTTAAAGGAGGTGTTGAGGTGGGCCTCCTCTTGCAGCTGCATCACAGAATCAAAGT bbbeeeeegggggiiiiihiiiihhiihiiiihiihiifhf]Yafaccfggfcgh^ceghhhi_ceghggggeeceedddcbccbccccc_bbcccc`c] NH:i:1 HI:i:1 AS:i:199 NM:i:0 MD:Z:100
Why is the other mate not getting filtered?
Thanks I just thought it would be simpler than this. I was hoping something like a partial match would work..