[ensembl-dev] update API issue

Nathalie Conte nconte at ebi.ac.uk
Fri Nov 15 19:10:21 GMT 2013


hi, sure
example there
APOM:ENSG00000226215:HSCHR6_MHC_MCF_CTG1:2999873:3005667,
thanks
Nat
On 15 Nov 2013, at 16:53, Andy Yates <ayates at ebi.ac.uk> wrote:

> Hi,
> 
> Sorry could you send a HGNC symbol that causes the error please? I've tried with a number of symbols including BRAF, BRCA2, ABO & HCG21 none of which show the behaviour you're seeing. In fact running the code for HCG21 gives me:
> 
> HCG21:ENSG00000233529:6:30913756:30922639,
> 
> If I take out the test for $gene->slice->is_reference() I get:
> 
> HCG21:ENSG00000233529:6:30913756:30922639,
> HCG21:ENSG00000235747:HSCHR6_MHC_DBB:30904474:30913356,
> HCG21:ENSG00000230541:HSCHR6_MHC_QBL:30903331:30912213,
> HCG21:ENSG00000223454:HSCHR6_MHC_COX:30903456:30912338,
> HCG21:ENSG00000228448:HSCHR6_MHC_MCF:30992301:30992681,
> 
> I'm just not seeing the issue you're reporting. Also the sequence region name you gave is not a toplevel sequence. As you can see from this output HSCHR6_MHC_MCF is the toplevel region; HSCHR6_MHC_MCF_CTG1 is an underlying supercontig and is *not* a toplevel region. We only use the non-reference attribute when working with toplevel sequence regions. That's why calling is_reference() on a slice pointing at HSCHR6_MHC_MCF_CTG1
> 
> Andy
> 
> 
> On 15 Nov 2013, at 15:54, nconte at ebi.ac.uk wrote:
> 
>> HI,
>> This is the bit of the code which will get the is_reference test-
>> if you replace $Ggene with any gene symbol from HGNC this should work.
>> #!/usr/local/bin/perl
>> use strict;
>> use warnings;
>> 
>> use Bio::EnsEMBL::Registry;
>> 
>> Bio::EnsEMBL::Registry->load_registry_from_db(
>> 	-host=>"ensembldb.ensembl.org", -user=>"anonymous",
>>       -port=>'5306', 'db_version' => 73,);
>> my $gene_adaptor=Bio::EnsEMBL::Registry->get_adaptor( 'human', 'Core',
>> 'Gene' );
>> 
>> 
>> my $all_genes=$gene_adaptor->fetch_all_by_external_name($Ggene,'HGNC'); #
>> this is where I capture the ensembl genes from each key
>> #######
>> if (!scalar (@{$all_genes})) {print  $Ggene.'no ensembl gene object
>> ',"\t","no ensembl variation no object","\t","no ensembl orthologues no
>> object","\t"; next; } elsif  (scalar (@{$all_genes})){
>> 	 foreach my $gene (@{$all_genes}){
>> if (!$gene){print $Ggene.' '. 'no_ensembl_gene'; next} elsif
>> 	 ( $gene && $gene->slice->is_reference ) {
>> # no  genes which are on patches are removed only the ref assembly are
>> kept , -!!!!
>> #print   'GWAS_gene2: '.$Ggene,  "\t",defined($gene->external_name) ?
>> print   defined($gene->external_name) ?
>> $gene->external_name :'no_ensembl_gene',":", defined($gene->stable_id) ?
>> $gene->stable_id : 'no_stableID',":", defined($gene->seq_region_name) ?
>> $gene->seq_region_name:
>> 'no_seq_region_name:',":",defined($gene->seq_region_start) ?
>> $gene->seq_region_start:
>> 'no_seq_region_start',":",defined($gene->seq_region_end) ?
>> $gene->seq_region_end: 'no_seq_region_end',"," ;}
>> 
>> Thanks
>> 
>> Nat
>> 
>>> Hi there,
>>> 
>>> A reference sequence is detected by the non-existence of a non_ref flag in
>>> seq_region_attrib. I've done this query in 73:
>>> 
>>> select *
>>> from seq_region sr
>>> join seq_region_attrib sra using (seq_region_id)
>>> join attrib_type a using (attrib_type_id)
>>> where sr.name = 'HSCHR6_MHC_MCF_CTG1'
>>> and a.code = 'non_ref'
>>> 
>>> And have got no rows back suggesting that $gene->slice->is_reference()
>>> when slice is HSCHR6_MHC_MCF_CTG1 will return false. Could you send us
>>> your code please?
>>> 
>>> Andy
>>> 
>>> On 15 Nov 2013, at 14:26, nconte at ebi.ac.uk wrote:
>>> 
>>>> Hi,
>>>> I have been updating my ensembl API versions from 71 to 73 today, and
>>>> reran a script to test it was working.
>>>> In my script I am excluding genes  Ids for haplotypes /  LRG /
>>>> pseudoautomosal
>>>> or  assembly patches/fixes regions. I am using this test/method to
>>>> exclude
>>>> them
>>>> (if $gene->slice->is_reference)
>>>> 
>>>> I am now getting genes mapping on HSCHR6_MHC_MCF_CTG1 which were
>>>> excluded
>>>> on my last version of the API. Is the slice->is_reference deprecated?
>>>> Thanks
>>>> Nathalie
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> 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/
> 
> 
> _______________________________________________
> 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/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20131115/f2d2b28b/attachment.html>


More information about the Dev mailing list