I tried the command samtools mpileup -uf hg18.fa -g my.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq But it still failed. Can you list your command?
Hello, I am running the command like:
samtools mpileup -uf hg18.fa my.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq
However I got many many warnings on the screen which are like
Argument "chr1^I22217285^I.^IT^I.^I28.2^I.^IDP=1;;CI95=1.5,0;FQ=-3..." isn't numeric in numeric lt (<) at /mypath/samtools/bcftools/vcfutils.pl line 503, <> line 21409998.
Argument "chr1^I22250317^I.^IT^I.^I28.2^I.^IDP=9;;CI95=1.5,0;FQ=-3..." isn't numeric in numeric lt (<) at /Mypath/samtools/bcftools/vcfutils.pl line 503, <> line 21443057.
What is wrong and how to avoid it? My reference fa file likes
>chr10
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Thanks.
2 answers
Come on. You have to try a little. If you are having trouble with a command that pipes a whole bunch of commands together, you have to split them apart, to figure out which command is the problem. Given that the problem looks like mpileup is balking at your .bam file, you really ought to convert some of it to .sam, and put up the first few offending lines of the .sam.
(not tested) samtools mpileup is missing the option -g ("generate BCF output ") ?
Log in to answer this question.
It works on a BAM file for me - how did you make your BAM file. ^I is often a tab - or "t" in perl.