Question: Fastafrombed Problem
0
gravatar for Sara
9.3 years ago by
Sara130
Sara130 wrote:

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 conversion fasta • 5.6k views
ADD COMMENTlink modified 9.3 years ago by Pierre Lindenbaum131k • written 9.3 years ago by Sara130
1

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

ADD REPLYlink written 9.3 years ago by Aaronquinlan11k

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

ADD REPLYlink written 9.3 years ago by Sara130

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 REPLYlink written 9.2 years ago by Aaronquinlan11k
6
gravatar for Pierre Lindenbaum
9.3 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum131k wrote:

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 COMMENTlink written 9.3 years ago by Pierre Lindenbaum131k
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: 1332 users visited in the last hour