Hello,
I want to generate one vcf file out of many bam files. I used this command:
RUN=${SLURM_ARRAY_TASK_ID}
LIST_OF_BAMS=/path/list_of_bam.txt
freebayes -f /path/genome.fasta -L ${LIST_OF_BAMS} > /path/all_SNPs_pt${SLURM_ARRAY_TASK_ID}.vcf
But it gives several vcf files as per RUN
and gives unknown
in place of sample name
in the header.
I also want to include parameters:
--max-complex-gap 1 \
--theta 0.01 \
--ploidy 2 \
--min-alternate-fraction 0.2 \
--min-alternate-count 2 \
--min-coverage 3 \
--min-mapping-quality 1 \
--min-base-quality 20 \
--report-genotype-likelihood-max \
--no-complex \
--no-mnps \
--no-indels \
But these seems to be outdated as it gives error if I include these parameters in the command line. Thank you!
You're running into a lot of problems combining SLURM variables and freebayes. Can you try not mixing them?
As a first step, instead of running the freebayes command,
echo
it:If the above
echo
s the commands fine, then try remove the echos, add aset -x
after your SLURM header lines and look at the exact freebayes commands being run - that should show you if where things fail.It says:
Did the echo work fine? Is this what you got after removing the
echo
? Did you useset -x
?Yes, echo worked fine and I got it after removing the echo.
Looks like version of
freebayes
you are using does not have--no-complex
option. Runfreebayes -h
and take a look at possible options.--no-complex
is not a valid parameter. Are you looking for--throw-away-complex-obs
? Similarly,--no-mnps
and--no-indels
are not valid. The closest I see are--throw-away-mnp-obs
and--throw-away-indels-obs
.I found these by looking at
freebayes -h
(well, actually, I read through the CPP source code that prints that usage) - you could have read the manual yourself and learned this on your own.