This is a test version of Biostars. For the public version, visit https://www.biostars.org.
strange output when trying to get consensus from a sorted bam file

I used the following command:

samtools mpileup -uf ref.fa aln.bam | bcftools call -c | vcfutils.pl vcf2fq > cns.fq

to create the consensus of a sorted bam file.

strange letters appear ar the end of the output file cns.fq:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~z~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~x~uuuxx~~~~~~a~~~~~~~}~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~{xxxxuuuuror~~~~~~~~~~~~~~~~~~~~~~x~~~~~~~~~~~~~rK?

This spans to a huge number of lines. is this normal ? What does this mean ?

Note: this questions was asked by me in a comment in another post: C: get a consensus out of a Sorted bam file

bam consensus ngs samtools

What version of samtools and bcftools do you have?

both have version 1.3.1

if I try htsbox , I get a file that contains just the letter X , like the following:

gi|556550243|ref|NC_022648.1|

nnnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX etc

can anyone figure out the problem please ?

0 answers

No answers yet.

Log in to answer this question.