/
transforming.html
199 lines (174 loc) · 10.8 KB
/
transforming.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>transforming (calour.transforming) — calour 2018.10.1 documentation</title>
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/copybutton.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="calour.transforming.normalize" href="generated/calour.transforming.normalize.html" />
<link rel="prev" title="calour.sorting.sort_centroid" href="generated/calour.sorting.sort_centroid.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
</head><body>
<a href="https://github.com/biocore/calour"
class="visible-desktop hidden-xs"><img
id="gh-banner"
style="position: absolute; top: 50px; right: 0; border: 0;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"
alt="Fork me on GitHub"></a>
<script>
// Adjust banner height.
$(function () {
var navHeight = $(".navbar .container").css("height");
$("#gh-banner").css("top", navHeight);
});
</script>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
calour docs</a>
<span class="navbar-text navbar-version pull-left"><b>2018.10.1</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="index.html">Site <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"><ul>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">General Calour concepts</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="tutorials_microbiome.html">Microbiome tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials_metabolome.html">Metabolome tutorials</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="api.html">Using Calour functions via the module and the Experiment class</a></li>
<li class="toctree-l1"><a class="reference internal" href="api.html#main-classes-and-utility-functions">Main classes and utility functions</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="api.html#functions-operating-on-experiment-object">Functions operating on <code class="docutils literal notranslate"><span class="pre">Experiment</span></code> object</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="database_interface.html">Creating database interfaces for Calour</a></li>
</ul>
</ul>
</li>
<li class="dropdown">
<a role="button"
id="dLabelLocalToc"
data-toggle="dropdown"
data-target="#"
href="#">Page <b class="caret"></b></a>
<ul class="dropdown-menu localtoc"
role="menu"
aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#">transforming (<code class="docutils literal notranslate"><span class="pre">calour.transforming</span></code>)</a><ul>
<li><a class="reference internal" href="#functions">Functions</a></li>
</ul>
</li>
</ul>
</ul>
</li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12 content">
<span class="target" id="module-calour.transforming"></span><div class="section" id="transforming-calour-transforming">
<h1>transforming (<a class="reference internal" href="#module-calour.transforming" title="calour.transforming"><code class="xref py py-mod docutils literal notranslate"><span class="pre">calour.transforming</span></code></a>)<a class="headerlink" href="#transforming-calour-transforming" title="Permalink to this headline">¶</a></h1>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Some of the functions require dense matrix and thus will change the sparse matrix to dense matrix.</p>
</div>
<div class="section" id="functions">
<h2>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="generated/calour.transforming.normalize.html#calour.transforming.normalize" title="calour.transforming.normalize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">normalize</span></code></a>(exp[, total, axis, inplace])</td>
<td>Normalize the sum of each sample (axis=0) or feature (axis=1) to sum total</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/calour.transforming.normalize_by_subset_features.html#calour.transforming.normalize_by_subset_features" title="calour.transforming.normalize_by_subset_features"><code class="xref py py-obj docutils literal notranslate"><span class="pre">normalize_by_subset_features</span></code></a>(exp, features)</td>
<td>Normalize each sample by their total sums without a list of features</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/calour.transforming.normalize_compositional.html#calour.transforming.normalize_compositional" title="calour.transforming.normalize_compositional"><code class="xref py py-obj docutils literal notranslate"><span class="pre">normalize_compositional</span></code></a>(exp[, min_frac, …])</td>
<td>Normalize each sample by ignoring the features with mean>=min_frac in all the experiment</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/calour.transforming.scale.html#calour.transforming.scale" title="calour.transforming.scale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code></a>(exp[, axis, inplace])</td>
<td>Standardize a dataset along an axis</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/calour.transforming.random_permute_data.html#calour.transforming.random_permute_data" title="calour.transforming.random_permute_data"><code class="xref py py-obj docutils literal notranslate"><span class="pre">random_permute_data</span></code></a>(exp[, normalize])</td>
<td>Shuffle independently the reads of each feature</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/calour.transforming.binarize.html#calour.transforming.binarize" title="calour.transforming.binarize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binarize</span></code></a>(exp[, threshold, inplace])</td>
<td>Binarize the data with a threshold.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/calour.transforming.log_n.html#calour.transforming.log_n" title="calour.transforming.log_n"><code class="xref py py-obj docutils literal notranslate"><span class="pre">log_n</span></code></a>(exp[, n, inplace])</td>
<td>Log transform the data</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/calour.transforming.transform.html#calour.transforming.transform" title="calour.transforming.transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">transform</span></code></a>(exp[, steps, inplace])</td>
<td>Chain transformations together.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/calour.transforming.center_log_ratio.html#calour.transforming.center_log_ratio" title="calour.transforming.center_log_ratio"><code class="xref py py-obj docutils literal notranslate"><span class="pre">center_log_ratio</span></code></a>(exp[, method, centralize, …])</td>
<td>Performs a clr transform to normalize each sample.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/calour.transforming.subsample_count.html#calour.transforming.subsample_count" title="calour.transforming.subsample_count"><code class="xref py py-obj docutils literal notranslate"><span class="pre">subsample_count</span></code></a>(exp, total[, replace, …])</td>
<td>Randomly subsample each sample to the same number of counts.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-right">
<a href="#">Back to top</a>
</p>
<p>
© Copyright 2016-2018, calour development team.<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.9.<br/>
</p>
</div>
</footer>
</body>
</html>