[ensembl-dev] Chromosome-HGNC mapping
Manam, Monica (NIH/NCI) [F]
monica.manam at nih.gov
Mon Jul 22 15:13:50 BST 2013
Hi andy,
I am using the below:
The API version is 71.
--------------
use strict;
use warnings;
use Bio::EnsEMBL::Registry;
my $registry = 'Bio::EnsEMBL::Registry';
$registry->load_registry_from_db(
-host => 'ensembldb.ensembl.org', # alternatively
'useastdb.ensembl.org'
-user => 'anonymous'
);
$gene_adaptor =Bio::EnsEMBL::Registry->get_adaptor( "human", "core",
"gene" );
@genes = @{$gene_adaptor->fetch_all_by_external_name('MSGN1')}
print "$genes[0]\n";
--------------
I am not able to fetch any valid values form the DB related to MSGN1 , I
want to get its Gene information.
Thanks,
Monica.
On 7/19/13 6:06 PM, "Andy Yates" <ayates at ebi.ac.uk> wrote:
>Hi Monica
>
>Could you post your script please along with the version of ensembl you
>are attempting to use & database version. The error you are receiving
>points towards using a more recent version of the Api with an older
>database
>
>Andy
>
>Sent from my mobile.
>
>On 19 Jul 2013, at 20:51, "Manam, Monica (NIH/NCI) [F]"
><monica.manam at nih.gov> wrote:
>
>> Hello Emily,
>>
>> I am getting an exception when I tried using the code like this:
>>
>> my $gene_adaptor = $dbCore->get_GeneAdaptor();
>>
>> my $va_adaptor->fetch_all_by_external_name("BCRA2");
>>
>>
>>
>> Exception :
>>
>> DBD::mysql::st execute failed: Unknown column 'species_id' in 'where
>> clause' at
>>
>>/opt/nasapps/development/ensembl-api/ensembl/modules//Bio/EnsEMBL/DBSQL/B
>>as
>> eMetaContainer.pm line 130.
>>
>> Do you know why?
>>
>>
>> Thanks,
>> --
>> Monica Manam
>>
>> CCRIFX BioInformatics CORE
>> NCI-NIH
>>
>>
>>
>> On 7/19/13 4:06 AM, "Emily Pritchard" <emily at ebi.ac.uk> wrote:
>>
>>> Hi Monica
>>>
>>> Yes, you can do that.
>>>
>>> Use fetch_by_external_id in the gene_adaptor module to get genes from
>>> our database using HGNC or RefSeq IDs:
>>>
>>>http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_
>>>1D
>>> BSQL_1_1GeneAdaptor.html#a940d6dc7e9273ad373a23eb563a455e6
>>>
>>> Then you can use commands from the Gene module to get various bits of
>>> information:
>>>
>>>http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_
>>>1G
>>> ene.html
>>>
>>> You may wish to use seq_region_name, seq_region_start and
>>>seq_region_end
>>> to get coordinates, while get_all_Exons and get_all_Transcripts will
>>> give you exons and transcripts respectively.
>>>
>>> Hope this helps
>>>
>>> Emily
>>> Ensembl Outreach
>>>
>>>
>>> On 18/07/2013 19:30, Manam, Monica (NIH/NCI) [F] wrote:
>>>> Hello Team,
>>>>
>>>> I have a question regarding the API which gives the Gene & it's
>>>> attributes mapping.
>>>> For a given HGNC/RefSeq Id , can we get the chromosome name & its
>>>>start
>>>> & end , transcript , exon , & gene information?
>>>>
>>>> I know the API under "Genes, Transcripts, and Exons" to get the gene
>>>> data, & it takes the chromosome number, start & end as input.
>>>>
>>>> Thanks ,
>>>> --
>>>> Monica Manam
>>>> CCRIFX BioInformatics CORE
>>>> NCI-NIH
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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/
>>>
>>> --
>>> Dr Emily Pritchard
>>> Ensembl Outreach Officer
>>>
>>> EMBL - European Bioinformatics Institute
>>> Wellcome Trust Genome Campus
>>> Hinxton
>>> Cambridge
>>> CB10 1SD
>>> UK
>>>
>>>
>>> _______________________________________________
>>> 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/
>>
>>
>> _______________________________________________
>> 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/
>
>_______________________________________________
>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