Skip to content
Snippets Groups Projects
Commit 35a2fd7c authored by Kieron Taylor's avatar Kieron Taylor :angry:
Browse files

Fixed use of ontology adaptor to create a BiotypeMapper.

parent 4b35c609
No related branches found
No related tags found
No related merge requests found
......@@ -54,23 +54,24 @@ my %strand_conversion = ( '1' => '+', '0' => '?', '-1' => '-');
=head2 new
Constructor
Arg [1] : BiotypeMapper
Arg [1] : Ontology Adaptor
Arg [2] : Optional File handle
Returntype : Bio::EnsEMBL::Utils::IO::Serializer
Returntype : Bio::EnsEMBL::Utils::IO::GFFSerializer
=cut
sub new {
my $class = shift;
my $self = {
mapper => shift,
ontology_adaptor => shift,
filehandle => shift,
};
bless $self, $class;
if ( ref($self->mapper) ne "Bio::EnsEMBL::Utils::BiotypeMapper" ) {
throw("GFF format requires an instance of Bio::EnsEMBL::Utils::BiotypeMapper to function");
if ( ref($self->{'ontology_adaptor'}) ne "Bio::EnsEMBL::DBSQL::OntologyTermAdaptor" ) {
throw("GFF format requires an instance of Bio::EnsEMBL::DBSQL::OntologyTermAdaptor to function. See also Bio::EnsEMBL::Utils::BiotypeMapper");
}
$self->{'mapper'} = new Bio::EnsEMBL::Utils::BiotypeMapper($self->{'ontology_adaptor'});
if (!defined ($self->{'filehandle'})) {
# no file handle, let the handle point to a copy of STDOUT instead
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment