[Bioperl-l] fasta format

Jason Stajich jason at bioperl.org
Tue Dec 8 12:44:43 EST 2009


you can run
sreformat (HMMER) or bp_sreformat.pl script in scripts/utilties (or  
that is installed when you install the Bioperl scripts)
$ bp_sreformat.pl -if fasta -of fasta -i yourfile.fa -o yournewfile.fa
# rename it back
$ mv yournewfile.fa yourfile.fa

or
$ sreformat fasta yourfile.fa > yournewfile.fa
$ mv yournewfile.fa yourfile.fa


-jason
On Dec 8, 2009, at 7:21 AM, Jonas Schaer wrote:

> Hi there,
> I have a little question concerning bioperl. I have  
> BioPerl-1.6.1.tar.gz installed and i use the fasta.pm module to read  
> in some fasta files. first it worked fine, but now i have some  
> fastafiles in slightly different format (not all lines have the same  
> length!).
>
> ------------- EXCEPTION -------------
> MSG: Each line of the fasta entry must be the same length except the  
> last.
>    Line above #49 '
> ..' is 28 != 101 chars.
> STACK Bio::DB::Fasta::calculate_offsets C:/Perl/site/lib/Bio/DB/ 
> Fasta.pm:771
> STACK Bio::DB::Fasta::index_file C:/Perl/site/lib/Bio/DB/Fasta.pm:681
> STACK Bio::DB::Fasta::new C:/Perl/site/lib/Bio/DB/Fasta.pm:491
> STACK Bio::DB::Fasta::newFh C:/Perl/site/lib/Bio/DB/Fasta.pm:513
> STACK main::readfasta blast_eval.pm:174
> STACK toplevel blast_eval.pm:83
> -------------------------------------
>
> indexing was interrupted, so unlinking test.fasta.index at C:/Perl/ 
> site/lib/Bio/
> DB/Fasta.pm line 1054.
>
>
> Is there any way to use these fasta files with diffrent length of  
> lines with this fasta.pm module or will i have to change the format  
> of my fasta-files(big databases...) ?
>
> Thanks in advance for any help!
>
> Regards, Jonas
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

--
Jason Stajich
jason.stajich at gmail.com
jason at bioperl.org



More information about the Bioperl-l mailing list