Entering edit mode
3.7 years ago
evelyn
▴
230
Hello,
I am using freebayes
to make a vcf
from a list of .bam
files (duplicates removed):
RUN=${SLURM_ARRAY_TASK_ID}
LIST_OF_BAMS=/path/list_of_bam.txt
freebayes \
-f /path/genome.fasta \
-L ${LIST_OF_BAMS} \
-E 1 \
-T 0.01 \
-p 2 \
-F 0.2 \
-C 2 \
--min-coverage 3 \
-m 1 \
--min-base-quality 20 \
--report-genotype-likelihood-max \
-vcf all_SNPs_pt${SLURM_ARRAY_TASK_ID}.vcf
But it gives error:
[E::hts_open_format] Failed to open file
ERROR(freebayes): Could not open input BAM file
I have checked the bam files are there in the mentioned path. Thank you for any help to solve this error.
Just in case, ensure you have read permissions on the BAM files.
Which version of freebayes are you using?
I am using freebayes/1.3.2 and I created the bam files in a different directory. Do I need to have access permission for using files that I created?
You need to be able to read the files. If you created the files, you should ideally have all necessary permissions but there's no harm in double checking. Also, make sure all the files listed in the
/path/list_of_bam.txt
are indeed BAM files.Yes, they indeed are BAM files but it still does not work.
Does it work with one BAM file (just hard code path) ? Can the SLURM worker node actually see the file ?
Hi, I used this command line for one bam file out of the list I have:
And it started creating the vcf file.
Well, you've narrowed it down greatly to the variables (in my opinion). Not sure about the solution. I'm a SLURM user and cluster admin myself, but using variables is sometimes a little tough/weird. Maybe it's possible to hack the list of BAMs in there as a comma separated list(string). Alternatively you might look at solutions for this in Nextflow or snakemake ....