Question: Unable to find FASTA index entry for 'unitig_2993_pilon error.
0
gravatar for tmrhyd
16 months ago by
tmrhyd0
tmrhyd0 wrote:

Hey all,

I have a sorted and indexed .bam file, and I am running it through freebayes, with the script : "freebayes -f /path/to/reference.fasta Bamfile.bam > NewVCF_file.vcf" I have in the directory I am running this script from, and in the directory that the reference file is in the index files for the reference, the .fai and .dict files. Every time I run this script I get the "Unable to find FASTA index entry for 'unitig_2993_pilon error. " Even know I have the index files.

I have gone back and used Picard tools to remake the .dict file and used the samtools faidx command to make the .fai reference file.

Is there something I'm not doing? I have the correct Bam file and index files and it just continually throws the indexing error. What could be the problem here?

ADD COMMENTlink modified 16 months ago • written 16 months ago by tmrhyd0

Hello,

a dict file isn't needed for freebayes. What is the output of:

$ grep unitig_2993_pilon /path/to/reference.fasta

and

$ grep unitig_2993_pilon /path/to/reference.fasta.fai

fin swimmer

ADD REPLYlink written 16 months ago by finswimmer13k

Nothing happened for either? the command didn't run a error, but didn't return any input either.

ADD REPLYlink written 16 months ago by tmrhyd0
1

Hello again,

grep should print out lines that contain unitig_2993_pilon. If you're not getting any output, there are no such lines.

I would guess you're using a different reference for freebayes, than for the one used to generate the bam file. Let's check:

grep "^>" /path/to/reference.fasta

and

samtools view -H Bamfile.bam

Please use the formatting bar (especially the code option) to present the output.

code_formatting

ADD REPLYlink written 16 months ago by finswimmer13k

The reference fasta that I used to generate the bam file is the same one I am trying to read with freebayes now. And I ran grep "^>" /path/to/reference.fasta on the fasta file, and got no output from it.

I ran samtools view -H Bamfile.bam and got the following output

@HD VN:1.6  SO:coordinate
@SQ SN:unitig_2993_pilon    LN:2917948
@SQ SN:unitig_1070_pilon    LN:2422025
@SQ SN:unitig_3212_pilon    LN:2333870
@SQ SN:unitig_2610_pilon    LN:2172154
@SQ SN:unitig_1181_pilon    LN:2129517
@SQ SN:unitig_106_pilon LN:1838231
@SQ SN:unitig_1277_pilon    LN:1743889
@SQ SN:unitig_1021_pilon    LN:1663658
@SQ SN:unitig_3042_pilon    LN:1649263
@SQ SN:unitig_3279_pilon    LN:1527568
@SQ SN:unitig_2120_pilon    LN:1509310
@SQ SN:unitig_115_pilon LN:1444814
@SQ SN:unitig_379_pilon LN:1425260
@SQ SN:unitig_1029_pilon    LN:1373247
@SQ SN:unitig_252_pilon LN:1370713
@SQ SN:unitig_3261_pilon    LN:1337604
@SQ SN:unitig_1037_pilon    LN:1313761
@SQ SN:unitig_1269_pilon    LN:1299244
@SQ SN:unitig_1238_pilon    LN:1281759
@SQ SN:unitig_160_pilon LN:1281741
@SQ SN:unitig_301_pilon LN:1278989
@SQ SN:unitig_1087_pilon    LN:1271292
@SQ SN:unitig_210_pilon LN:1246260
@SQ SN:unitig_2504_pilon    LN:1246197
@SQ SN:unitig_172_pilon LN:1235266
@SQ SN:unitig_10_pilon  LN:1173389
@SQ SN:unitig_238_pilon LN:1162262
@SQ SN:unitig_497_pilon LN:1159025
@SQ SN:NODE_3240_length_10782_cov_174.486_ID_44076566_pilon LN:10785
@SQ SN:NODE_3312_length_10157_cov_4.82738_ID_39130478_pilon LN:10157
@SQ SN:NODE_3460_length_9131_cov_1843.18_ID_44734617_pilon  LN:9149
@RG ID:rgID LB:lib1 PL:ILLUMINA SM: PU:unit1    
@PG ID:bwa  PN:bwa  CL:bwa mem -M -t 8 -R @RG\tID:rgID\tLB:lib1\tPL:ILLUMINA\tSM:Sequence\tPU:unit1\tPI:252 /path/to/ref.fasta /path/to/trimmed.fastq /path/to/trimmed.fastq
@PG ID:SAMBLASTER   CL:samblaster -i stdin -o stdout
ADD REPLYlink modified 16 months ago • written 16 months ago by tmrhyd0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1400 users visited in the last hour