The orngMeSH module provides the functionality to calculate MeSH term enrichment and to annotate (MeSH ontology) supported examples (chemical compounds with CID, medical articles with PMID).
Methods
ExampleTable
. With argument minSizeInTerm
you can select only MeSH terms that have at least minSizeInTerm
annotated examples.pThreshold
you can limit MeSH terms in returned dictionary to terms with enrichment less or equal to defined constant. Data sets (reference
and cluster
) have to be instances of ExampleTable
findFrequentTerms
or findEnrichedTerms
. When you are printing a dictionary of enriched MeSH terms (returned by findEnrichedTerms
) you can also specify their properties and their order to print. At the moment you can choose among "term" (MeSH term name), "desc" (MeSH term description), "r" (number of examples from reference), "c" (number of examples from cluster), "p" (MeSH term enrichment) and "fold" (fold enrichment). ids
and values are lists of MeSH terms that apply to a key. With idType
you can choose annotation ("cid" or TODO!!! "pmid"). ExampleTable
. Of course you can select only certain attributes. At the moment supported attributes are "pmid" (PubMed ID), "title" (article title), "abstract" (article abstract), "mesh" (MeSH terms) and "affilation". examples
) with examples that apply to one or more MeSH terms from the list meshTerms
. Argument examples
has to be instance of ExampleTable
. Attributes
toID
provides mapping between MeSH term and MeSH term ids. Please note that some MeSH terms have more than one MeSH term id (one to many relation). toName
provides mapping between MeSH term id and MeSH term. toName
provides mapping between MeSH term and MeSH term description.
fromCID
provides mapping between CID (compound id) and a list of MeSH terms.fromPMID
provides mapping between PMID (PubMed id) and a list of MeSH terms.In our first example, we will show how to manipulate with MeSH ontology. Let's start with simple mapping between MeSH terms and their ids. This is done by the following code:
part of mesh1.py
asdf
asdf
asdf
mds3.py (uses reference.tab and cluster.tab)