<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hi, sure<div>example there</div><div><div style="margin: 0px; font-size: 12px; font-family: 'Lucida Grande'; ">APOM:ENSG00000226215:HSCHR6_MHC_MCF_CTG1:2999873:3005667,</div><div style="margin: 0px; font-size: 12px; font-family: 'Lucida Grande'; ">thanks</div><div style="margin: 0px; font-size: 12px; font-family: 'Lucida Grande'; ">Nat</div><div><div>On 15 Nov 2013, at 16:53, Andy Yates <<a href="mailto:ayates@ebi.ac.uk">ayates@ebi.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>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:<br><br>HCG21:ENSG00000233529:6:30913756:30922639,<br><br>If I take out the test for $gene->slice->is_reference() I get:<br><br>HCG21:ENSG00000233529:6:30913756:30922639,<br>HCG21:ENSG00000235747:HSCHR6_MHC_DBB:30904474:30913356,<br>HCG21:ENSG00000230541:HSCHR6_MHC_QBL:30903331:30912213,<br>HCG21:ENSG00000223454:HSCHR6_MHC_COX:30903456:30912338,<br>HCG21:ENSG00000228448:HSCHR6_MHC_MCF:30992301:30992681,<br><br>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<br><br>Andy<br><br><br>On 15 Nov 2013, at 15:54, <a href="mailto:nconte@ebi.ac.uk">nconte@ebi.ac.uk</a> wrote:<br><br><blockquote type="cite">HI,<br>This is the bit of the code which will get the is_reference test-<br>if you replace $Ggene with any gene symbol from HGNC this should work.<br>#!/usr/local/bin/perl<br>use strict;<br>use warnings;<br><br>use Bio::EnsEMBL::Registry;<br><br>Bio::EnsEMBL::Registry->load_registry_from_db(<br><span class="Apple-tab-span" style="white-space:pre">      </span>-host=>"<a href="http://ensembldb.ensembl.org">ensembldb.ensembl.org</a>", -user=>"anonymous",<br>       -port=>'5306', 'db_version' => 73,);<br>my $gene_adaptor=Bio::EnsEMBL::Registry->get_adaptor( 'human', 'Core',<br>'Gene' );<br><br><br>my $all_genes=$gene_adaptor->fetch_all_by_external_name($Ggene,'HGNC'); #<br>this is where I capture the ensembl genes from each key<br>#######<br>if (!scalar (@{$all_genes})) {print  $Ggene.'no ensembl gene object<br>',"\t","no ensembl variation no object","\t","no ensembl orthologues no<br>object","\t"; next; } elsif  (scalar (@{$all_genes})){<br><span class="Apple-tab-span" style="white-space:pre">       </span> foreach my $gene (@{$all_genes}){<br>if (!$gene){print $Ggene.' '. 'no_ensembl_gene'; next} elsif<br><span class="Apple-tab-span" style="white-space:pre">  </span> ( $gene && $gene->slice->is_reference ) {<br># no  genes which are on patches are removed only the ref assembly are<br>kept , -!!!!<br>#print   'GWAS_gene2: '.$Ggene,  "\t",defined($gene->external_name) ?<br>print   defined($gene->external_name) ?<br>$gene->external_name :'no_ensembl_gene',":", defined($gene->stable_id) ?<br>$gene->stable_id : 'no_stableID',":", defined($gene->seq_region_name) ?<br>$gene->seq_region_name:<br>'no_seq_region_name:',":",defined($gene->seq_region_start) ?<br>$gene->seq_region_start:<br>'no_seq_region_start',":",defined($gene->seq_region_end) ?<br>$gene->seq_region_end: 'no_seq_region_end',"," ;}<br><br>Thanks<br><br>Nat<br><br><blockquote type="cite">Hi there,<br><br>A reference sequence is detected by the non-existence of a non_ref flag in<br>seq_region_attrib. I've done this query in 73:<br><br>select *<br>from seq_region sr<br>join seq_region_attrib sra using (seq_region_id)<br>join attrib_type a using (attrib_type_id)<br>where sr.name = 'HSCHR6_MHC_MCF_CTG1'<br>and a.code = 'non_ref'<br><br>And have got no rows back suggesting that $gene->slice->is_reference()<br>when slice is HSCHR6_MHC_MCF_CTG1 will return false. Could you send us<br>your code please?<br><br>Andy<br><br>On 15 Nov 2013, at 14:26, <a href="mailto:nconte@ebi.ac.uk">nconte@ebi.ac.uk</a> wrote:<br><br><blockquote type="cite">Hi,<br>I have been updating my ensembl API versions from 71 to 73 today, and<br>reran a script to test it was working.<br>In my script I am excluding genes  Ids for haplotypes /  LRG /<br>pseudoautomosal<br>or  assembly patches/fixes regions. I am using this test/method to<br>exclude<br>them<br>(if $gene->slice->is_reference)<br><br>I am now getting genes mapping on HSCHR6_MHC_MCF_CTG1 which were<br>excluded<br>on my last version of the API. Is the slice->is_reference deprecated?<br>Thanks<br>Nathalie<br><br><br><br>_______________________________________________<br>Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>Posting guidelines and subscribe/unsubscribe info:<br><a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br>Ensembl Blog: http://www.ensembl.info/<br></blockquote><br><br>_______________________________________________<br>Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>Posting guidelines and subscribe/unsubscribe info:<br><a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br>Ensembl Blog: http://www.ensembl.info/<br><br></blockquote><br><br>_______________________________________________<br>Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br>Ensembl Blog: <a href="http://www.ensembl.info/">http://www.ensembl.info/</a><br></blockquote><br><br>_______________________________________________<br>Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br>Ensembl Blog: <a href="http://www.ensembl.info/">http://www.ensembl.info/</a><br></blockquote></div><br></div></body></html>