<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.stringliteral
        {mso-style-name:stringliteral;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>According to the Perl documentation, you should be able to get a list of genes for a given display label, using:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>public    Listref    Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_display_label ( )<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>However,  this method is wrongly documented in the online perl docs, and does not return an array – but a single gene object<o:p></o:p></p><p class=MsoNormal><span style='color:black'><o:p> </o:p></span></p><pre><span style='color:black'>my @genes = @{$geneAdaptor->fetch_by_display_label(<span class=stringliteral>"</span></span><span style='font-family:Consolas;color:black'>TBC1D3B</span><span class=stringliteral><span style='color:black'>"</span></span><span style='color:black'>)};<o:p></o:p></span></pre><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>DEBUGGER ERROR MESSAGE : Not an ARRAY reference<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:red'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>When you look at the real code in Release 67 API, rather than the www perldocs, the method actually returns a single gene, preferring one that is on a reference slice.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:red'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>I am looking for a way of getting alternative gene models on Patch exceptions: and this method would have been promising. e.g for the gene </span><span style='color:black'><a href="http://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000224226;r=HG75_PATCH:34442621-34976908"><span style='color:black'>ENSG00000224226</span></a> Location <a href="http://www.ensembl.org/Homo_sapiens/Location/View?db=core;g=ENSG00000224226;r=17:34493061-34503984"><span style='color:black'>Chromosome 17: 34,493,061-34,503,984</span></a></span><span style='font-size:10.0pt;font-family:Consolas;color:black'> how do I get its equivalent on the patch-fix </span><span style='color:black'><a href="http://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000260069;r=HG75_PATCH:34442621-34976908"><span style='color:black'>ENSG00000260069</span></a> Location <a href="http://www.ensembl.org/Homo_sapiens/Location/View?db=core;g=ENSG00000260069;r=HG75_PATCH:34493132-34503984"><span style='color:black'>Chromosome HG75_PATCH: 34,493,132-34,503,984</span></a>.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>obviously I can dig into the API and call the appropriate sql code myself:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>my $constraint = "x.display_label = '". $gene->display_xref()->display_id()."' AND g.is_current = 1";<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>my @same_labelled_genes = @{ $gene_adaptor->generic_fetch($constraint) };<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>but is there an alternative (simple) method to get either ‘same_labelled’ genes  or ideally ‘equivalent-exception’ genes for a given gene?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>the method <o:p></o:p></span></p><p class=MsoNormal>public    Listref    Bio::EnsEMBL::Gene::get_all_alt_alleles ( )<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>of course does something similar using the alt_alleles table , but only for alternative haplotypes not patches.<span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>Trevor<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:#B22200'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:#B22200'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:12.0pt;font-family:"Arial","sans-serif";color:navy;mso-fareast-language:EN-GB'>Trevor Paterson PhD<br></span></b><span style='font-size:12.0pt;font-family:"Arial","sans-serif";color:navy;mso-fareast-language:EN-GB'><a href="mailto:trevor.paterson@roslin.ed.ac.uk">trevor.paterson@roslin.ed.ac.uk</a></span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:12.0pt;font-family:"Arial","sans-serif";color:navy;mso-fareast-language:EN-GB'>Bioinformatics <br>The Roslin Institute<br>Royal (Dick) School of Veterinary Studies<br>University of Edinburgh<br>Easter Bush<br>Midlothian<br>EH25 9RG<br>Scotland UK<br><br>phone +44 (0)131 651 9157<br><br><a href="http://bioinformatics.roslin.ed.ac.uk/">http://bioinformatics.roslin.ed.ac.uk/</a></span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:black;mso-fareast-language:EN-GB'><br></span><span style='font-size:10.0pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:EN-GB'><br></span><span style='font-size:12.0pt;font-family:"Arial","sans-serif";color:green;mso-fareast-language:EN-GB'>Please consider the environment before printing this e-mail</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><i><span style='font-size:10.0pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:EN-GB'>The University of Edinburgh is a charitable body, registered in Scotland with registration number SC005336</span></i><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:navy;mso-fareast-language:EN-GB'><br><b>Disclaimer:This e-mail and any attachments are confidential and intended solely for the use of the recipient(s) to whom they are addressed. If you have received it in error, please destroy all copies and inform the sender.</b></span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB'> <o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>