<html><head><base href="x-msg://93/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Trevor<div><br></div><div>Apologies, but we seem to have the wrong method called in the example for fetch_all_by_display_label</div><div>It should state: </div><div><br></div><div>Example    : my @genes = @{$geneAdaptor->fetch_all_by_display_label("PPP1R2P1")};</div><div><br></div><div>I committed the change to the GeneAdaptor 'fetch_all_by_display_label' method documentation head code, which will be released in a month with release 68.</div><div><br></div><div>fetch_all_by_display_label (as Bert mentioned) will return an arrayref of genes.</div><div>Sorry about the confusion which the wrong example has caused.</div><div><br></div><div>Thanks</div><div>Monika</div><div><br><div><div>On 25 Jun 2012, at 13:50, PATERSON Trevor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">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></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">public    Listref    Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_display_label ( )<o:p></o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">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></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="color: black; "><o:p> </o:p></span></div><pre style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 10pt; font-family: 'Courier New'; "><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><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; ">DEBUGGER ERROR MESSAGE : Not an ARRAY reference<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: red; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; 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></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: red; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; 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 class="Apple-converted-space"> </span></span><span style="color: black; "><a href="http://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000224226;r=HG75_PATCH:34442621-34976908" style="color: blue; text-decoration: underline; "><span style="color: black; ">ENSG00000224226</span></a><span class="Apple-converted-space"> </span>Location<span class="Apple-converted-space"> </span><a href="http://www.ensembl.org/Homo_sapiens/Location/View?db=core;g=ENSG00000224226;r=17:34493061-34503984" style="color: blue; text-decoration: underline; "><span style="color: black; ">Chromosome 17: 34,493,061-34,503,984</span></a></span><span style="font-size: 10pt; font-family: Consolas; color: black; "><span class="Apple-converted-space"> </span>how do I get its equivalent on the patch-fix<span class="Apple-converted-space"> </span></span><span style="color: black; "><a href="http://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000260069;r=HG75_PATCH:34442621-34976908" style="color: blue; text-decoration: underline; "><span style="color: black; ">ENSG00000260069</span></a><span class="Apple-converted-space"> </span>Location<span class="Apple-converted-space"> </span><a href="http://www.ensembl.org/Homo_sapiens/Location/View?db=core;g=ENSG00000260069;r=HG75_PATCH:34493132-34503984" style="color: blue; text-decoration: underline; "><span style="color: black; ">Chromosome HG75_PATCH: 34,493,132-34,503,984</span></a>.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; ">obviously I can dig into the API and call the appropriate sql code myself:<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; 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></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; ">my @same_labelled_genes = @{ $gene_adaptor->generic_fetch($constraint) };<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; 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></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; ">the method<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">public    Listref    Bio::EnsEMBL::Gene::get_all_alt_alleles ( )<o:p></o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">of course does something similar using the alt_alleles table , but only for alternative haplotypes not patches.<span style="font-size: 10pt; font-family: Consolas; color: black; "><o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; ">Thanks<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: black; ">Trevor<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: rgb(178, 34, 0); "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Consolas; color: rgb(178, 34, 0); "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><b><span style="font-size: 12pt; font-family: Arial, sans-serif; color: navy; ">Trevor Paterson PhD<br></span></b><span style="font-size: 12pt; font-family: Arial, sans-serif; color: navy; "><a href="mailto:trevor.paterson@roslin.ed.ac.uk" style="color: blue; text-decoration: underline; ">trevor.paterson@roslin.ed.ac.uk</a></span><span style="font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; font-family: Arial, sans-serif; color: navy; ">Bioinformatics<span class="Apple-converted-space"> </span><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/" style="color: blue; text-decoration: underline; ">http://bioinformatics.roslin.ed.ac.uk/</a></span><span style="font-size: 12pt; font-family: 'Times New Roman', serif; color: black; "><br></span><span style="font-size: 10pt; font-family: 'Times New Roman', serif; color: navy; "><br></span><span style="font-size: 12pt; font-family: Arial, sans-serif; color: green; ">Please consider the environment before printing this e-mail</span><span style="font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><i><span style="font-size: 10pt; font-family: 'Times New Roman', serif; color: navy; ">The University of Edinburgh is a charitable body, registered in Scotland with registration number SC005336</span></i><span style="font-size: 10pt; font-family: Arial, sans-serif; color: navy; "><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: 12pt; font-family: 'Times New Roman', serif; "><o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div></div>The University of Edinburgh is a charitable body, registered in<br>Scotland, with registration number SC005336.<br>_______________________________________________<br>Dev mailing list    <a href="mailto:Dev@ensembl.org" style="color: blue; text-decoration: underline; ">Dev@ensembl.org</a><br>List admin (including subscribe/unsubscribe):<span class="Apple-converted-space"> </span><a href="http://lists.ensembl.org/mailman/listinfo/dev" style="color: blue; text-decoration: underline; ">http://lists.ensembl.org/mailman/listinfo/dev</a><br>Ensembl Blog:<span class="Apple-converted-space"> </span><a href="http://www.ensembl.info/" style="color: blue; text-decoration: underline; ">http://www.ensembl.info/</a><br></div></span></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Monika Komorowska</div><div>EnsEMBL Software Developer</div><div><br></div><div>European Bioinformatics Institute (EMBL-EBI)<br></div><div>tel: +44(0) 1233 494 409</div></div></span></div></span></div></span></span>
</div>
<br></div></body></html>