Commit dcc77567 authored by Davis McCarthy's avatar Davis McCarthy
Browse files

New build of website

parent c82ea941
Pipeline #965 passed with stage
in 7 seconds
......@@ -878,7 +878,7 @@ parts, while if <span class="math inline">\(K\)</span> is too large, clusters mi
<p><img src="clustering_files/figure-html/unnamed-chunk-10-1.png" width="672" style="display: block; margin: auto;" /></p>
<p>Compare the results of <code>SC3</code> clustering with the original publication cell type labels:</p>
<div class="sourceCode" id="cb470"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb470-1" data-line-number="1"><span class="kw">adjustedRandIndex</span>(<span class="kw">colData</span>(deng)<span class="op">$</span>cell_type2, <span class="kw">colData</span>(deng)<span class="op">$</span>sc3_<span class="dv">10</span>_clusters)</a></code></pre></div>
<pre><code>## [1] 0.6581962</code></pre>
<pre><code>## [1] 0.7804189</code></pre>
<p><strong>Note</strong> <code>SC3</code> can also be run in an interactive <code>Shiny</code> session:</p>
<div class="sourceCode" id="cb472"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb472-1" data-line-number="1"><span class="kw">sc3_interactive</span>(deng)</a></code></pre></div>
<p>This command will open <code>SC3</code> in a web browser.</p>
......@@ -989,11 +989,11 @@ This step has two outputs:</p>
<pre><code>## [1] 50 2126</code></pre>
<div class="sourceCode" id="cb485"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb485-1" data-line-number="1"><span class="kw">metadata</span>(sceM)<span class="op">$</span>scmap_cell_index<span class="op">$</span>subclusters[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>,<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>]</a></code></pre></div>
<pre><code>## D28.1_1 D28.1_13 D28.1_15 D28.1_17 D28.1_2
## [1,] 13 25 13 6 38
## [2,] 23 46 36 25 11
## [3,] 38 44 20 16 43
## [4,] 18 36 32 4 33
## [5,] 2 44 21 21 10</code></pre>
## [1,] 8 14 5 3 3
## [2,] 15 40 8 35 4
## [3,] 7 43 21 1 20
## [4,] 27 42 34 27 30
## [5,] 45 38 4 41 36</code></pre>
<p><strong>Projection:</strong> Once the scmap-cell indexes have been generated we can use them to project the test dataset.</p>
<div class="sourceCode" id="cb487"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb487-1" data-line-number="1">scmapCell_results &lt;-<span class="st"> </span><span class="kw">scmapCell</span>(</a>
<a class="sourceLine" id="cb487-2" data-line-number="2"> <span class="dt">projection =</span> segerstolpe,</a>
......
......@@ -241,7 +241,7 @@ adjustedRandIndex(colData(deng)$cell_type2, colData(deng)$sc3_10_clusters)
```
```
## [1] 0.6581962
## [1] 0.7804189
```
__Note__ `SC3` can also be run in an interactive `Shiny` session:
......@@ -393,11 +393,11 @@ metadata(sceM)$scmap_cell_index$subclusters[1:5,1:5]
```
## D28.1_1 D28.1_13 D28.1_15 D28.1_17 D28.1_2
## [1,] 13 25 13 6 38
## [2,] 23 46 36 25 11
## [3,] 38 44 20 16 43
## [4,] 18 36 32 4 33
## [5,] 2 44 21 21 10
## [1,] 8 14 5 3 3
## [2,] 15 40 8 35 4
## [3,] 7 43 21 1 20
## [4,] 27 42 34 27 30
## [5,] 45 38 4 41 36
```
......
......@@ -754,12 +754,12 @@ annotations should be considered synonymous.</p>
diagram</a>:</p>
<div class="sourceCode" id="cb661"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb661-1" data-line-number="1"><span class="kw">plot</span>(<span class="kw">getSankey</span>(<span class="kw">colData</span>(muraro)<span class="op">$</span>cell_type1, muraro_to_seger<span class="op">$</span>scmap_cluster_labs[,<span class="dv">1</span>], <span class="dt">plot_height=</span><span class="dv">400</span>))</a></code></pre></div>
<!-- Sankey generated in R 3.6.0 by googleVis 0.6.4 package -->
<!-- Thu Oct 3 08:23:58 2019 -->
<!-- Thu Oct 3 10:17:31 2019 -->
<!-- jsHeader -->
<script type="text/javascript">
// jsData
function gvisDataSankeyID626a3560a3f1 () {
function gvisDataSankeyID8acc41e47c55 () {
var data = new google.visualization.DataTable();
var datajson =
[
......@@ -957,8 +957,8 @@ return(data);
}
// jsDrawChart
function drawChartSankeyID626a3560a3f1() {
var data = gvisDataSankeyID626a3560a3f1();
function drawChartSankeyID8acc41e47c55() {
var data = gvisDataSankeyID8acc41e47c55();
var options = {};
options["width"] = 400;
options["height"] = 400;
......@@ -977,7 +977,7 @@ options["sankey"] = {
};
var chart = new google.visualization.Sankey(
document.getElementById('SankeyID626a3560a3f1')
document.getElementById('SankeyID8acc41e47c55')
);
chart.draw(data,options);
......@@ -1001,9 +1001,9 @@ if (newPackage)
pkgs.push(chartid);
// Add the drawChart function to the global list of callbacks
callbacks.push(drawChartSankeyID626a3560a3f1);
callbacks.push(drawChartSankeyID8acc41e47c55);
})();
function displayChartSankeyID626a3560a3f1() {
function displayChartSankeyID8acc41e47c55() {
var pkgs = window.__gvisPackages = window.__gvisPackages || [];
var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
window.clearTimeout(window.__gvisLoad);
......@@ -1026,9 +1026,9 @@ callbacks.shift()();
// jsFooter
</script>
<!-- jsChart -->
<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartSankeyID626a3560a3f1"></script>
<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartSankeyID8acc41e47c55"></script>
<!-- divChart -->
<div id="SankeyID626a3560a3f1" style="width: 400; height: 400;">
<div id="SankeyID8acc41e47c55" style="width: 400; height: 400;">
</div>
<p><strong>Exercise</strong> How many of the previously unclassified cells would be be able to
......@@ -1185,7 +1185,7 @@ pair of datasets at a time with CCA.</p>
<p>Recently, the Seurat team proposed a new method to integrate single-cell
datasets using “anchors” <span class="citation">(<span class="citeproc-not-found" data-reference-id="Stuart2019-zx"><strong>???</strong></span>)</span>.</p>
<div class="figure" style="text-align: center"><span id="fig:unnamed-chunk-35"></span>
<img src="figures/stuart_graphical_abstract.jpg" alt="Seurat integration with anchors." width="90%" />
<img src="figures/stuart_graphical_abstract.png" alt="Seurat integration with anchors." width="90%" />
<p class="caption">
Figure 14.2: Seurat integration with anchors.
</p>
......
......@@ -465,39 +465,41 @@ umi = bcds(umi)
```
```
## [1] train-error:0.058012+0.009028 test-error:0.082759+0.011116
## [1] train-error:0.066402+0.005931 test-error:0.103638+0.025177
## Multiple eval metrics are present. Will use test_error for early stopping.
## Will train until test_error hasn't improved in 2 rounds.
##
## [2] train-error:0.043255+0.006356 test-error:0.076937+0.011995
## [3] train-error:0.033853+0.003265 test-error:0.064193+0.016507
## [4] train-error:0.029800+0.006149 test-error:0.059020+0.009223
## [5] train-error:0.024594+0.002186 test-error:0.053783+0.016495
## [6] train-error:0.021410+0.002716 test-error:0.051489+0.011570
## [7] train-error:0.017650+0.001547 test-error:0.052659+0.008845
## [8] train-error:0.016202+0.002439 test-error:0.043973+0.006895
## [9] train-error:0.014032+0.002261 test-error:0.046287+0.012793
## [10] train-error:0.011573+0.001440 test-error:0.042244+0.010619
## [11] train-error:0.009404+0.001444 test-error:0.039930+0.010749
## [12] train-error:0.009837+0.001076 test-error:0.039930+0.010904
## [13] train-error:0.008535+0.001904 test-error:0.038771+0.010294
## [14] train-error:0.007523+0.001079 test-error:0.038775+0.010791
## [15] train-error:0.006655+0.001675 test-error:0.036457+0.008707
## [16] train-error:0.005497+0.000577 test-error:0.037616+0.006611
## [17] train-error:0.004919+0.000542 test-error:0.037032+0.006923
## [2] train-error:0.049912+0.002718 test-error:0.085687+0.015561
## [3] train-error:0.036747+0.002381 test-error:0.079870+0.015979
## [4] train-error:0.029948+0.002910 test-error:0.071214+0.015731
## [5] train-error:0.026042+0.003332 test-error:0.072934+0.012966
## [6] train-error:0.022424+0.002773 test-error:0.064263+0.011326
## [7] train-error:0.019385+0.003075 test-error:0.058461+0.012930
## [8] train-error:0.018084+0.001510 test-error:0.056722+0.009848
## [9] train-error:0.016203+0.002440 test-error:0.052094+0.012606
## [10] train-error:0.013310+0.003702 test-error:0.049775+0.013542
## [11] train-error:0.011574+0.002856 test-error:0.046891+0.012536
## [12] train-error:0.010705+0.001959 test-error:0.046302+0.011468
## [13] train-error:0.009693+0.001081 test-error:0.043413+0.012598
## [14] train-error:0.008826+0.000545 test-error:0.042254+0.011269
## [15] train-error:0.007813+0.000709 test-error:0.040515+0.011465
## [16] train-error:0.006655+0.000705 test-error:0.042249+0.011692
## [17] train-error:0.005498+0.000584 test-error:0.042254+0.012804
## Stopping. Best iteration:
## [15] train-error:0.006655+0.001675 test-error:0.036457+0.008707
## [15] train-error:0.007813+0.000709 test-error:0.040515+0.011465
##
## [1] train-error:0.054977
## [1] train-error:0.068866
## Will train until train_error hasn't improved in 2 rounds.
##
## [2] train-error:0.039931
## [3] train-error:0.028356
## [4] train-error:0.029514
## [5] train-error:0.023148
## [6] train-error:0.018519
## [7] train-error:0.018519
## [8] train-error:0.015625
## [2] train-error:0.038194
## [3] train-error:0.034144
## [4] train-error:0.026620
## [5] train-error:0.024884
## [6] train-error:0.020255
## [7] train-error:0.020255
## [8] train-error:0.019097
## [9] train-error:0.016782
## [10] train-error:0.013310
```
```r
......@@ -511,12 +513,12 @@ head(cbind(CD$cxds_score,CD$bcds_score, CD$hybrid_score))
```
## [,1] [,2] [,3]
## NA19098.r1.A01 4131.405 0.020812672 0.2531013
## NA19098.r1.A02 4564.089 0.010029603 0.2674993
## NA19098.r1.A03 2827.904 0.005551378 0.1611125
## NA19098.r1.A04 4708.213 0.005341432 0.2711787
## NA19098.r1.A05 6134.590 0.005762757 0.3552646
## NA19098.r1.A06 5810.730 0.010443962 0.3410366
## NA19098.r1.A01 4131.405 0.012810320 0.2455279
## NA19098.r1.A02 4564.089 0.004930826 0.2628488
## NA19098.r1.A03 2827.904 0.020504847 0.1769445
## NA19098.r1.A04 4708.213 0.009793874 0.2762736
## NA19098.r1.A05 6134.590 0.006487557 0.3565501
## NA19098.r1.A06 5810.730 0.008279418 0.3393878
```
```r
......
......@@ -562,7 +562,7 @@ ll
## $even_a_function
## function (..., deparse.level = 1)
## .Internal(cbind(deparse.level, ...))
## <bytecode: 0x55dd34ac6108>
## <bytecode: 0x55ef7883b0f8>
## <environment: namespace:base>
```
......
......@@ -757,7 +757,7 @@ If we combine a character vector and a numeric vector into a matrix, all the dat
## $even_a_function
## function (..., deparse.level = 1)
## .Internal(cbind(deparse.level, ...))
## &lt;bytecode: 0x55dd34ac6108&gt;
## &lt;bytecode: 0x55ef7883b0f8&gt;
## &lt;environment: namespace:base&gt;</code></pre>
<p>Lists are most commonly used when returning a large number of results from a function that do not fit into any of the previous data structures.</p>
</div>
......
......@@ -648,7 +648,7 @@ traditional PCA, which is identical to the result from <code>plotPCA</code>.</p>
<a class="sourceLine" id="cb425-3" data-line-number="3">Y &lt;-<span class="st"> </span>Y[<span class="kw">rowSums</span>(Y) <span class="op">&gt;</span><span class="st"> </span><span class="dv">0</span>, ]</a>
<a class="sourceLine" id="cb425-4" data-line-number="4"><span class="kw">system.time</span>(res1 &lt;-<span class="st"> </span><span class="kw">glmpca</span>(Y, <span class="dt">L=</span><span class="dv">2</span>, <span class="dt">fam=</span><span class="st">&quot;poi&quot;</span>, <span class="dt">verbose=</span><span class="ot">TRUE</span>))</a></code></pre></div>
<pre><code>## user system elapsed
## 87.515 23.205 110.738</code></pre>
## 84.147 22.275 106.448</code></pre>
<div class="sourceCode" id="cb427"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb427-1" data-line-number="1">pd1 &lt;-<span class="st"> </span><span class="kw">data.frame</span>(res1<span class="op">$</span>factors, <span class="dt">dimreduce=</span><span class="st">&quot;glmpca-poisson&quot;</span>, <span class="dt">clust =</span> <span class="kw">factor</span>(deng<span class="op">$</span>cell_type2))</a>
<a class="sourceLine" id="cb427-2" data-line-number="2"><span class="co">## traditional PCA</span></a>
<a class="sourceLine" id="cb427-3" data-line-number="3">pd2 &lt;-<span class="st"> </span><span class="kw">data.frame</span>(<span class="kw">reducedDim</span>(deng, <span class="st">&quot;PCA&quot;</span>), <span class="dt">dimreduce=</span><span class="st">&quot;runPCA&quot;</span>, <span class="dt">clust =</span> <span class="kw">factor</span>(deng<span class="op">$</span>cell_type2))</a>
......
......@@ -156,7 +156,7 @@ system.time(res1 <- glmpca(Y, L=2, fam="poi", verbose=TRUE))
```
## user system elapsed
## 87.515 23.205 110.738
## 84.147 22.275 106.448
```
```r
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment