exonerate error while building index
1
1
Entering edit mode
8.1 years ago
ahaswer ▴ 150

Hello, I want to use exonerate-server. Therefore I've created database file using fasta2esd and then I've tried to build the index using esd2esi, but I didn't work for me. It prints error while running esd2esi:

esd2esi Chr1.esd Chr1.esi

** Message: Building index

* FATAL ERROR *: Unknown or irregular fasta line length

exiting ...

While I'm pretty sure that fasta file is fine. Do you know how to solve this issue?

software error exonerate • 1.9k views
ADD COMMENT
0
Entering edit mode

I also run into this problem, don't know if you've figured it our?

ADD REPLY
0
Entering edit mode
6.0 years ago
dukecomeback ▴ 40

I think I've figure this out. It because that the sequences in the fasta file are output in one line. Some are too long for the exonerate. Here is a perl script to re-type the fasta so each sequence would be output in multiple lines

#!/usr/bin/perl -w
use strict;
use Getopt::Long;
my ($chr,$help);
my $width="0";
my $infile="";
my $outfile="";

GetOptions(
                "help|h"     => \&USAGE,
                "infile:s"   => \$infile,
                "outfile:s"  => \$outfile,
                "width=i"    => \$width,
);

die "please give me a number between 10 and 200\n" unless 10<= $width and $width <=200;
open IN,"<$infile"||die;
open OUT,">$outfile";


$/=">";<IN>;$/="\n";
while(<IN>){
    my $chr=$1 if /^(\S+)/;
    $/=">";
    chomp(my $seq=<IN>);
    $/="\n";
    $seq=~s/\n+//g;
    print OUT ">$chr\n";
    my $start=0;
    my $len=length($seq);
    while($start+$width<$len){
    $b=substr($seq,$start,$width);
    print OUT "$b\n";
    $start=$start+$width;}
    while($start+$width>=$len){
    $b=substr($seq,$start,$width);
    print OUT "$b\n";
    last;}
}
sub USAGE{
                my $usage=<<"USAGE";

------------------------------------------------------------------------------------
       Program: thir_test.pl
       Date:2017-05-19
       Usage:
                 -infile    <fasta format> infile
                 -outfile   <fasta format> outfile
                 -width     <int>  seq length
                 -h          help


       Example1: perl thir_test.pl -infile data.fa -outfile out.fa -width 10
       Example2: perl thir_test.pl -h
------------------------------------------------------------------------------------
USAGE
        print $usage;
        exit;
}

the script is from: https://blog.csdn.net/niuhuihui_fei/article/details/72636679

ADD COMMENT

Login before adding your answer.

Traffic: 2468 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