This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools mpileup `error uninitialized value $l in numeric lt` during BAM to FASTA conversion

Dear all,

I am trying to convert a BAM file containing aligned reads into a consensus fasta in order to see directly the alignment on a long range sequence aligner.

I used:

samtools view -h -F 4 <align.bam> > <map.bam>
samtools sort <map.bam> -o <mapsrt.bam>
samtools mpileup -d8000 -uf <ref.fa> <mapsrt.bam>| bcftools view -cg - | vcfutils.pl vcf2fq > <file.fa>

but I got:

[mpileup] 1 samples in 1 input files
Error: Could not parse --min-ac g
Use of uninitialized value $l in numeric lt (<) at /usr/bin/vcfutils.pl line 566.
Use of uninitialized value $l in numeric lt (<) at /usr/bin/vcfutils.pl line 566.

What might have happened? Are there other simple tools to create a consensus fasta? There are many options on internet, but only this one worked for me before...

Thank you

samtolls mpileup bam fasta

Shouldn't step one be to split out the piped parts into separate lines, so you at least know which command is at fault? Putting versions helps too...lots of people still using really old versions of samtools,

I'm not too sure what happened here, but seems other people have had similar problems. This thread might be worth going through - lists a couple potential issues that may be causing this. Someone also found a solution here.

0 answers

No answers yet.

Log in to answer this question.