Commit 35a2fd7c authored by Kieron Taylor's avatar Kieron Taylor 😠
Browse files

Fixed use of ontology adaptor to create a BiotypeMapper.

parent 4b35c609
......@@ -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
......
Markdown is supported
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