Question: Mpileup Command Line
0
gravatar for Giffredo
6.1 years ago by
Giffredo10
Paris
Giffredo10 wrote:

Hello,

I have a problem to use mpileup. I used this command:

samtools mpileup -f mi.fas sorted.bam > X.bcf &
bcftools view X.bcf > X.vcf &

it doesn't work "incorrect number of fields (0 != 5) at 0:0". I d like to optain vcf output from bam without using -u and -g in order to reach the result described in the manual http://samtools.sourceforge.net/samtools.shtml

If I try

samtools mpileup -f mi.fas sorted.bam > 2eccolo.bcf | bcftools view > 2eccolo.vcf&

It works but the results is an empty table...

P.S. using only the line below, it did not give me an output; I see only the results print on screen...

samtools mpileup -f mi.fas sorted.bam&
mpileup • 3.3k views
ADD COMMENTlink modified 6.1 years ago by Devon Ryan94k • written 6.1 years ago by Giffredo10
1
gravatar for Devon Ryan
6.1 years ago by
Devon Ryan94k
Freiburg, Germany
Devon Ryan94k wrote:

The command you're looking for is tee

samtools mpileup -f mi.fas sorted.bam  | tee X.bcf | bcftools view - > 2eccolo.vcf

or something like that.

Edit: I just realized that you're not outputting BCF in the first place, just mpileup, which is text! That won't ever work. You'll need to use the -g or -v or similar.

ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by Devon Ryan94k

Unfortunately it doesn t work.. it gives me the same error incorrect number of fields (0 != 5) at 0:0 Anyway tee is a good idea! thanks!

ADD REPLYlink modified 6.1 years ago • written 6.1 years ago by Giffredo10
1

Oh, I just noticed that you didn't use -g or -u or similar and updated my answer, since that won't work.

ADD REPLYlink written 6.1 years ago by Devon Ryan94k
Please log in to add an answer.

Help
Access

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