Bio::EnsEMBL::Funcgen::Utils Encode
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Funcgen::Utils::Encode - provides some handy methods to deal
with Encode regions.
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Utils::Exception qw ( throw )
Data::Dumper
POSIX
Inherit
Exporter
Synopsis
    use Bio::EnsEMBL::Funcgen::Utils::Encode qw(get_encode_regions);
my $encode_regions = &get_encode_regions($dnadb, $assembly_version);
Description
Methods
get_encode_regionsDescriptionCode
Methods description
get_encode_regionscode    nextTop
  Arg [1]     : Bio::EnsEMBL::DBSQL::DBAdaptor
Description : fetch encode region coordinates from core db
Returns : reference to list of Bio::EnsEMBL::MiscFeatures Encode region slices
Exceptions : Throws if no Bio::EnsEMBL::DBSQL::DBAdaptor defined
Example : get_encode_regions($dnadb);
Methods code
get_encode_regionsdescriptionprevnextTop
sub get_encode_regions {
    my $db = shift;
    
    throw("Need to pass a valid Bio::EnsEMBL::DBSQL::DBAdaptor") 
        if (! ($db  && $db->isa("Bio::EnsEMBL::DBSQL::DBAdaptor")));

    my $sa = $db->get_SliceAdaptor();
    my $tls = $sa->fetch_all('toplevel');
    #map { print Dumper $_->name } @$tls;
my $mfa = $db->get_MiscFeatureAdaptor(); my @encode_regions; map { push @encode_regions, @{$mfa->fetch_all_by_Slice_and_set_code($_, 'encode')}; } @$tls; return\@ encode_regions; #my %encode_regions;
#map { $encode_regions{$_->display_id} = sprintf
# ("%s:%s:%s:%d:%d:%d",
# $_->slice->coord_system_name,
# $_->slice->coord_system()->version(),
# $_->slice->seq_region_name,
# $_->start, $_->end, $_->strand);
# } @encode_regions;
#
#return \%encode_regions;
} 1;
}
General documentation
AUTHORTop
Stefan Graf <graef@ebi.ac.uk>, EMBL-EBI, Ensembl Functional Genomics
This module is part of the Ensembl project:
CONTACTTop
Post questions to the Ensembl development list: ensembl-dev@ebi.ac.uk