orange-bioinformatics / docs / reference / obiGeneSets.htm

<html>

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

<body>
<h1>obiGeneSets</h1>
<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">

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

<dt>collections(col1, col2, ....)</dt>
<dd>
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:
<ul>
<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>
</ul>
<h3>Usage one-liners</h3>
<p>Gene sets from KEGG and GO for mouse.</p>
<xmp class=code>obiGeneSets.collections((("KEGG",), "10090"), (("GO",), "10090"))
</xmp>
<p>Open gene sets from &quot;specific.gmt&quot; from the current working directory.</p>
<xmp class=code>obiGeneSets.collections("specific.gmt")
</xmp>
<p>We can also combine above examples.</p>
<xmp class=code>obiGeneSets.collections((("KEGG",), "10090"), (("GO",), "10090"), "specific.gmt")
</xmp>
</dd>

<dt>register(geneSets, serverFiles=None)</dt>
<dd>
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.
</dd>

</dl>

<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>
</dl>

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

<dl class="attributes">
<dt>organism</dt>
<dd>Taxid.</dd>
<dt>hierarchy</dt>
<dd>Hierarchy should be formated as a tuple, for example <code>("GO", "biological_process")</code>.</dd>
<dt>genes</dt>
<dd>A set of genes. Genes are strings.</dd>
<dt>id</dt>
<dt>name</dt>
<dt>description</dt>
<dt>link</dt>
<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>
</dl>

<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">
<dt>GeneSets(input=None)</dt>
<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>
</dl>

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

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

</body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.