[Bioperl-l] sample code for Bio::Phenotype::OMIM::OMIMparser

Chris Zmasek czmasek@gnf.org
Wed, 11 Dec 2002 14:32:38 -0800


Kenji:

The following "works" for MINI MIM entries.

my $mini_mim   = $omim_entry->miniMIM();

print $mini_mim->description()."\t".$mini_mim->created()."\t".$mini_mim->contributors()."\t".$mini_mim->edited()."\n";


Please note the each OMIM entry can only contain one MINI MIM entry (the comment in the example was misleading in this point -- it is corrected now), hence the foreach loop is not necessary.
($mini_mim is misspelled as $mini_min once, btw.)

Hope this helps,

CZ




> -----Original Message-----
> From: Leonardo Kenji Shikida [mailto:kenji@vettatech.com]
> Sent: Wednesday, December 11, 2002 12:49 PM
> To: bioperl-l@bioperl.org
> Subject: [Bioperl-l] sample code for Bio::Phenotype::OMIM::OMIMparser
> 
> 
> I am trying to use this class, so I just cut and paste it the 
> example. I 
> would like to transform into a tabular representation to put 
> inside my 
> local DB. It works great for all the $main[x] below, but 
> doesn't for the 
> $mini_mim array. Probably I am referencing something wrong here.
> 
> any help is welcome.
> > 
> >     my $mini_mim   = $omim_entry->miniMIM();                
>    # *FIELD* MN
> >       # Array of Bio::Phenotype::OMIM::MiniMIMentry objects.
> >       # class Bio::Phenotype::OMIM::MiniMIMentry
> >       # provides the following:
> >       # - description()
> >       # - created()
> >       # - contributors()
> >       # - edited()
> 
> 
> BUT NOT HERE. neither $x nor $mini_min
> 
> > 
> >     foreach my $x ($mini_mim){
> > 
> > 	    print MIM 
> "$numb\t$x->description()\t$mini_mim->created()\t$mini_min->co
> ntributors()\t$mini_mim->edited()\n";
> > 
> >     }
> 
> thanks in advance
> 
> Kenji
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>