Fastafrombed Problem
1
0
Entering edit mode
13.1 years ago
Sara ▴ 130

hi,

I try this tools from BedTools but it doesnt work!

$ cat testgenome404.fa

>chr1
AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG

$ cat test.bed
chr1    5       10

$ ./fastaFromBed -fi testgenome404.fa -bed test.bed  -fo test.fa.out

**index file testgenome404.fa.fai not found, generating...

unable to find FASTA index entry for 'chr1'**

$ cat testgenome404.fa.fai
chr1    46      7       46      47

what is this file "testgenome404.fa.fai" what does means this number? chr1 46 7 46 47

why this message?

unable to find FASTA index entry for 'chr1'

Thanks in advance for any help Sara

bedtools bed fasta conversion • 7.5k views
ADD COMMENT
1
Entering edit mode

Is it possible that you have an extra space after 'chr1' in your fasta file?

ADD REPLY
0
Entering edit mode

no it is not possible i check it but there is still the same problem

ADD REPLY
0
Entering edit mode

Please try the verion in the latest release (2.13). If you were using a version from the dev. repository, this may fix your issue.

ADD REPLY
6
Entering edit mode
13.1 years ago

The fai is an index for the sequences contained in a fasta file.This kind of index helps the programs to quickly retrieve a (sub)sequences for a given region.

It seems that your tool automatically generated it as it didn't exist.

Each line in this file contains:

  • the name of the sequence
  • the length of the sequence
  • the offset of the first base in the file
  • the number of bases in each fasta line
  • the number of bytes in each fasta line

so, if you want to get the base at index "beg" for the sequence defined in "val", the program will seek the following offset (code from samtool):

val.offset + beg / val.line_blen * val.line_len + beg % val.line_blen

Note: A faidx can be generated with samtools faidx

ADD COMMENT

Login before adding your answer.

Traffic: 1807 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6