This is a test version of Biostars. For the public version, visit https://www.biostars.org.
freebayes SNP calling question

Hello,

I am using freebayes for making vcf files using:

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 this error:

unable to find FASTA index entry for 'TA_12g0050'

TA is reference genome file and I have already indexed it. Thank you for any help.

snp

It seems like you'e missing the sequence TA_12g0050 in your fasta. Freebayes will index the file for you if it doesn't already exist. Are you using a full genome assembly or a set of gene models as the reference? You should compare the ID list from the fasta file and reference IDs from the bam to make sure that all sequences are present.

genome.fasta should be the same reference that was used for mapping.

Thank you, how can I make an index file of the genome before starting freebayes

1 answer

Do you have a .fai file in the directory as your reference?

Yes, I have created using samtools faidx. but I think it is not created properly. Is there other way to create it.

Log in to answer this question.