view release on metacpan or search on metacpan
lib/Bio/EnsEMBL/ArchiveStableId.pm view on Meta::CPAN
=cut
package Bio::EnsEMBL::ArchiveStableId;
$Bio::EnsEMBL::ArchiveStableId::VERSION = '113.0.0';
use strict;
use warnings;
no warnings qw(uninitialized);
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
=head2 new
Arg [STABLE_ID] : String $stable_id
Arg [VERSION] : Int $version
Arg [CURRENT_VERSION]: Int $current_version
Arg [DB_NAME] : String $db_name
Arg [RELEASE] : String $release
Arg [ASSEMBLY_NAME] : String $assembly
Arg [TYPE] : String $type - "Gene", "Transcript", "Translation", "Exon"
lib/Bio/EnsEMBL/ArchiveStableId.pm view on Meta::CPAN
'stable_id' => $_[0],
'version' => $_[1],
'db_name' => $_[2],
'release' => $_[3],
'assembly' => $_[4],
'type' => $_[5],
'adaptor' => $_[6],
'current_version' => $_[7],
}, $class;
weaken($self->{adaptor}) if ( ! isweak($self->{adaptor}) );
return $self;
}
=head2 get_history_tree
Arg[1] : (optional) Int $num_high_scorers
number of mappings per stable ID allowed when filtering
Arg[2] : (optional) Int $max_rows
lib/Bio/EnsEMBL/ArchiveStableId.pm view on Meta::CPAN
}
sub type {
my $self = shift;
$self->{'type'} = shift if (@_);
return $self->{'type'};
}
sub adaptor {
my $self = shift;
weaken($self->{'adaptor'} = shift) if (@_);
return $self->{'adaptor'};
}
sub successors {
my $self = shift;
$self->{'successors'} = \@_;
return $self->{'successors'};
}
1;
lib/Bio/EnsEMBL/AssemblyExceptionFeature.pm view on Meta::CPAN
=cut
package Bio::EnsEMBL::AssemblyExceptionFeature;
$Bio::EnsEMBL::AssemblyExceptionFeature::VERSION = '113.0.0';
use strict;
use vars qw(@ISA);
use Bio::EnsEMBL::Feature;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
@ISA = qw(Bio::EnsEMBL::Feature);
=head2 new
Arg [TYPE] : The type (e.g. HAP for haplotype, PAR for PAR)
Arg [...] : Named arguments passed to superclass
Example : $feature = Bio::EnsEMBL::AssemblyExceptionFeature->new
(-start => 1,
lib/Bio/EnsEMBL/AssemblyMapper.pm view on Meta::CPAN
=cut
package Bio::EnsEMBL::AssemblyMapper;
$Bio::EnsEMBL::AssemblyMapper::VERSION = '113.0.0';
use strict;
use warnings;
use Bio::EnsEMBL::Mapper;
use Bio::EnsEMBL::Utils::Exception qw(throw);
use Scalar::Util qw(weaken);
use Bio::EnsEMBL::Utils::Scalar qw( check_ref);
my $ASSEMBLED = 'assembled';
my $COMPONENT = 'component';
my $DEFAULT_MAX_PAIR_COUNT = 1000;
=head2 new
lib/Bio/EnsEMBL/AssemblyMapper.pm view on Meta::CPAN
Exceptions : None
Caller : General
Status : Stable
=cut
sub adaptor {
my ( $self, $value ) = @_;
if ( defined($value) ) {
weaken($self->{'adaptor'} = $value);
}
return $self->{'adaptor'};
}
1;
lib/Bio/EnsEMBL/Attribute.pm view on Meta::CPAN
Bio::EnsEMBL::DBSQL::AttributeAdaptor
=cut
package Bio::EnsEMBL::Attribute;
$Bio::EnsEMBL::Attribute::VERSION = '113.0.0';
use strict;
use warnings;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
=head2 new
Arg [-CODE] : string - the code for this attribute
Arg [-NAME] : string - a human readable name for this attribute
Arg [-DESCRIPTION] : string - a description for this attribute
Arg [-VALUE] : value - the value of this attribute
Example : my $attribute = Bio::EnsEMBL::Attribute->new
(-CODE => 'myCode',
-NAME => 'My Attribute',
lib/Bio/EnsEMBL/Attribute.pm view on Meta::CPAN
Caller : general, subclass constructors
Status : Stable
=cut
sub new_fast {
my $class = shift;
my $hashref = shift;
my $self = bless $hashref, $class;
weaken($self->{adaptor}) if ( ! isweak($self->{adaptor}) );
return $self;
}
=head2 code
Arg [1] : string $code (optional)
Example : $code = $attribute->code();
Description: Getter/Setter for code attribute
Returntype : string
lib/Bio/EnsEMBL/Biotype.pm view on Meta::CPAN
package Bio::EnsEMBL::Biotype;
$Bio::EnsEMBL::Biotype::VERSION = '113.0.0';
use strict;
use warnings;
use Bio::EnsEMBL::Storable;
use Bio::EnsEMBL::Utils::Exception qw(throw deprecate warning);
use Bio::EnsEMBL::Utils::Scalar qw(check_ref assert_ref);
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
use parent qw(Bio::EnsEMBL::Storable);
=head2 new
Arg [-BIOTYPE_ID] :
int - dbID of the biotype
Arg [-NAME] :
string - the name of the biotype (for ensembl)
Arg [-OBJECT_TYPE] :
lib/Bio/EnsEMBL/Biotype.pm view on Meta::CPAN
=cut
sub new_fast {
my ( $class, $hashref ) = @_;
my $self = bless $hashref, $class;
if ( !isweak($self->{adaptor}) ) {
weaken($self->{adaptor})
}
return $self;
}
=head2 name
Arg [1] : (optional) string $name
The name of this biotype according to ensembl.
Example : $name = $biotype->name()
lib/Bio/EnsEMBL/CDS.pm view on Meta::CPAN
=cut
use strict;
package Bio::EnsEMBL::CDS;
$Bio::EnsEMBL::CDS::VERSION = '113.0.0';
use vars qw(@ISA);
use Bio::EnsEMBL::Feature;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
@ISA = qw(Bio::EnsEMBL::Feature);
use constant SEQUENCE_ONTOLOGY => {
acc => 'SO:0000316',
term => 'CDS',
};
=head2 new
lib/Bio/EnsEMBL/ChainedAssemblyMapper.pm view on Meta::CPAN
package Bio::EnsEMBL::ChainedAssemblyMapper;
$Bio::EnsEMBL::ChainedAssemblyMapper::VERSION = '113.0.0';
use strict;
use warnings;
use integer; #use proper arithmetic bitshifts
use Bio::EnsEMBL::Mapper;
use Bio::EnsEMBL::Mapper::RangeRegistry;
use Bio::EnsEMBL::Utils::Exception qw(throw);
use Scalar::Util qw(weaken);
use Bio::EnsEMBL::Utils::Scalar qw( check_ref);
my $FIRST = 'first';
my $MIDDLE = 'middle';
my $LAST = 'last';
#2^20 = approx 10^6
my $CHUNKFACTOR = 20;
# max size of the pair cache in the mappers
lib/Bio/EnsEMBL/ChainedAssemblyMapper.pm view on Meta::CPAN
Description: get/set for this objects database adaptor
Returntype : Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor
Exceptions : none
Caller : general
Status : Stable
=cut
sub adaptor {
my $self = shift;
weaken($self->{'adaptor'} = shift) if(@_);
return $self->{'adaptor'};
}
1;
lib/Bio/EnsEMBL/CircularSlice.pm view on Meta::CPAN
use Bio::EnsEMBL::Utils::Scalar qw( assert_ref );
use Bio::EnsEMBL::ProjectionSegment;
use Bio::EnsEMBL::Registry;
use Bio::EnsEMBL::DBSQL::MergedAdaptor;
#use Bio::EnsEMBL::IndividualSlice;
#use Bio::EnsEMBL::IndividualSliceFactory;
use Bio::EnsEMBL::Mapper::RangeRegistry;
use Bio::EnsEMBL::Slice;
use Data::Dumper;
use Scalar::Util qw(weaken isweak);
my $reg = "Bio::EnsEMBL::Registry";
@ISA = qw(Bio::EnsEMBL::Slice);
=head2 new
Arg [...] : List of named arguments
Bio::EnsEMBL::CoordSystem COORD_SYSTEM
string SEQ_REGION_NAME,
lib/Bio/EnsEMBL/DBSQL/Driver.pm view on Meta::CPAN
Questions may also be sent to the Ensembl help desk at
<http://www.ensembl.org/Help/Contact>.
=cut
package Bio::EnsEMBL::DBSQL::Driver;
$Bio::EnsEMBL::DBSQL::Driver::VERSION = '113.0.0';
use warnings;
use strict;
use Scalar::Util qw(weaken);
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
sub new {
my ($class, $parent) = @_;
my $self = bless {}, $class;
$self->parent($parent);
return $self;
}
sub parent {
my ($self, @args) = @_;
if (@args) {
( $self->{'_parent'} ) = @args;
weaken $self->{'_parent'};
}
return $self->{'_parent'};
}
sub connect_params {
my ($self, $conn) = @_;
my $dbname = $conn->dbname();
my $dbparam = ($dbname) ? "database=${dbname};" : q{};
lib/Bio/EnsEMBL/DBSQL/Support/BaseCache.pm view on Meta::CPAN
=cut
package Bio::EnsEMBL::DBSQL::Support::BaseCache;
$Bio::EnsEMBL::DBSQL::Support::BaseCache::VERSION = '113.0.0';
use strict;
use warnings;
use Bio::EnsEMBL::Utils::Exception qw/throw/;
use Bio::EnsEMBL::Utils::Scalar qw/assert_ref/;
use Scalar::Util qw/weaken/;
=head2 new
Arg [1] : Bio::EnsEMBL::DBSQL::BaseAdaptor $db_adaptor
Example : $cache = CacheInheritedFromBaseCache->new($db_adaptor);
Description: Creates a new cache class which handles all the basics of
working with a cache apart from what that cache implementation
is (apart from a hash)
Returntype : Bio::EnsEMBL::DBSQL::Support::BaseCache
Exceptions : none
lib/Bio/EnsEMBL/DBSQL/Support/BaseCache.pm view on Meta::CPAN
Status : Beta
=cut
sub adaptor {
my ($self, $adaptor) = @_;
if(defined $adaptor) {
assert_ref($adaptor, 'Bio::EnsEMBL::DBSQL::BaseAdaptor', 'adaptor');
$self->{'adaptor'} = $adaptor;
weaken($self->{'adaptor'});
}
return $self->{'adaptor'};
}
=head2 cache
Description: Returns back a Hash implementing object and also calls
C<build_cache()> for an initialise on demand system
Returntype : Hash
Exceptions : none
lib/Bio/EnsEMBL/DnaPepAlignFeature.pm view on Meta::CPAN
See BaseAlignFeature
=cut
package Bio::EnsEMBL::DnaPepAlignFeature;
$Bio::EnsEMBL::DnaPepAlignFeature::VERSION = '113.0.0';
use strict;
use Bio::EnsEMBL::BaseAlignFeature;
use Scalar::Util qw(weaken isweak);
use vars qw(@ISA);
@ISA = qw( Bio::EnsEMBL::BaseAlignFeature );
use constant SEQUENCE_ONTOLOGY => {
acc => 'SO:0000349',
term => 'protein_match',
};
lib/Bio/EnsEMBL/ExonTranscript.pm view on Meta::CPAN
=cut
use strict;
package Bio::EnsEMBL::ExonTranscript;
$Bio::EnsEMBL::ExonTranscript::VERSION = '113.0.0';
use vars qw(@ISA);
use Bio::EnsEMBL::Exon;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
@ISA = qw(Bio::EnsEMBL::Exon);
=head2 new
Arg [Exon]: The Exon object
Arg [Transcript]: The Transcript object the exon belongs to
Example : $feature = Bio::EnsEMBL::ExonTranscript->new(-exon => $exon, -transcript => $transcript);
Description: Constructs a new Bio::EnsEMBL::ExonTranscript.
lib/Bio/EnsEMBL/Feature.pm view on Meta::CPAN
use warnings;
use Bio::EnsEMBL::Storable;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
use Bio::EnsEMBL::Utils::Scalar qw(check_ref assert_ref);
use Bio::EnsEMBL::Slice;
use vars qw(@ISA);
use Scalar::Util qw(weaken);
@ISA = qw(Bio::EnsEMBL::Storable);
=head2 new
Arg [-SLICE]: Bio::EnsEMBL::SLice - Represents the sequence that this
feature is on. The coordinates of the created feature are
relative to the start of the slice.
Arg [-START]: The start coordinate of this feature relative to the start
lib/Bio/EnsEMBL/Feature.pm view on Meta::CPAN
my $slice = shift;
if(!$slice || !ref($slice) || (!$slice->isa('Bio::EnsEMBL::Slice') && !$slice->isa('Bio::EnsEMBL::LRGSlice'))) {
throw('Slice argument is required');
}
#make a shallow copy of the feature to be transfered
my $feature;
%{$feature} = %{$self};
bless $feature, ref($self);
weaken $feature->{adaptor};
my $current_slice = $self->{'slice'};
if(!$current_slice) {
warning("Feature cannot be transfered without attached slice.");
return undef;
}
my $cur_cs = $current_slice->coord_system();
my $dest_cs = $slice->coord_system();
lib/Bio/EnsEMBL/Genome.pm view on Meta::CPAN
Bio::EnsEMBL::DBSQL::GenomeContainer
=cut
package Bio::EnsEMBL::Genome;
$Bio::EnsEMBL::Genome::VERSION = '113.0.0';
use strict;
use warnings;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
=head2 new
Arg [-NAME] : string - the name for this statistic
Arg [-CODE] : string - the code for this statistic
Arg [-DESCRIPTION] : string - a description for this statistic
Arg [-VALUE] : value - the value of this statistic
Example : my $genome = Bio::EnsEMBL::Genome->new
(-name => 'myName',
-CODE => 'MyCode',
lib/Bio/EnsEMBL/Genome.pm view on Meta::CPAN
Caller : general, subclass constructors
Status : Stable
=cut
sub new_fast {
my $class = shift;
my $hashref = shift;
my $self = bless $hashref, $class;
weaken($self->{adaptor}) if ( ! isweak($self->{adaptor}) );
return $self;
}
=head2 statistic
Arg [1] : string $statistic (optional)
Example : $statistic = $statistic->name();
Description: Getter/Setter for the statistic name
Returntype : string
Exceptions : none
lib/Bio/EnsEMBL/MANE.pm view on Meta::CPAN
=cut
use strict;
package Bio::EnsEMBL::MANE;
$Bio::EnsEMBL::MANE::VERSION = '113.0.0';
use vars qw(@ISA);
use Bio::EnsEMBL::Feature;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
@ISA = qw(Bio::EnsEMBL::Feature);
use constant SEQUENCE_ONTOLOGY => {
acc => 'SO:0000673',
term => 'transcript',
};
=head2 new
lib/Bio/EnsEMBL/MappedSlice.pm view on Meta::CPAN
package Bio::EnsEMBL::MappedSlice;
$Bio::EnsEMBL::MappedSlice::VERSION = '113.0.0';
use strict;
use warnings;
no warnings 'uninitialized';
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
use Bio::EnsEMBL::Mapper;
use Scalar::Util qw(weaken);
use vars qw($AUTOLOAD);
=head2 new
Arg [ADAPTOR] : Adaptor $adaptor - an adaptor of the appropriate type
Arg [CONTAINER] : Bio::EnsEMBL::MappedSliceContainer $container - the
container this MappedSlice is attached to
Arg [NAME] : String $name - name
lib/Bio/EnsEMBL/MappedSlice.pm view on Meta::CPAN
throw("Need a MappedSliceContainer.");
}
my $self = {};
bless ($self, $class);
#
# initialise object
#
# need to weaken reference to prevent circular reference
weaken($self->{'container'} = $container);
$self->adaptor($adaptor) if (defined($adaptor));
$self->{'name'} = $name if (defined($name));
$self->{'slice_mapper_pairs'} = [];
return $self;
}
lib/Bio/EnsEMBL/MappedSlice.pm view on Meta::CPAN
Return type : Adaptor of appropriate type
Exceptions : none
Caller : general
Status : At Risk
: under development
=cut
sub adaptor {
my $self = shift;
weaken($self->{'adaptor'} = shift) if (@_);
return $self->{'adaptor'};
}
=head2 container
Arg[1] : (optional) Bio::EnsEMBL::MappedSliceContainer - the container
this object is attached to
Example : my $container = $mapped_slice->container;
print $container->ref_slice->name, "\n";
lib/Bio/EnsEMBL/MappedSlice.pm view on Meta::CPAN
Return type : Bio::EnsEMBL::MappedSliceContainer
Exceptions : none
Caller : general
Status : At Risk
: under development
=cut
sub container {
my $self = shift;
weaken($self->{'container'} = shift) if (@_);
return $self->{'container'};
}
=head2 name
Arg[1] : String - the name of this object
Example : my $name = $mapped_slice->container->ref_slice->name .
":mapped_" . $ident_string;
$mapped_slice->name($name);
lib/Bio/EnsEMBL/MicroRNA.pm view on Meta::CPAN
package Bio::EnsEMBL::MicroRNA;
$Bio::EnsEMBL::MicroRNA::VERSION = '113.0.0';
use vars qw($AUTOLOAD);
use strict;
use warnings;
use Bio::EnsEMBL::Utils::Exception qw( throw warning );
use Bio::EnsEMBL::Utils::Argument qw( rearrange );
use Bio::EnsEMBL::Utils::Scalar qw( assert_ref wrap_array );
use Scalar::Util qw(weaken);
use Bio::EnsEMBL::RNAProduct;
use parent qw(Bio::EnsEMBL::RNAProduct);
=head2 new
Arg: [-ARM] : which arm of the hairpin precursor this miRNA comes
from. Returns 3 and 5 for 3' and 5', respectively.
lib/Bio/EnsEMBL/RNAProduct.pm view on Meta::CPAN
package Bio::EnsEMBL::RNAProduct;
$Bio::EnsEMBL::RNAProduct::VERSION = '113.0.0';
use vars qw($AUTOLOAD);
use strict;
use warnings;
use Bio::EnsEMBL::Utils::Exception qw(throw warning );
use Bio::EnsEMBL::Utils::Argument qw( rearrange );
use Bio::EnsEMBL::Utils::RNAProductTypeMapper;
use Bio::EnsEMBL::Utils::Scalar qw( assert_ref wrap_array );
use Scalar::Util qw(weaken);
use Bio::EnsEMBL::Storable;
use parent qw(Bio::EnsEMBL::Storable);
=head2 new
Arg [-SEQ_START] : The offset in the Transcript indicating the start
position of the product sequence.
lib/Bio/EnsEMBL/RNAProduct.pm view on Meta::CPAN
=cut
sub transcript {
my ($self, $transcript) = @_;
if (defined($transcript)) {
# Normal setter
assert_ref($transcript, 'Bio::EnsEMBL::Transcript');
$self->{'transcript'} = $transcript;
weaken($self->{'transcript'}); # Avoid circular references.
} elsif (@_ > 1) {
# User has explicitly passed undef. Break connection to transcript.
delete( $self->{'transcript'} );
} elsif (!defined($self->{'transcript'})) {
my $adaptor = $self->{'adaptor'};
if (!defined($adaptor)) {
throw("Adaptor not set for RNAProduct, cannot fetch its transcript");
lib/Bio/EnsEMBL/RNAProduct.pm view on Meta::CPAN
my $dbID = $self->{'dbID'};
if (!defined($dbID)) {
throw("dbID not set for RNAProduct, cannot fetch its transcript.");
}
$self->{'transcript'} =
$adaptor->db()->get_TranscriptAdaptor()
->fetch_by_rnaproduct_id($dbID);
# Do not weaken the reference if we had to get the transcript from the
# database. The user is probably working on RNA products directly,
# not going through transcripts.
}
return $self->{'transcript'};
}
=head2 type_code
lib/Bio/EnsEMBL/SimpleFeature.pm view on Meta::CPAN
=cut
use strict;
package Bio::EnsEMBL::SimpleFeature;
$Bio::EnsEMBL::SimpleFeature::VERSION = '113.0.0';
use vars qw(@ISA);
use Bio::EnsEMBL::Feature;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
@ISA = qw(Bio::EnsEMBL::Feature);
use constant SEQUENCE_ONTOLOGY => {
acc => 'SO:0001411',
term => 'biological_region',
};
=head2 new
lib/Bio/EnsEMBL/Slice.pm view on Meta::CPAN
use Bio::EnsEMBL::Utils::Exception qw(throw deprecate warning);
use Bio::EnsEMBL::RepeatMaskedSlice;
use Bio::EnsEMBL::Utils::Sequence qw(reverse_comp);
use Bio::EnsEMBL::ProjectionSegment;
use Bio::EnsEMBL::Registry;
use Bio::EnsEMBL::Utils::Iterator;
use Bio::EnsEMBL::DBSQL::MergedAdaptor;
use Bio::EnsEMBL::Mapper::RangeRegistry;
use Bio::EnsEMBL::SeqRegionSynonym;
use Scalar::Util qw(weaken isweak);
# use Data::Dumper;
my $registry = "Bio::EnsEMBL::Registry";
@ISA = qw(Bio::PrimarySeqI);
=head2 new
lib/Bio/EnsEMBL/Slice.pm view on Meta::CPAN
Caller : general
Status : Stable
=cut
sub new_fast {
my $class = shift;
my $hashref = shift;
my $self = bless $hashref, $class;
weaken($self->{adaptor}) if ( ! isweak($self->{adaptor}) );
return $self;
}
=head2 adaptor
Arg [1] : (optional) Bio::EnsEMBL::DBSQL::SliceAdaptor $adaptor
Example : $adaptor = $slice->adaptor();
Description: Getter/Setter for the slice object adaptor used
by this slice for database interaction.
Returntype : Bio::EnsEMBL::DBSQL::SliceAdaptor
lib/Bio/EnsEMBL/Slice.pm view on Meta::CPAN
sub adaptor{
my $self = shift;
if(@_) {
my $ad = shift;
if(defined($ad)) {
if(!ref($ad) || !$ad->isa('Bio::EnsEMBL::DBSQL::SliceAdaptor')) {
throw('Argument must be a Bio::EnsEMBL::DBSQL::SliceAdaptor');
}
}
weaken($self->{'adaptor'} = $ad);
}
return $self->{'adaptor'};
}
=head2 seq_region_name
Arg [1] : none
lib/Bio/EnsEMBL/Slice.pm view on Meta::CPAN
}
#fastest way to copy a slice is to do a shallow hash copy
my $new_slice = {%{$self}};
$new_slice->{'start'} = int($new_start);
$new_slice->{'end'} = int($new_end);
$new_slice->{'strand'} = $new_strand;
if( $new_seq ) {
$new_slice->{'seq'} = $new_seq;
}
weaken($new_slice->{adaptor});
return bless $new_slice, ref($self);
}
=head2 seq_region_Slice
Arg [1] : none
Example : $slice = $slice->seq_region_Slice();
lib/Bio/EnsEMBL/Slice.pm view on Meta::CPAN
if($self->{'seq'}){
warning("Cannot get a seq_region_Slice of a slice which has manually ".
"attached sequence ");
return undef;
}
# quick shallow copy
my $slice;
%{$slice} = %{$self};
bless $slice, ref($self);
weaken($slice->{adaptor});
$slice->{'start'} = 1;
$slice->{'end'} = $slice->{'seq_region_length'};
$slice->{'strand'} = 1;
return $slice;
}
=head2 get_seq_region_id
lib/Bio/EnsEMBL/Storable.pm view on Meta::CPAN
use strict;
use warnings;
package Bio::EnsEMBL::Storable;
$Bio::EnsEMBL::Storable::VERSION = '113.0.0';
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Scalar qw(assert_ref);
use Scalar::Util qw(weaken isweak);
=head2 new
Arg [-ADAPTOR] : Bio::EnsEMBL::DBSQL::BaseAdaptor
Arg [-dbID] : database internal id
Caller : internal calls
Description : create a new Storable object
Returntype : Bio::EnsEMBL::Storable
Exceptions : Adaptor not a Bio::EnsEMBL::DBSQL::BaseAdaptor
Status : Stable
lib/Bio/EnsEMBL/Storable.pm view on Meta::CPAN
Caller : general, subclass constructors
Status : Stable
=cut
sub new_fast {
my $class = shift;
my $hashref = shift;
my $self = bless $hashref, $class;
weaken($self->{adaptor}) if ( ! isweak($self->{adaptor}) );
return $self;
}
=head2 dbID
Arg [1] : int $dbID
Description: getter/setter for the database internal id
Returntype : int
Exceptions : none
Caller : general, set from adaptor on store
lib/Bio/EnsEMBL/Storable.pm view on Meta::CPAN
Status : Stable
=cut
sub adaptor {
my ($self, $adaptor) = @_;
if(scalar(@_) > 1) {
if(defined $adaptor) {
assert_ref($adaptor, 'Bio::EnsEMBL::DBSQL::BaseAdaptor', 'adaptor');
$self->{adaptor} = $adaptor;
weaken($self->{adaptor});
}
else {
$self->{adaptor} = undef;
}
}
return $self->{adaptor}
}
lib/Bio/EnsEMBL/TopLevelAssemblyMapper.pm view on Meta::CPAN
use strict;
use warnings;
package Bio::EnsEMBL::TopLevelAssemblyMapper;
$Bio::EnsEMBL::TopLevelAssemblyMapper::VERSION = '113.0.0';
use Bio::EnsEMBL::Utils::Exception qw(throw);
use Bio::EnsEMBL::Mapper;
use Bio::EnsEMBL::CoordSystem;
use Scalar::Util qw(weaken);
=head2 new
Arg [1] : Bio::EnsEMBL::DBAdaptor $dbadaptor the adaptor for
the database this mapper is using.
Arg [2] : Toplevel CoordSystem
Arg [3] : Other CoordSystem
Description: Creates a new TopLevelAssemblyMapper object
Returntype : Bio::EnsEMBL::DBSQL::TopLevelAssemblyMapper
Exceptions : throws if any of the 3 arguments are missing/ not
lib/Bio/EnsEMBL/TopLevelAssemblyMapper.pm view on Meta::CPAN
'toplevel_cs' => $toplevel_cs,
'other_cs' => $other_cs}, $class;
$self->adaptor($adaptor);
return $self;
}
sub adaptor {
my $self = shift;
weaken($self->{'adaptor'} = shift) if(@_);
return $self->{'adaptor'};
}
=head2 map
Arg [1] : string $frm_seq_region
The name of the sequence region to transform FROM
Arg [2] : int $frm_start
The start of the region to transform FROM
lib/Bio/EnsEMBL/Translation.pm view on Meta::CPAN
package Bio::EnsEMBL::Translation;
$Bio::EnsEMBL::Translation::VERSION = '113.0.0';
use vars qw($AUTOLOAD @ISA);
use strict;
use Bio::EnsEMBL::Utils::Exception qw(throw warning );
use Bio::EnsEMBL::Utils::Argument qw( rearrange );
use Bio::EnsEMBL::Utils::Scalar qw( assert_ref wrap_array );
use Scalar::Util qw(weaken);
use Bio::EnsEMBL::Storable;
@ISA = qw(Bio::EnsEMBL::Storable);
=head2 new
Arg [-START_EXON] : The Exon object in which the translation (CDS) starts
Arg [-END_EXON] : The Exon object in which the translation (CDS) ends
lib/Bio/EnsEMBL/Translation.pm view on Meta::CPAN
=cut
sub transcript {
my ( $self, $transcript ) = @_;
if ( defined($transcript) ) {
assert_ref( $transcript, 'Bio::EnsEMBL::Transcript' );
$self->{'transcript'} = $transcript;
weaken( $self->{'transcript'} ); # Avoid circular references.
} elsif ( @_ > 1 ) {
# Break connection to transcript.
delete( $self->{'transcript'} );
} elsif ( !defined( $self->{'transcript'} ) ) {
my $adaptor = $self->adaptor;
if ( !defined($adaptor) ) {
throw( "Adaptor is not set for translation, "
. "can not fetch its transcript." );
}
lib/Bio/EnsEMBL/Translation.pm view on Meta::CPAN
my $dbID = $self->{'dbID'};
if ( !defined($dbID) ) {
throw( "dbID is not set for translation, "
. " can not fetch its transcript." );
}
$self->{'transcript'} =
$adaptor->db()->get_TranscriptAdaptor()
->fetch_by_translation_id($dbID);
# Do not weaken the reference if we had to get the transcript from the
# database. The user is probably working on translations directly,
# not going through transcripts.
#weaken( $self->{'transcript'} ); # Avoid circular references.
}
return $self->{'transcript'};
} ## end sub transcript
=head2 start
Arg [1] : (optional) int $start - start position to set
Example : $translation->start(17);
lib/Bio/EnsEMBL/UTR.pm view on Meta::CPAN
=cut
use strict;
package Bio::EnsEMBL::UTR;
$Bio::EnsEMBL::UTR::VERSION = '113.0.0';
use vars qw(@ISA);
use Bio::EnsEMBL::Feature;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);
@ISA = qw(Bio::EnsEMBL::Feature);
=head2 new
Arg [...] : Named arguments passed to superclass
Example : $feature = Bio::EnsEMBL::UTR->new
(-start => 1,
-end => 100,
lib/Bio/EnsEMBL/Utils/AssemblyProjector.pm view on Meta::CPAN
package Bio::EnsEMBL::Utils::AssemblyProjector;
$Bio::EnsEMBL::Utils::AssemblyProjector::VERSION = '113.0.0';
use strict;
use warnings;
no warnings qw(uninitialized);
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Slice;
use Scalar::Util qw(weaken);
=head2 new
Arg [ADAPTOR] : Bio::EnsEMBL::DBSQL::DBAdaptor $adaptor - a db adaptor
for a database containing the assembly mapping
Arg [EXTERNAL_SOURCE] : (optional) Boolean $external_source - indicates if
source is from a different database
Arg [OLD_ASSEMBLY] : name of the old assembly
Arg [OLD_ASSEMBLY] : name of the new assembly
Arg [OBJECT_TYPE] : (optional) object type ('slice' or 'feature')
lib/Bio/EnsEMBL/Utils/AssemblyProjector.pm view on Meta::CPAN
my ($self, $object) = @_;
return $self->project($object, $self->old_assembly);
}
#
# accessors
#
sub adaptor {
my $self = shift;
weaken($self->{'adaptor'} = shift) if (@_);
return $self->{'adaptor'};
}
sub external_source {
my $self = shift;
$self->{'external_source'} = shift if (@_);
return $self->{'external_source'};
}
lib/Bio/EnsEMBL/Utils/Converter/bio_ens.pm view on Meta::CPAN
=cut
package Bio::EnsEMBL::Utils::Converter::bio_ens;
$Bio::EnsEMBL::Utils::Converter::bio_ens::VERSION = '113.0.0';
use strict;
use vars qw(@ISA);
use Bio::EnsEMBL::Analysis;
use Bio::EnsEMBL::DBSQL::DBAdaptor;
use Bio::EnsEMBL::Utils::Converter;
use Scalar::Util qw(weaken);
@ISA = qw(Bio::EnsEMBL::Utils::Converter);
=head2 new
Please see Bio::EnsEMBL::Utils::Converter::new
=cut
sub new {
my ($caller, @args) = @_;
lib/Bio/EnsEMBL/Utils/Converter/bio_ens.pm view on Meta::CPAN
Function: get and set for dbadaptor
Return : L<Bio::EnsEMBL::DBSQL::DBAdaptor>
Args : L<Bio::EnsEMBL::DBSQL::DBAdaptor>
=cut
sub dbadaptor {
my ($self, $arg) = @_;
if(defined($arg)){
$self->throws("A Bio::EnsEMBL::DBSQL::DBAdaptor object expected.") unless(defined $arg);
weaken($self->{_dbadaptor} = $arg);
}
return $self->{_dbadaptor};
}
=head2 ensembl_db
Title : ensembl_db
Usage :
Function:
Return :
lib/Bio/EnsEMBL/Utils/SqlHelper.pm view on Meta::CPAN
package Bio::EnsEMBL::Utils::SqlHelper;
$Bio::EnsEMBL::Utils::SqlHelper::VERSION = '113.0.0';
use warnings;
use strict;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Scalar qw(assert_ref check_ref);
use Bio::EnsEMBL::Utils::Exception qw(throw);
use Bio::EnsEMBL::Utils::Iterator;
use English qw( -no_match_vars ); #Used for $PROCESS_ID
use Scalar::Util qw(weaken); #Used to not hold a strong ref to DBConnection
use Time::HiRes;
=pod
=head2 new()
Arg [DB_CONNECTION] : Bio::EnsEMBL::DBSQL::DBConnection $db_connection
Returntype : Instance of helper
Exceptions : If the object given as a DBConnection is not one or it
was undefined
lib/Bio/EnsEMBL/Utils/SqlHelper.pm view on Meta::CPAN
=cut
sub db_connection {
my ($self, $db_connection) = @_;
if(defined $db_connection) {
if(exists $self->{db_connection}) {
throw('Cannot reset the DBConnection object; already defined ');
}
assert_ref($db_connection, 'Bio::EnsEMBL::DBSQL::DBConnection', 'db_connection');
$self->{db_connection} = $db_connection;
weaken $self->{db_connection};
}
return $self->{db_connection};
}
# --------- SQL Methods
=pod
=head2 execute() - Execute a SQL statement with a custom row handler
lib/Bio/EnsEMBL/Utils/Tree/Interval/Mutable/Node.pm view on Meta::CPAN
Represents a node in the mutable interval tree pure perl implementation.
=head1 METHODS
=cut
package Bio::EnsEMBL::Utils::Tree::Interval::Mutable::Node;
$Bio::EnsEMBL::Utils::Tree::Interval::Mutable::Node::VERSION = '113.0.0';
use strict;
use Scalar::Util qw(looks_like_number weaken);
use List::Util qw(max);
use Bio::EnsEMBL::Utils::Scalar qw(assert_ref);
use Bio::EnsEMBL::Utils::Exception qw(throw);
=head1 METHODS
=head2 new
Arg [1] : Bio::EnsEMBL::Utils::Tree::Interval::Mutable::PP
The tree to which the node belongs
lib/Bio/EnsEMBL/Utils/Tree/Interval/Mutable/Node.pm view on Meta::CPAN
Returntype : none
Exceptions : none
Caller : general
=cut
sub parent {
my $self = shift;
if (@_) {
$self->{parent} = shift;
weaken($self->{parent});
}
return $self->{parent};
}
=head2 height
Arg [] : none
Description : Return the height of the node
Returntype : scalar, positive or 0