NAME
GenOO::GeneCollection::Factory::FromTranscriptCollection - Factory for creating GenOO::GeneCollection object from a Transcript Collection and a hash{transcript_name} = genename
SYNOPSIS
# Creates GenOO::GeneCollection object from a Transcript Collection and a hash
# Preferably use it through the generic GenOO::GeneCollection::Factory
my $factory = GenOO::GeneCollection::Factory->create(
'FromTranscriptCollection',
{
annotation_hash => \%annotation,
transcript_collection => $transcript_collection
}
);
DESCRIPTION
An instance of this class is a concrete factory for the creation of a
L<GenOO::GeneCollection> object from a Transcript Collection
and a hash that has transcript names as keys and gene names as values.
It offers the method "read_collection" (as the consumed role requires) which returns the actual
L<GenOO::GeneCollection> object in the form of L<GenOO::RegionCollection::Type::DoubleHashArray>.
The latter is the implementation of the L<GenOO::RegionCollection> class based on the complex
data structure L<GenOO::Data::Structure::DoubleHashArray>.
EXAMPLES
# Create a concrete factory
my $factory_implementation = GenOO::GeneCollection::Factory->create(
'FromTranscriptCollection',
{
annotation_hash => \%annotation,
transcript_collection => $transcript_collection
}
);
# Return the actual GenOO::GeneCollection object
my $collection = $factory_implementation->read_collection;
print ref($collection) # GenOO::RegionCollection::Type::DoubleHashArray