NAME¶
Bio::Assembly::IO - Handler for Assembly::IO Formats
SYNOPSIS¶
use Bio::Assembly::IO;
$in = Bio::Assembly::IO->new(-file=>"<inputfilename",
-format=>'phrap');
$out = Bio::Assembly::IO->new(-file=>">outputfilename",
-format=>'phrap');
while ( my $scaffold = $in->next_assembly() ) {
# do something with Bio::Assembly::Scaffold instance
# ...
$out->write_assembly(-scaffold => $scaffold);
}
$in->close;
$out->close;
DESCRIPTION¶
Bio::Assembly::IO is a handler module for formats in the Assembly::IO set (e.g.
Bio::Assembly::IO::phrap).
FEEDBACK¶
Mailing Lists¶
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.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support¶
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
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.
Reporting Bugs¶
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:
https://github.com/bioperl/bioperl-live/issues
AUTHOR¶
Robson Francisco de Souza
E-mail: rfsouza@citri.iq.usp.br
CONTRIBUTORS¶
#
APPENDIX¶
The rest of the documentation details each of the object methods. Internal
methods are usually preceded with a _
new¶
Title : new
Usage : $stream = Bio::Assembly::IO->new( -file => $filename,
-format =>'format' )
Function: Returns a new assembly stream
Returns : A Bio::Assembly::IO::Handler initialised
with the appropriate format
Args : -file => $filename
-format => format
Title : format
Usage : $format = $stream->format()
Function: Get the assembly format
Returns : assembly format
Args : none
next_assembly¶
Title : next_assembly
Usage : $scaffold = $stream->next_assembly()
Function: Reads the next assembly object from the stream and returns it.
Returns : a Bio::Assembly::ScaffoldI compliant object
Args : none
next_contig¶
Title : next_contig
Usage : $contig = $stream->next_contig()
Function: Reads the next contig or singlet from the stream and returns it.
Returns : a Bio::Assembly::Contig or Bio::Contig::Assembly::Singlet
Args : none
write_assembly¶
Title : write_assembly
Usage : $stream->write_assembly($assembly)
Function: Write the assembly object in desired format. This method calls
write_header(), write_contigs() and write_footer() internally.
Returns : 1 on success, 0 for error
Args : A Bio::Assembly::Scaffold object
Title : write_header
Usage : $stream->write_header($assembly)
Function: Write the start of the assembly file. It can be called at any time,
not when starting to write the assembly file.
Returns : 1 on success, 0 for error
Args : A Bio::Assembly::Scaffold object or ... (check the specific format
driver for more details)
write_contig¶
Title : write_contig
Usage : $stream->write_contig($contig)
Function: Write a contig object in the desired format.
Returns : 1 on success, 0 for error
Args : A Bio::Assembly::Contig object
Title : write_footer
Usage : $stream->write_footer($assembly)
Function: Write the start of the assembly file.
Returns : 1 on success, 0 for error
Args : A Bio::Assembly::Scaffold object or ... (check the specific format
driver for more details)
Title : _load_format_module
Usage : *INTERNAL Assembly::IO stuff*
Function: Loads up (like use) a module at run time on demand
Example :
Returns :
Args :
Title : _guess_format
Usage : $obj->_guess_format($filename)
Function: guess format based on file suffix
Example :
Returns : guessed format of filename (lower case)
Args :
Notes : formats that _filehandle() will guess includes
ace, phrap and tigr at the moment
_sort¶
Title : _sort
Usage : @sorted_values = $ass_io->_sort(@values)
Function: Sort a list of values naturally if Sort::Naturally is installed
(nicer), lexically otherwise (not as nice, but safe)
Returns : array of sorted values
Args : array of values to sort