samtools mpileup `error uninitialized value $l in numeric lt` during BAM to FASTA conversion
0
0
Entering edit mode
6.4 years ago

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 • 3.1k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 2602 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6