Browse code

Fix SingleR requirement

Yichen Wang authored on 25/10/2022 15:53:38
Showing 4 changed files

... ...
@@ -80,7 +80,7 @@ Imports:
80 80
     Seurat (>= 3.1.3),
81 81
     shiny,
82 82
     shinyjs,
83
-    SingleR (>= 1.99.2),
83
+    SingleR,
84 84
     SoupX,
85 85
     sva,
86 86
     reshape2,
... ...
@@ -338,11 +338,20 @@ on this to run the cell type labeling process.</li>
338 338
 annotation will be inserted to the background object. They will all have
339 339
 the same prefix as
340 340
 <code>"SingleR_{reference abbr}_{annotation level}_"</code>, then
341
+<code>"score"</code>, <code>"labels"</code>, <code>"delta.next"</code>
342
+and <code>"pruned.labels"</code>, respectively. <code>"labels"</code>
343
+contains the predicted label, basing only on the maximum entry in
344
+scores. <code>"delta.next"</code> contains difference between the best
345
+and next-best score. <code>"pruned.labels"</code> contains predictions
346
+where “low-quality” labels are replaced with <code>NA</code>s.</p>
347
+<blockquote>
348
+<p>With older versions of SingleR, the output variables ends with
341 349
 <code>"score"</code>, <code>"first.labels"</code>, <code>"labels"</code>
342 350
 and <code>"pruned.labels"</code>, respectively.
343 351
 <code>"first.labels"</code> refers to the labeling initially indicated
344 352
 by the scores, <code>"labels"</code> is fine-tuned, and
345 353
 <code>"pruned.labels"</code> is the pruned result.</p>
354
+</blockquote>
346 355
 <p><strong>Visualization</strong></p>
347 356
 <p>SCTK does not have a quick visualization at this point. But users can
348 357
 go to the <a href="visualization.html">CellViewer</a> tab to create a
... ...
@@ -384,6 +393,14 @@ contains the predicted label, basing only on the maximum entry in
384 393
 scores. <code>"delta.next"</code> contains difference between the best
385 394
 and next-best score. <code>"pruned.labels"</code> contains predictions
386 395
 where “low-quality” labels are replaced with <code>NA</code>s.</p>
396
+<blockquote>
397
+<p>With older versions of SingleR, the output variables ends with
398
+<code>"score"</code>, <code>"first.labels"</code>, <code>"labels"</code>
399
+and <code>"pruned.labels"</code>, respectively.
400
+<code>"first.labels"</code> refers to the labeling initially indicated
401
+by the scores, <code>"labels"</code> is fine-tuned, and
402
+<code>"pruned.labels"</code> is the pruned result.</p>
403
+</blockquote>
387 404
 <p>Besides, users can also use their own labeled reference datasets
388 405
 wrapped in a <a href="https://rdrr.io/bioc/SingleCellExperiment/man/SingleCellExperiment.html" class="external-link">SingleCellExperiment</a>
389 406
 object. Refer to argument <code>useSCERef</code> and
390 407
Binary files a/docs/articles/cell_type_labeling_files/figure-html/visualization-1.png and b/docs/articles/cell_type_labeling_files/figure-html/visualization-1.png differ
... ...
@@ -62,7 +62,9 @@ There are 6 basic widgets that users need to work with before reaching to the re
62 62
 
63 63
 6. **Label** - The button to trigger the algorithm. Click on this to run the cell type labeling process. 
64 64
 
65
-The result will not be pop out directly, but three levels of cell annotation will be inserted to the background object. They will all have the same prefix as `"SingleR_{reference abbr}_{annotation level}_"`, then `"score"`, `"first.labels"`, `"labels"` and `"pruned.labels"`, respectively. `"first.labels"` refers to the labeling initially indicated by the scores, `"labels"` is fine-tuned, and `"pruned.labels"` is the pruned result.  
65
+The result will not be pop out directly, but three levels of cell annotation will be inserted to the background object. They will all have the same prefix as `"SingleR_{reference abbr}_{annotation level}_"`, then `"score"`, `"labels"`, `"delta.next"` and `"pruned.labels"`, respectively. `"labels"` contains the predicted label, basing only on the maximum entry in scores. `"delta.next"` contains difference between the best and next-best score. `"pruned.labels"` contains predictions where "low-quality" labels are replaced with `NA`s. 
66
+
67
+> With older versions of SingleR, the output variables ends with `"score"`, `"first.labels"`, `"labels"` and `"pruned.labels"`, respectively. `"first.labels"` refers to the labeling initially indicated by the scores, `"labels"` is fine-tuned, and `"pruned.labels"` is the pruned result.  
66 68
 
67 69
 **Visualization**
68 70
 
... ...
@@ -96,6 +98,8 @@ sce <- runSingleR(inSCE = sce, useAssay = "logcounts", useBltinRef = "hpca", lev
96 98
 
97 99
 Four results from SingleR will be stored in `colData()` slot with the same prefix as `"SingleR_{reference abbr}_{annotation level}_"`, then `"score"`, `"labels"`, `"delta.next"` and `"pruned.labels"`, respectively. `"labels"` contains the predicted label, basing only on the maximum entry in scores. `"delta.next"` contains difference between the best and next-best score. `"pruned.labels"` contains predictions where "low-quality" labels are replaced with `NA`s. 
98 100
 
101
+> With older versions of SingleR, the output variables ends with `"score"`, `"first.labels"`, `"labels"` and `"pruned.labels"`, respectively. `"first.labels"` refers to the labeling initially indicated by the scores, `"labels"` is fine-tuned, and `"pruned.labels"` is the pruned result.  
102
+
99 103
 Besides, users can also use their own labeled reference datasets wrapped in a [SingleCellExperiment](https://rdrr.io/bioc/SingleCellExperiment/man/SingleCellExperiment.html) object. Refer to argument `useSCERef` and `labelColName`. Additionally, the labeling can also be done on cluster label if users have already performed clustering on their dataset and have the result stored in `colData()` slot. Refer to argument `labelByCluster`.  
100 104
 
101 105
 **Visualization**