Bio::Tools::GuessSeqFormat

A module for determining the sequence format of the contents of a file, a string, or through a filehandle
Download

Bio::Tools::GuessSeqFormat Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Christopher Fields
  • Publisher web site:
  • http://search.cpan.org/~cjfields/

Bio::Tools::GuessSeqFormat Tags


Bio::Tools::GuessSeqFormat Description

A module for determining the sequence format of the contents of a file, a string, or through a filehandle Bio::Tools::GuessSeqFormat is a Perl module for determining the sequence format of the contents of a file, a string, or through a filehandle.SYNOPSIS # To guess the format of a flat file, given a filename: my $guesser = Bio::Tools::GuessSeqFormat->new( -file => $filename ); my $format = $guesser->guess; # To guess the format from an already open filehandle: my $guesser = Bio::Tools::GuessSeqFormat->new( -fh => $filehandle ); my $format = $guesser->guess; # If the filehandle is seekable (STDIN isn't), it will be # returned to its original position. # To guess the format of one or several lines of text (with # embedded newlines): my $guesser = Bio::Tools::GuessSeqFormat->new( -text => $linesoftext ); my $format = $guesser->guess; # To create a Bio::Tools::GuessSeqFormat object and set the # filename, filehandle, or line to parse afterwards: my $guesser = Bio::Tools::GuessSeqFormat->new(); $guesser->file($filename); $guesser->fh($filehandle); $guesser->text($linesoftext); # To guess in one go, given e.g. a filename: my $format = Bio::Tools::GuessSeqFormat->new( -file => $filename )->guess;Bio::Tools::GuessSeqFormat tries to guess the format ("swiss", "pir", "fasta" etc.) of the sequence or MSA in a file, in a scalar, or through a filehandle.The guess() method of a Bio::Tools::GuessSeqFormat object will examine the data, line by line, until it finds a line to which only one format can be assigned. If no conclusive guess can be made, undef is returned.If the Bio::Tools::GuessSeqFormat object is given a filehandle which is seekable, it will be restored to its original position on return from the guess() method. Requirements: · Perl


Bio::Tools::GuessSeqFormat Related Software