orange-bioinformatics / docs / reference / obiGeneSets.htm

Full commit

<link rel=stylesheet href="style.css" type="text/css">
<link rel=stylesheet href="style-print.css" type="text/css" media=print>

<index name="modules/gene sets">

<p><code>obiGeneSets</code> is a module for gene set management. It can also load gene set collections in <code>gmt</code> format used by Molecular Signatures Database (MSigDB).</p>

<dl class="attributes">

Lists gene sets available in the local and <code>orngServerFiles</code> repositories. It returns a list of tuples of (hierarchy, organism, available_locally).

<dt>collections(col1, col2, ....)</dt>
Loads and combines gene sets from various sources: <code>gmt</code>, GO, KEGG and others. Returns a <code>GeneSets</code> object. All arguments are gene set specifications. They can be either:
<li>filename of a <code>gmt</code> file,</li>
<li>tuple <code>(hierarchy, organism)</code> (for example <code>(("KEGG",), "10090")</code>), or</li>
<li>instance of <code>GeneSets</code></li>
<h3>Usage one-liners</h3>
<p>Gene sets from KEGG and GO for mouse.</p>
<xmp class=code>obiGeneSets.collections((("KEGG",), "10090"), (("GO",), "10090"))
<p>Open gene sets from &quot;specific.gmt&quot; from the current working directory.</p>
<xmp class=code>obiGeneSets.collections("specific.gmt")
<p>We can also combine above examples.</p>
<xmp class=code>obiGeneSets.collections((("KEGG",), "10090"), (("GO",), "10090"), "specific.gmt")

<dt>register(geneSets, serverFiles=None)</dt>
Registers given geneSets (<code>GeneSets</code> object) locally if <code>serverFiles</code> is None or to <code>orngServerFiles</code> repository if authenticated connection is passed. The gene set is registred by the common organism (or None if organisms are different) and the most common hierarchy.


<h2>GeneSet: a single set of genes</h2>

<code>GeneSet</code> objects contain a single gene set.

<dl class="attributes">
<dt>GeneSet(genes=None, name=None, id=None, description=None, link=None, organism=None, hierarchy=None, pair=None)</dt>
<dd>Creates a GeneSet instance. If a tuple (name, genes) is passed as the <code>pair</code> argument, then the tuple is converted to the new represetation. Kept for backward compatibility.</dd>

<p class="section">Object properties and funtions</p>

<dl class="attributes">
<dd>Hierarchy should be formated as a tuple, for example <code>("GO", "biological_process")</code>.</dd>
<dd>A set of genes. Genes are strings.</dd>
<dt>cname(source=True, name=True)</dt>
<dd>Constructs a gene set name with the hierarchy.</dd>
<dt>to_odict(self, source=True, name=True)y</dt>
<dd>Returns a pair (id, listofgenes), like in the old format.</dd>

<h2>GeneSets: a colletions of gene sets</h2>

<code>GeneSets</code> objects contain multiple gene sets of type <code>GeneSet</code>. It is a subclass of Python's <code>set</code> type.

<dl class="attributes">
<dd>Creates a GeneSets instance. If it is an iterable, the <code>GeneSets</code> object is initialized with gene sets from input. If input is a dictionary, the gene sets are converted to the current format.</dd>

<p class="section">Object properties and funtions</p>

<dl class="attributes">
<dd>Sets hierarchy for all gene sets.</dd>
<dd>Returns the common organism (or None if there is no common organism).</dd>
<dd>Returns a set of all hierachies.</dd>
<dd>Returns a common hierarchy.</dd>
<dd>Splits gene sets by hierarchies. Returns a list of <code>GeneSets</code> object.</dd>
<dd>Return gene sets in old dictionary format.<dd>