<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">I use the following code to retrieve all instances of a gene name. Then I compare each display_id with the gene name that I have and if they match, I go further to process them.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">my @genes = @{ $gene_adaptor->fetch_all_by_external_name('HLA-DRB1') };<br>while (my $gene = shift @genes) {<br>  my $big_string = $gene->display_xref->display_id;<br>  my $pat = "HLA-DRB1";<br>  my $match_found = $big_string =~ /$pat/i;<br>  if ($match_found) {<br>     ..</div><div class="gmail_default" style="font-family:tahoma,sans-serif">  }</div><div class="gmail_default" style="font-family:tahoma,sans-serif">}</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Problem is that I get multiple items and they display_id are equal to what I have (HLA-DRB1). On the website, the main instance is named and the others are named "Human Alternative sequence Gene". I don't want to store them. I just need the main "Human Gene".</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">What is the correct attribute to distinguish that?</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br clear="all"></div><div><div class="gmail_signature"><div dir="ltr"><font face="tahoma,sans-serif">Regards,<br>Mahmood</font><br><br><br></div></div></div>
</div>