[Bioperl-l] Query Unigene title from input a ACC number

darson darson at ha.mc.ntu.edu.tw
Tue Mar 25 15:39:13 EST 2003


Hello,

I'm trying to write a script to grab Unigene title from a Hs.data file by
input a ACC number,
The following script is premature test,

use Bio::Cluster::UniGene; use Bio::ClusterIO; use Bio::ClusterI;
$stream=Bio::ClusterIO->new('-file'=>"/home/human_unigene/Hs.data", #
location of human unigene file from NCBI FTP
                                                  '-format'=>"unigene");
while (my $in=$stream->next_cluster()){
     while (my $sequence=$in->next_seq()){
          if ($sequence->accession_number()=~/BG618921/){ #BG618921 is a ACC
member of Hs.107 fibrinogen-like 1
               print $hitid=$in->unigene_id()."\n";
               print $hitti=$in->title()."\n";
         }
     }
}

It can report the correct one, however this script spents over 1 hour and
more  to accomplish.  That's extremely low efficiency. Furthermore I have
thousands to do. I would be very appreciative if any suggestions or other
methods to solve my problems. Thanks!
                    Best regards,
                                                     Darson Chung 2003/03/25




More information about the Bioperl-l mailing list