Entering edit mode
6.0 years ago
venuraherath
▴
20
Hi,
I am trying to update a variant calling script came from the predecessors. I am getting the error "bash: mpileup : No such file or directory"
Following are the contents of the old script;
samtools mpileup -uD -f <reference_genome.fna> <input.bam> > <output1.out> [mpileup] 1 samples in 1 input files <mpileup> Set max per-file depth to 8000^C
bcftools view <output1.out> > <output2.out>
samtools vcfutils.pl varFilter -d2 -D100 -a2 <output2.out> > output3.vcf
I did modify "samtools mpileup" to "bcftools mpileup" and "-uD to -u -t DP" to match new versions. The modified script is given below;
bcftools mpileup -u -t DP -f <reference_genome.fna> <input.bam> > <output1.out> [mpileup] 1 samples in 1 input files <mpileup> Set max per-file depth to 8000^C
bcftools view <output1.out> > <output2.out>
samtools vcfutils.pl varFilter -d2 -D100 -a2 <output2.out> > output3.vcf
When I run it , I get above error. I am using samtools 1.9 & bcftools 1.9
Can someone help me on this regard?
Thank you.
Umm, you know you aren't supposed to literally have those <> in your command line, right?
Are your referring to <> between output files? This is just the template. I used real file name and didnt include <>. except for
<mpileup> Set max per-file depth to 8000^C
You wrote this in your command line by yourself? That doesn't work. This have to be done with
-d 8000
as a parameter forbcftools mpileup
.fin swimmer
If I use the following will it do the trick? Thanks.
You should first start
bcftools mpileup
without any parameter to see the help page. You will see:-u
. You probably want to use-Ou
to output as uncompressed bcf?-t
is used for defining target regions . You probably want to use-a FORMAT/DP
to add this value into the output?-f
must be followed by the reference sequence.You are aware that
bcftools mpileup
itself doesn't call variants? For thisbcftools call
is neccessary. And this needs the uncompressed bcf output from mpileup as input.fin swimmer
Oh, got it. Thank you so much.
samtools mpileup
notbcftools mpileup
.-a FORMAT/DP
I will move
-d 8000
before-f
bcftools mpileup -Ou -a FORMAT/DP -d 8000 -f <reference_genome.fna> <input.bam> > <output1.out>
[mpileup] 1 samples in 1 input files'
When I try that I get following error;
Could you please show the real command you use (replacing your placeholder by filenames)?
fin swimmer
Remove this part:
[mpileup] 1 samples in 1 input files
And use just
bcftools mpileup -Ou -a FORMAT/DP -d 8000 -f GCF_000002315.5_GRCg6a_genomic.fna FCC717NANXX-wHAIPI020726-60.bam > FCC717NANXX-wHAIPI020726-60.out
Thank you so much! It is running now. Regarding
bcftools call
; I have received VCF files generated via original workflow (as given in the old script). Now I am confused. Do you think it is better to dump those VCF files and re do those samples as well, (esp since dif version of tools were used)?Omitting rest ,Is it ok to use
bcftools call -v -m -O z -o variantc.vcf.gz
followed by filtering variants usingrtg vcffilter
? Sorry for asking too many questions. Thank you.Hello venuraherath ,
you
bcftools call
looks fine to me. In general I recommend to normalize your indels after calling. You can chain all these command together:I've never used
rtg
. My favorite is bcftools filter or bcftools view.This depends on the aim of your investigation.
fin swimmer
Thanks again. You were very helpful. Earlier script is still running since its using only one thread though 24 threads are available. Do you deposit your script there at Github? If so please give me the link. So I can look at them and learn more.
Have a great day! Venura