BioPerl
view release on metacpan or search on metacpan
Bio/Assembly/Contig.pm view on Meta::CPAN
=cut
#'
package Bio::Assembly::Contig;
use strict;
use Bio::DB::SeqFeature::Store; # isa Bio::SeqFeature::CollectionI
use Bio::Seq::PrimaryQual; # isa Bio::Seq::QualI
use Scalar::Util qw(weaken);
use base qw(Bio::Root::Root Bio::Align::AlignI);
=head1 Object creator
=head2 new
Title : new
Usage : my $contig = Bio::Assembly::Contig->new();
Function : Creates a new contig object
Bio/Assembly/Contig.pm view on Meta::CPAN
sub assembly {
my $self = shift;
my $assembly = shift;
$self->throw("Using non Bio::Assembly::Scaffold object when assign contig to assembly")
if (defined $assembly && ! $assembly->isa("Bio::Assembly::Scaffold"));
# We create a circular reference to a Scaffold object. It is made weak
# to prevent memory leaks.
$self->{'_assembly'} = $assembly if (defined $assembly);
weaken($self->{'_assembly'});
return $self->{'_assembly'};
}
=head2 strand
Title : strand
Usage : $contig->strand($num);
Function : Get/Set contig orientation in a scaffold/assembly.
Its equivalent to the strand property of sequence
Bio/SeqFeature/Gene/GeneStructure.pm view on Meta::CPAN
# Let the code begin...
package Bio::SeqFeature::Gene::GeneStructure;
use vars qw($WeakRefs);
use strict;
BEGIN {
eval "use Scalar::Util qw(weaken);";
if ($@) {
$Bio::SeqFeature::Gene::GeneStructure::WeakRefs = 0;
} else { $Bio::SeqFeature::Gene::GeneStructure::WeakRefs = 1; }
}
use base qw(Bio::SeqFeature::Generic Bio::SeqFeature::Gene::GeneStructureI);
sub new {
Bio/SeqFeature/Gene/GeneStructure.pm view on Meta::CPAN
my ($self, $fea) = @_;
if(!$fea || ! $fea->isa('Bio::SeqFeature::Gene::TranscriptI') ) {
$self->throw("$fea does not implement Bio::SeqFeature::Gene::TranscriptI");
}
unless( exists $self->{'_transcripts'} ) {
$self->{'_transcripts'} = [];
}
$self->_expand_region($fea);
if( $Bio::SeqFeature::Gene::GeneStructure::WeakRefs ) {
$fea->parent(weaken $self);
} else {
$fea->parent($self);
}
push(@{$self->{'_transcripts'}}, $fea);
}
=head2 flush_transcripts
Title : flush_transcripts()
Usage : $gene->flush_transcripts();
Bio/Species.pm view on Meta::CPAN
sub new {
my($class, @args) = @_;
my $self = $class->SUPER::new(@args);
# Bio::Species is now just a proxy object that just observes the NodeI
# interface methods but delegates them to the proper classes (Bio::Taxon and
# Bio::Tree::Tree). This will be surplanted by the much simpler
# Bio::Taxon/Bio::DB::Taxonomy modules in the future.
# Using a proxy allows proper GC w/o using weaken(). This just wraps the
# older instances, which have no reciprocal refs (thus no circular refs).
# This can then run proper cleanup
$self->taxon(Bio::Taxon->new(@args));
my ($org, $sp, $var, $classification) =
$self->_rearrange([qw(ORGANELLE
SUB_SPECIES
VARIANT
CLASSIFICATION)], @args);
Bio/Species.pm view on Meta::CPAN
sub sub_species {
my ($self, $sub) = @_;
# TODO: instead of caching the raw name, cache the actual node instance.
if (!defined $self->{'_sub_species'}) {
my $ss_taxon = $self->tree->find_node(-rank => 'subspecies');
if ($ss_taxon) {
if ($sub) {
$ss_taxon->scientific_name($sub);
# *** weakening ref to our root node in species() to solve a
# memory leak means that we have a subspecies taxon to set
# during the first call to species(), but it has vanished by
# the time a user subsequently calls sub_species() to get the
# value. So we 'cheat' and just store the subspecies name in
# our self hash, instead of the tree. Is this a problem for
# a Species object? Can't decide --sendu
# This can now be changed to deal with this information on the
# fly. For now, the caching remains, but maybe we should just
# let these things deal with mutable data as needed? -- cjfields
as part of the Google Summer of Code. This may become BioPerl 2.0.
* Version bump represents 'just prior to v 1.7'. We may have point
releases to deal with bugs, with increments of 1.6.901, 1.6.902, etc.
This code essentially is what is on the github master branch.
[New features]
* Core code updated for perl 5.12.x [cjfields, Charle Tilford]
* Bio::Tree refactor
- major overhaul of Bio::Tree code by Greg Jordan, fixes several bugs
- removal of Scalar::Util::weaken code, which was causing odd headaches
with premature GC, memory leaks with perl 5.10.0, etc [cjfields]
* Bio::DB::SeqFeature bug fixes for GBrowse2 compatibility [lds, scottcain,
many others]
* Bio::SeqIO::msout, Bio::SeqIO::mbsout - parsers for ms and mbs
[Warren Kretzschmar]
* Bio::SeqIO::gbxml
- bug 2515 - new contribution [Ryan Golhar, jhannah]
* Bio::Assembly::IO
- support for reading Maq, Sam and Bowtie files [maj]
- support for reading 454 GS Assembler (Newbler) ACE files [fangly]
t/data/entrezgene.dat view on Meta::CPAN
version 0 ,
refs {
pmid 14517345 } ,
create-date
str "Jun 23 2004 4:43PM" ,
update-date
str "Jun 23 2004 5:16PM" } ,
{
type generif ,
text "cellular generation of peroxynitrite may contribute to
carcinogenesis and tumor progression by weakening key cellular defense
enzymes such as arylamine N-acetyltransferase 1 (NAT1)" ,
version 0 ,
refs {
pmid 14672957 } ,
create-date
str "Mar 24 2004 12:00AM" ,
update-date
str "May 9 2004 7:01AM" } ,
{
type generif ,
( run in 0.460 second using v1.01-cache-2.11-cpan-65fba6d93b7 )