[Bioperl-l] sample code for Bio::Phenotype::OMIM::OMIMparser
Hilmar Lapp
hlapp@gnf.org
Wed, 11 Dec 2002 14:18:45 -0800
Can you include verbatim the error messages you're getting? -hilmar
> -----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.
>
> > use Bio::Phenotype::OMIM::OMIMparser;
> >
> > # The OMIM database is available as textfile at:
> > # ftp://ncbi.nlm.nih.gov/repository/OMIM/omim.txt.Z
> > # The genemap is available as textfile at:
> > # ftp://ncbi.nlm.nih.gov/repository/OMIM/genemap
> >
> > $omim_parser = Bio::Phenotype::OMIM::OMIMparser->new(
> -genemap => "genemap.txt",
> >
> -omimtext => "omim.txt" );
> >
>
> > while ( my $omim_entry = $omim_parser->next_phenotype() ) {
> > # This prints everything.
> > # print( $omim_entry->to_string() );
> > # print "\n\n";
> >
> > # This gets individual data (some of them object-arrays)
> > # (and illustrates the relevant methods of OMIMentry).
> > $main[0] = $omim_entry->MIM_number();
> # *FIELD* NO
> > $main[1] = $omim_entry->title();
> # *FIELD* TI - first line
> > $main[2] =
> $omim_entry->alternative_titles_and_symbols(); # *FIELD* TI -
> additional lines
> > $main[3] = $omim_entry->more_than_two_genes();
> # "#" before title
> > $main[4] = $omim_entry->is_separate();
> # "*" before title
> > $main[5] = $omim_entry->description();
> # *FIELD* TX
> > $main[6] = $omim_entry->mapping_method();
> # from genemap
> > $main[7] = $omim_entry->gene_status();
> # from genemap
> > $main[8] = $omim_entry->created();
> # *FIELD* CD
> > $main[9] = $omim_entry->contributors();
> # *FIELD* CN
> > $main[10] = $omim_entry->edited();
> # *FIELD* ED
> > $main[11] = $omim_entry->additional_references();
> # *FIELD* SA
> > $main[12] = $omim_entry->clinical_symptoms();
> # *FIELD* CS
> > $main[13] = $omim_entry->comment();
> # from genemap
> >
> > $numb = $main[0];
> >
> > foreach $x (@main){
> >
> > $x =~ s/\t//g;
> > $x =~ s/\n//g;
> > $x =~ s/'/`/g;
> >
> > }
> >
>
>
> WORKS HERE
>
>
>
> > print MAIN join("\t",@main);
> >
> >
> > 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
>