[ensembl-dev] FuncGen - how to retrieve polII sites
Daniel Zerbino
zerbino at ebi.ac.uk
Fri Jan 22 11:37:17 GMT 2016
Hello Marc,
You're warm... it's the AnnotatedFeatures you are looking for:
use strict;
use warnings;
use Bio::EnsEMBL::Registry;
my $registry = 'Bio::EnsEMBL::Registry';
$registry->load_registry_from_db(
-host => 'ensembldb.ensembl.org',
-user => 'anonymous'
#The Registry automatically picks port 5306 for ensembl db
#-verbose => 1, #specificy verbose to see exactly what it loaded
);
my $slice_adaptor = $registry->get_adaptor('Human', 'Core', 'Slice');
my $slice = $sa->fetch_by_region('chromosome', '1');
my $feature_type_adaptor = $registry->get_adaptor('Human', 'Core',
'FeatureType');
my $feature_types = $feature_type_adaptor->fetch_all_by_name('PolIII');
my $feature_adaptor = $registry->get_adaptor('Human', 'Funcgen',
'AnnotatedFeature');
foreach my $ft (@$feature_types) {
my $features = $afa->fetch_all_by_Slice_FeatureType($slice, $ft);
print scalar(@$features)."\n";
}
HTH,
Daniel
On 1/22/16 10:57 AM, Marc P. Hoeppner wrote:
> Hi,
>
> just started using the FuncGen API and was wondering how I can
> retrieve Encode polII Sites for a given Slice. First issue is that I
> am not sure which Adaptor these belong to, I guess. Tried
> RegulatoryFeature and MotifFeature, but no luck. A quick pointer would
> be greatly appreciated!
>
> Cheers,
> Marc
>
> _______________________________________________
> Dev mailing list Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
More information about the Dev
mailing list