Skip to content

Commit 048f055

Browse files
authored
Merge pull request #75 from pachterlab/hjp/geneagg
update vignette
2 parents ed5ad30 + 9d4a67a commit 048f055

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

inst/doc/intro.html

+2-4
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ <h3>Including gene names into transcript-level analysis</h3>
215215
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">mart &lt;-<span class="st"> </span>biomaRt::<span class="kw">useMart</span>(<span class="dt">biomart =</span> <span class="st">&quot;ENSEMBL_MART_ENSEMBL&quot;</span>,
216216
<span class="dt">dataset =</span> <span class="st">&quot;hsapiens_gene_ensembl&quot;</span>,
217217
<span class="dt">host =</span> <span class="st">'ensembl.org'</span>)</code></pre></div>
218-
<pre><code>## Note: the specification for S3 class &quot;AsIs&quot; in package 'BiocGenerics' seems equivalent to one from package 'DBI': not turning on duplicate class definitions for this class.</code></pre>
219-
<pre><code>## Creating a generic function for 'nchar' from package 'base' in package 'S4Vectors'</code></pre>
220218
<p>and add them into the <strong>sleuth</strong> table with</p>
221219
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">t2g &lt;-<span class="st"> </span>biomaRt::<span class="kw">getBM</span>(<span class="dt">attributes =</span> <span class="kw">c</span>(<span class="st">&quot;ensembl_transcript_id&quot;</span>, <span class="st">&quot;ensembl_gene_id&quot;</span>,
222220
<span class="st">&quot;external_gene_name&quot;</span>), <span class="dt">mart =</span> mart)
@@ -249,7 +247,7 @@ <h3>Including gene names into transcript-level analysis</h3>
249247
</div>
250248
<div id="gene-level-analysis" class="section level3">
251249
<h3>Gene level analysis</h3>
252-
<p>Assuming <code>biomaRt</code> has been installed as in the previous step, we can also run sleuth in the ‘gene aggregation’ mode. In addition to requiring a <code>target_mapping</code>, we also require a string which references a column to aggregate by, <code>aggregation_column</code>. In our example, we could use <code>ens_gene</code> or <code>ext_gene</code>. We typically prefer <code>ens_gene</code> as <code>ext_gene</code> tends to be a bit redundant.</p>
250+
<p>Assuming <code>biomaRt</code> has been installed as in the previous step, sleuth can also be run in the ‘gene aggregation’ mode. In addition to requiring a <code>target_mapping</code>, a string which references a column to aggregate by, (<code>aggregation_column</code>). In our example, we could use <code>ens_gene</code> or <code>ext_gene</code>. It is preferable to use <code>ens_gene</code> as <code>ext_gene</code> tends to be a bit redundant.</p>
253251
<p>The modified sleuth prep command looks as follows:</p>
254252
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">so &lt;-<span class="st"> </span><span class="kw">sleuth_prep</span>(s2c, ~condition, <span class="dt">target_mapping =</span> t2g,
255253
<span class="dt">aggregation_column =</span> <span class="st">'ens_gene'</span>)</code></pre></div>
@@ -264,7 +262,7 @@ <h3>Gene level analysis</h3>
264262
<pre><code>## summarizing bootstraps</code></pre>
265263
<pre><code>## aggregating by column: ens_gene</code></pre>
266264
<pre><code>## 14412 genes passed the filter</code></pre>
267-
<p>The remainder of the pipeline is unchanged. When you run <code>sleuth_live</code> or <code>sleuth_results</code>, the gene column you selected will be listed as <code>target_id</code>, rather than the transcript name.</p>
265+
<p>The remainder of the pipeline is unchanged. When running <code>sleuth_live</code> or <code>sleuth_results</code>, the gene column you selected will be listed as <code>target_id</code>, rather than the transcript name.</p>
268266
<p><code>sleuth_prep</code> might take a bit longer here because aggregation has to be done amongst all of the bootstraps as well. We are currently working to speed this up and expect to release it along with several memory improvements in the next version (0.28.2). One way to speed this up is to use more processes (assuming you have more cores). Internally, <code>sleuth</code> uses the function <code>parallel::mclapply</code>. You can set the number of cores as follows:</p>
269267
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># set the number of available cores to 4</span>
270268
<span class="kw">options</span>(<span class="dt">mc.cores =</span> 4L)</code></pre></div>

vignettes/intro.Rmd

+4-4
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ results_table <- sleuth_results(so, 'reduced:full', test_type = 'lrt')
203203

204204
### Gene level analysis
205205

206-
Assuming `biomaRt` has been installed as in the previous step, we can also run sleuth in the 'gene aggregation' mode.
207-
In addition to requiring a `target_mapping`, we also require a string which references a column to aggregate by, `aggregation_column`.
206+
Assuming `biomaRt` has been installed as in the previous step, sleuth can also be run in the 'gene aggregation' mode.
207+
In addition to requiring a `target_mapping`, a string which references a column to aggregate by, (`aggregation_column`).
208208
In our example, we could use `ens_gene` or `ext_gene`.
209-
We typically prefer `ens_gene` as `ext_gene` tends to be a bit redundant.
209+
It is preferable to use `ens_gene` as `ext_gene` tends to be a bit redundant.
210210

211211
The modified sleuth prep command looks as follows:
212212

@@ -216,7 +216,7 @@ so <- sleuth_prep(s2c, ~condition, target_mapping = t2g,
216216
```
217217

218218
The remainder of the pipeline is unchanged.
219-
When you run `sleuth_live` or `sleuth_results`, the gene column you selected will be listed as `target_id`, rather than the transcript name.
219+
When running `sleuth_live` or `sleuth_results`, the gene column you selected will be listed as `target_id`, rather than the transcript name.
220220

221221
`sleuth_prep` might take a bit longer here because aggregation has to be done amongst all of the bootstraps as well.
222222
We are currently working to speed this up and expect to release it along with several memory improvements in the next version (0.28.2).

0 commit comments

Comments
 (0)