[Bioperl-l] example on how to use Bio::Phenotype::OMIM::OMIMparser
Chris Zmasek
czmasek@gnf.org
Mon, 16 Sep 2002 19:03:42 -0700
Hi!
This is an example on how to use Bio::Phenotype::OMIM::OMIMparser and the associated classes (OMIMentry, MiniMIMentry, Correlate, OMIMentryAllelicVariant):
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 => "/path/to/genemap",
-omimtext => "/path/to/omim.txt" );
while ( my $omim_entry = $omim_parser->next() ) {
# This gets individual data (some of them object-arrays)
# (and illustrates the relevant methods of OMIMentry).
my $numb = $omim_entry->MIM_number(); # *FIELD* NO
my $title = $omim_entry->title(); # *FIELD* TI - first line
my $alt = $omim_entry->alternative_titles_and_symbols(); # *FIELD* TI - additional lines
my $mtt = $omim_entry->more_than_two_genes(); # "#" before title
my $sep = $omim_entry->is_separate(); # "*" before title
my $desc = $omim_entry->description(); # *FIELD* TX
my $mm = $omim_entry->mapping_method(); # from genemap
my $gs = $omim_entry->gene_status(); # from genemap
my $cr = $omim_entry->created(); # *FIELD* CD
my $cont = $omim_entry->contributors(); # *FIELD* CN
my $ed = $omim_entry->edited(); # *FIELD* ED
my $sa = $omim_entry->additional_references(); # *FIELD* SA
my $cs = $omim_entry->clinical_symptoms(); # *FIELD* CS
my $comm = $omim_entry->comment(); # from genemap
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()
my @corrs = $omim_entry->each_Correlate(); # from genemap
# Array of Bio::Phenotype::Correlate objects.
# class Bio::Phenotype::Correlate
# provides the following:
# - name()
# - description() (not used)
# - species() (always mouse)
# - type() ("OMIM mouse correlate")
# - comment()
my @refs = $omim_entry->each_Reference(); # *FIELD* RF
# Array of Bio::Annotation::Reference objects.
my @avs = $omim_entry->each_AllelicVariant(); # *FIELD* AV
# Array of Bio::Phenotype::OMIM::OMIMentryAllelicVariant objects.
# class Bio::Phenotype::OMIM::OMIMentryAllelicVariant
# provides the following:
# - number (e.g ".0001" )
# - title (e.g "ALCOHOL INTOLERANCE" )
# - symbol (e.g "ALDH2*2" )
# - description (e.g "The ALDH2*2-encoded protein has a change ..." )
# - aa_ori (used if information in the form "LYS123ARG" is found)
# - aa_mut (used if information in the form "LYS123ARG" is found)
# - position (used if information in the form "LYS123ARG" is found)
# - additional_mutations (used for e.g. "1-BP DEL, 911T")
my @cps = $omim_entry->each_CytoPosition(); # from genemap
# Array of Bio::Map::CytoPosition objects.
my @gss = $omim_entry->each_gene_symbol(); # from genemap
# Array of strings.
}
Christian Zmasek [czmasek@gnf.org]