A file path to be opened for reading or writing. The usual Perl
You may provide new() with a previously-opened filehandle. For
example, to read from STDIN:
Note that you must pass filehandles as references to globs.
If neither a filehandle nor a filename is specified, then the module will read from the @ARGV array or STDIN, using the familiar <> semantics.
Specify the format of the file. Supported formats include:
If no format is specified and a filename is given, then the module will attempt to deduce it from the filename. If this is unsuccessful, Fasta format is assumed.
The format name is case insensitive. FLAT, Flat and flat are all supported.
$fh = Bio::Variation::IO->newFh(-fh => \*FILEHANDLE, -format=>$format); $fh = Bio::Variation::IO->newFh(-format => $format); # etc. #e.g. $out = Bio::Variation::IO->newFh( -FORMAT => flat); print $out $seqDiff;
This constructor behaves like new(), but returns a tied filehandle rather than a Bio::Variation::IO object. You can read sequences from this object using the familiar <> operator, and write to it using print(). The usual array and $_ semantics work. For example, you can read all sequence objects into an array like this:
@mutations = <$fh>;
Other operations, such as read(), sysread(), write(), close(), and printf() are not supported.
See below for more detailed summaries. The main methods are:
CW$sequence = CW$seqIO->next()Fetch the next sequence from the stream.
CW$seqIO->write($sequence [,$another_sequence,...])Write the specified sequence(s) to the stream.
TIEHANDLE(), READLINE(), PRINT()These provide the tie interface. See perltie for more details.
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing lists Your participation is much appreciated.
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : format Usage : $format = $stream->format() Function: Get the variation format Returns : variation format Args : none
Title : next Usage : $seqDiff = $stream->next Function: reads the next $seqDiff object from the stream Returns : a Bio::Variation::SeqDiff object Args :
Title : write Usage : $stream->write($seq) Function: writes the $seq object into the stream Returns : 1 for success and 0 for error Args : Bio::Variation::SeqDiff object
Title : _guess_format Usage : $obj->_guess_format($filename) Function: Example : Returns : guessed format of filename (lower case) Args :
|perl v5.20.3||BIO::VARIATION::IO (3)||2016-04-05|