Variations with Ensembl Regulatory Features
2
0
Entering edit mode
8.7 years ago
waqasnayab ▴ 250

Hi,

Is there any way to get a list of variants that are presentt within ensembl regulatroy feature, that is, get a list of SNPs that are present in any ENSR ID, particulalry in an enhancer ID.

I got some clue from here (http://www.ensembl.info/blog/2013/01/24/variants-in-regulatory-regions-2/ and http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1RegulatoryFeatureVariationAdaptor.html) but not sure is this the right way...,,!!!???

Thanks,

Waqas.

ensembl regulatory feature variation • 2.0k views
ADD COMMENT
1
Entering edit mode

I've let my colleagues in charge of the Ensembl variation API know about your question and they will get back to you.

ADD REPLY
1
Entering edit mode
8.7 years ago
Anja_Ensembl ▴ 10

You can get the data by using Ensembl's API. In the synopsis for the RegulatoryFeatureVariationAdaptor you can find some code examples for how to retrieve variants that overlap regulatory features:

  • fetch the RegulatoryFeature object
  • use the RegulatoryFeatureVariationAdaptor to fetch all RegulatoryFeatureVariations for the given RegulatoryFeature
  • a RegulatoryFeatureVariation object stores information about the RegulatoryFeature and the VariationFeature
  • you can retrieve the VariationFeature object by calling variation_feature on the RegulatoryFeatureVariation object: my $variation_feature = $regulatory_feature_variation->variation_feature;
  • the VariationFeature object contains information about the variation and location information: http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1VariationFeature.html

We have more tutorials about how to use our APIs:

If you already have a checkout of our most recent branch (ensembl-variation(release/84)) could you please pull the most recent changes?

Please let me know if you have more questions.

ADD COMMENT
0
Entering edit mode
8.6 years ago
waqasnayab ▴ 250

Hi Anja,

and Thanks, from nothing till here, I am able to perform most of the task.

I am trying to runn this test script available at:

http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1RegulatoryFeatureVariationAdaptor.html

use strict; use warnings; use Bio::EnsEMBL::Registry;

my $reg = 'Bio::EnsEMBL::Registry';

$reg->load_registry_from_db(-host => 'ensembldb.ensembl.org',-user => 'anonymous');

my $rfa  = $reg->get_adaptor('human', 'funcgen', 'RegulatoryFeature');
my $va   = $reg->get_adaptor('human', 'variation', 'Variation');
my $vfa  = $reg->get_adaptor('human', 'variation', 'VariationFeature');
my $rfva = $reg->get_adaptor('human','variation','RegulatoryFeatureVariation');

# fetch RegulatoryFeature by dbID
my $rf_stable_id = 'ENSR00000316845';
my $rf           = $rfa->fetch_by_stable_id($rf_stable_id);

# fetch all RegulatoryFeatureVariations falling in the MotifFeature
my $rfvs = $rfva->fetch_all_by_RegulatoryFeatures([$rf]);

# fetch by VariationFeatures
my $variation_name = 'rs191666497';
my $v   = $va->fetch_by_name($variation_name);
my $vfs = $vfa->fetch_all_by_Variation($v);

# fetch all RegulatoryFeatureVariations for the list of VariationFeatures
for my $vf (@$vfs) {
    print $vf->variation_name, "\n";
}
$rfvs = $rfva->fetch_all_by_VariationFeatures($vfs);
for my $rfv (@$rfvs) {
    print $rfv->regulatory_feature_stable_id, "\n";
}

But I go the following error:

Can't call method "stable_id" on an undefined value at /home/regmwkh/src/ensembl-variation/modules/Bio/EnsEMBL/Variation/DBSQL/VariationFeatureOverlapAdaptor.pm line 126.

Do I need to download some thing?

Best,

Waqas.

ADD COMMENT
0
Entering edit mode

Please do not post identical questions to BioStars and Ensembl helpdesk. As you've already seen here, Ensembl do monitor BioStars, and posting to both just creates duplicate work.

ADD REPLY

Login before adding your answer.

Traffic: 1916 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6