Hey, I have a sorted and indexed .bam file, and I am running it through freebayes, with the script :
freebayes -f ref.fa -@ in.vcf.gz aln.bam >var.vcf
Before change headers in fasta from chr1, chr2 .. to 1, 2, 3 ... , I had error:
unable to find FASTA index entry for '1'
Now, after change I have:
unable to find FASTA index entry for 'chr1'
Could you give me some advice?
please, mark the previous answers as answered. Green tick on the left. A: File not suitable for fasta index generation. C: Unable to find FASTA index entry for '1'
what is the output of
cut -f 1 ref.fa.fai ?
Something like that: chr1 chr10 chr11 chr11_KI270721v1_random chr12 chr13 chr14 chr14_GL000009v2_random chr14_GL000225v1_random chr14_KI270722v1_random
and so on.
Numbers from 1 to 64185939 - in second case
and what is the output of
gunzip -c in.vcf.gz | grep -v '# ' | cut -f 1 | uniq
as well as the output of
samtools view -H aln.bam | grep '^@SQ' |cut -f 2
output are metadata from vcf and column #CHROM, that is: chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr20 chr21 chr22 chrX chrY chr1_KI270706v1_random chr4_GL000008v2_random chr7_KI270803v1_alt chr15_KI270850v1_alt
output:
SN:1 SN:2 SN:3 SN:4 SN:5 SN:6 SN:7 SN:8 SN:9 SN:10 SN:11 SN:12 SN:13 SN:14 SN:15 SN:16 SN:17 SN:18 SN:19 SN:20 SN:21 SN:22 SN:X SN:Y SN:MT SN:GL000207.1 SN:GL000226.1 SN:GL000229.1 SN:GL000231.1 SN:GL000210.1 SN:GL000239.1 SN:GL000235.1 SN:GL000201.1 SN:GL000247.1 SN:GL000245.1 SN:GL000197.1 SN:GL000203.1 SN:GL000246.1 SN:GL000249.1 SN:GL000196.1 SN:GL000248.1 SN:GL000244.1 SN:GL000238.1 SN:GL000202.1 SN:GL000234.1 SN:GL000232.1 SN:GL000206.1 SN:GL000240.1 SN:GL000236.1 SN:GL000241.1 SN:GL000243.1 SN:GL000242.1 SN:GL000230.1 SN:GL000237.1 SN:GL000233.1 SN:GL000204.1 SN:GL000198.1 SN:GL000208.1 SN:GL000191.1 SN:GL000227.1 SN:GL000228.1 SN:GL000214.1 SN:GL000221.1 SN:GL000209.1 SN:GL000218.1 SN:GL000220.1 SN:GL000213.1 SN:GL000211.1 SN:GL000199.1 SN:GL000217.1 SN:GL000216.1 SN:GL000215.1 SN:GL000205.1 SN:GL000219.1 SN:GL000224.1 SN:GL000223.1 SN:GL000195.1 SN:GL000212.1 SN:GL000222.1 SN:GL000200.1 SN:GL000193.1 SN:GL000194.1 SN:GL000225.1 SN:GL000192.1