Question: samtools mpileup `error uninitialized value $l in numeric lt` during BAM to FASTA conversion
gravatar for marongiu.luigi
2.3 years ago by
Germany, Mannheim, UMM
marongiu.luigi520 wrote:

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 - | 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/ line 566.
Use of uninitialized value $l in numeric lt (<) at /usr/bin/ 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

bam mpileup samtolls fasta • 1.2k views
ADD COMMENTlink written 2.3 years ago by marongiu.luigi520

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,

ADD REPLYlink written 2.3 years ago by swbarnes28.9k

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.

ADD REPLYlink written 2.3 years ago by aays140
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1107 users visited in the last hour