NAME
Bio::Polloc::LocusIO - I/O interface of Bio::Polloc::Locus::* objects
AUTHOR - Luis M. Rodriguez-R
Email lmrodriguezr at gmail dot com
IMPLEMENTS OR EXTENDS
SYNOPSIS
Read & write loci:
use strict;
use Bio::Polloc::LocusIO;
my $locusI = Bio::Polloc::LocusIO->new(-file=>"t/loci.gff3", -format=>"gff3");
my $locusO = Bio::Polloc::LocusIO->new(-file=>">out.gff3", -format=>"gff3");
while(my $locus = $locusI->next_locus){
print "Got a ", $locus->type, " from ", $locus->from, " to ", $locus->to, "\n";
# Filter per type
if($locus->type eq "repeat"){
$locusO->write_locus($locus);
}
}
PUBLIC METHODS
Methods provided by the package
new
The basic initialization method
format
Gets/sets the format of the file
Arguments
Format (str), currently supported: gff3.
Return
Format (str or undef).
write_locus
Appends one locus to the output file.
Arguments
- -locus Bio::Polloc::LocusI, mandatory
-
The locus to append.
- -force Bool (int)
-
If true, forces re-parsing of the locus. Otherwise, tries to load cached parsing (if any).
read_loci
Gets the loci stored in the input file.
Arguments
- -genomes arrayref of Bio::Polloc::Genome objects
-
An arrayref containing the Bio::Polloc::Genome objects associated to the collection of loci. This is not mandatory, but
seqandgenomeproperties will not be set on the newly created objects if this parameter is not provided.
Returns
A Bio::Polloc::LociGroup object.
next_locus
Reads the next locus in the buffer.
Arguments
Same of read_loci()
Returns
A Bio::Polloc::LocusI object.
INTERNAL METHODS
Methods intended to be used only within the scope of Bio::Polloc::*
_qualify_format
Uniformizes the distinct names that every format can receive
Arguments
The requested format (str)
Returns
The qualified format (str or undef)
_write_locus_impl
Format-specific implementation of write_locus().
_read_loci_impl
Format-specific implementation of next_locus.
_next_locus_impl
_save_locus
_locus_by_id
_initialize
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 148:
You forgot a '=back' before '=head2'
- Around line 181:
=back without =over