Skip to content

Commit

Permalink
Merge pull request #75 from pachterlab/hjp/geneagg
Browse files Browse the repository at this point in the history
update vignette
  • Loading branch information
pimentel authored Jun 21, 2016
2 parents ed5ad30 + 9d4a67a commit 048f055
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions inst/doc/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ <h3>Including gene names into transcript-level analysis</h3>
<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>,
<span class="dt">dataset =</span> <span class="st">&quot;hsapiens_gene_ensembl&quot;</span>,
<span class="dt">host =</span> <span class="st">'ensembl.org'</span>)</code></pre></div>
<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>
<pre><code>## Creating a generic function for 'nchar' from package 'base' in package 'S4Vectors'</code></pre>
<p>and add them into the <strong>sleuth</strong> table with</p>
<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>,
<span class="st">&quot;external_gene_name&quot;</span>), <span class="dt">mart =</span> mart)
Expand Down Expand Up @@ -249,7 +247,7 @@ <h3>Including gene names into transcript-level analysis</h3>
</div>
<div id="gene-level-analysis" class="section level3">
<h3>Gene level analysis</h3>
<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>
<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>
<p>The modified sleuth prep command looks as follows:</p>
<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,
<span class="dt">aggregation_column =</span> <span class="st">'ens_gene'</span>)</code></pre></div>
Expand All @@ -264,7 +262,7 @@ <h3>Gene level analysis</h3>
<pre><code>## summarizing bootstraps</code></pre>
<pre><code>## aggregating by column: ens_gene</code></pre>
<pre><code>## 14412 genes passed the filter</code></pre>
<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>
<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>
<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>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># set the number of available cores to 4</span>
<span class="kw">options</span>(<span class="dt">mc.cores =</span> 4L)</code></pre></div>
Expand Down
8 changes: 4 additions & 4 deletions vignettes/intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ results_table <- sleuth_results(so, 'reduced:full', test_type = 'lrt')

### Gene level analysis

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

The modified sleuth prep command looks as follows:

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

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

`sleuth_prep` 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).
Expand Down

0 comments on commit 048f055

Please sign in to comment.