**90**wrote:

I have been generating consensus sequences from a Bowtie2-aligned BAM file using the following script:

samtools mpileup -d 100000 -Q 0 -q 0 -f Reference.fasta input.bam

in the pileup file, the consensus sequence has a gap where I can clearly see reads that map to the reference,

in the pileup file,there is a gap between 42449 and 42469

Supercontig_1.1 42441 T 10 ,$..,,...,, EIDIH@G6DI Supercontig_1.1 42442 A 9 .$.,,...,, DEIHBI6AI Supercontig_1.1 42443 C 8 .,,...,,$ EIH>I5GE Supercontig_1.1 42444 A 7 .$,$,..., EEH@EAG Supercontig_1.1 42445 T 5 ,$..., EADEH Supercontig_1.1 42446 G 4 ..., AEEH Supercontig_1.1 42447 G 4 .$.$., BBAH Supercontig_1.1 42448 C 2 ., <G Supercontig_1.1 42449 T 2 .$,$ 8E Supercontig_1.1 42469 C 2 ^",^", EA Supercontig_1.1 42470 T 3 ,,^". >?E Supercontig_1.1 42471 G 4 ,,.^", FBFB Supercontig_1.1 42472 G 5 ,,.,^". E=FAE

in the sam file,there exists alignments：（part of them):

N57638:1:64U4YAAXX:1:5:19405:8167 355 Supercontig_1.1 42376 2 76M = 42580 280 CACTGGACGAAGGATACGCGTCACTGACAGTACCTTGCCACCGAAGAATTGAGTTCACGGACGACTACATGGCTGA IIIIIIHIIHHHIIDIIHHFIIDIIIIBIIFIDIHEHIIIHIIHFFHHGHIFBDGEFEIE@CEBEFHDGEDGBEFH AS:i:-10 XS:i:-10 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:49C25C0 YS:i:-30 YT:Z:CP N57638:1:64U4YAAXX:4:16:18415:14633 355 Supercontig_1.1 42376 6 76M = 42672 372 CACTGGACGAAGGAAACGCGTCACTGACAGTACCTTGCCACCGAAGAATCGAGTTCACGGACGACTACATGGCTGA IIIFIIIIGIEIIIIHIDIIIIDIIIHDHIFHIHIBIHIIIEIDIHHHHEIGHGIGDED<BEC8>ECEBB,@A?@D AS:i:-11 XS:i:-11 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:14T60C0 YS:i:-16 YT:Z:CP N57638:1:64U4YAAXX:2:19:4746:19217 16 Supercontig_1.1 42377 1 60M * 0 0 ACTGGACGAAGGATACGCGTCACTGACAGTACCTTGCCACCGAAGAATTGAGTTCACGGA A-C;C98;52B;2?67/.72:-4;7<:4429@=?@>1=9=;=?=@77844=<=BB??B?B AS:i:-3 XS:i:-3 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:48C11 YT:Z:UU N57638:1:64U4YAAXX:3:78:11945:7264 339 Supercontig_1.1 42378 12 76M = 42087 -367 CTGGACGAAGGAAACGCGTCACTGACAGTACCTTGCCACCGAAGAATCGAGTTCACGGACGACTACATGGCTGACA 5;7?7<E>>@BCC>EEB@<B<<BDABBGFAECAAAAFB@FGHHGHHFGGEGGBG@GGGGGG@HHHHHHHHHHHHDH AS:i:-15 XS:i:-15 XN:i:0 XM:i:3 XO:i:0 XG:i:0 NM:i:3 MD:Z:12T60C0A1 YS:i:0 YT:Z:CP N57638:1:64U4YAAXX:3:46:17100:16602 419 Supercontig_1.1 42379 7 76M = 42666 342 TGGACGAAGGATACGCGTCACTGACAGTACCTTGCCACCGAAGAATTGAGTTCACGGACGACTACATGGCTGACAA IIIGHIHIIIIIIIIIEGIIIIIHGI=IIIBIIIIBIIIIGIGIFIIHDDEFGIIIIFIIHGFIIIGDDHE@DEHH AS:i:-16 XS:i:-16 XN:i:0 XM:i:3 XO:i:0 XG:i:0 NM:i:3 MD:Z:46C25C0A2 YS:i:-12 YT:Z:CP N57638:1:64U4YAAXX:3:82:4520:20210 355 Supercontig_1.1 42379 0 76M = 42599 296 TGGACGANGGAAACGCGTCACTGACAGTACCTTGCCACCNAAGAATCGAGTTCACGGACGACTACATGGCTGACAA IIHIIFC#ECCEEEEHIIIIIHIFIIIEIIIIIIIDDDD#>>???@EEEE@@DBEFBEDB@ADEADDDAAABB@B5 AS:i:-17 XS:i:-17 XN:i:0 XM:i:5 XO:i:0 XG:i:0 NM:i:5 MD:Z:7A3T27G32C0A2 YS:i:-33 YT:Z:CP N57638:1:64U4YAAXX:4:101:2199:9982 355 Supercontig_1.1 42379 7 76M = 42571 268 TGGACGAAGGATACGCGTCACTGACAGTACCTTGCCACCGAAGAATTGAGTTCACGGACGACTACATGGCTGACAA IIIIIIIIIIIIIIHIIIIIIIIHIIIIGIIIIIIIIIIIHIIIIIIIDIGIIIIHIIIIHHIIHHHHGIIEIGHB AS:i:-17 XS:i:-17 XN:i:0 XM:i:3 XO:i:0 XG:i:0 NM:i:3 MD:Z:46C25C0A2 YS:i:-22 YT:Z:CP

Does anyone know why this happened,thanks!

**20**• written 5.4 years ago by wangyang703092 •

**90**