Archive Ensembl HomeArchive Ensembl Home
ens_bio_seqFeature.pm
Go to the documentation of this file.
00001 =head1 LICENSE
00002 
00003   Copyright (c) 1999-2012 The European Bioinformatics Institute and
00004   Genome Research Limited.  All rights reserved.
00005 
00006   This software is distributed under a modified Apache license.
00007   For license details, please see
00008 
00009     http://www.ensembl.org/info/about/code_licence.html
00010 
00011 =head1 CONTACT
00012 
00013   Please email comments or questions to the public Ensembl
00014   developers list at <dev@ensembl.org>.
00015 
00016   Questions may also be sent to the Ensembl help desk at
00017   <helpdesk@ensembl.org>.
00018 
00019 =head1 AUTHOR
00020 
00021 Juguang Xiao <juguang@fugu-sg.org>
00022 
00023 =cut
00024 
00025 =head1 NAME
00026 
00027 Bio::EnsEMBL::Utils::Converter::ens_bio_seqFeature
00028 
00029 =head1 SYNOPISIS
00030 
00031 =head1 DESCRIPTION
00032 
00033 =head1 METHODS
00034 
00035 =cut
00036 
00037 package Bio::EnsEMBL::Utils::Converter::ens_bio_seqFeature;
00038 
00039 use strict;
00040 use vars qw(@ISA);
00041 use Bio::EnsEMBL::Utils::Converter::ens_bio;
00042 @ISA = qw(Bio::EnsEMBL::Utils::Converter::ens_bio);
00043 
00044 sub _convert_single {
00045     my ($self, $in) = @_;
00046     
00047     $self->throw("Input not defined") unless($in && defined($in));
00048     unless(ref($in) && $in->isa('Bio::EnsEMBL::SeqFeature')){
00049         $self->throw('A Bio::EnsEMBL::SeqFeature object needed');
00050     }
00051 
00052     my @args = (
00053         -start => $in->start,
00054         -end => $in->end,
00055         -strand => $in->strand,
00056         -score => $in->score,
00057         -source_tag => $in->source_tag,
00058         -seq_id => $in->seqname
00059     );
00060     
00061     my $seqFeature = new Bio::SeqFeature::Generic(@args);
00062     
00063     return $seqFeature;
00064 }
00065 
00066 1;