Skip to content

Commit bd204e1

Browse files
committed
updates to DEG Vignette
1 parent 7eb1190 commit bd204e1

3 files changed

Lines changed: 27 additions & 13 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Imports:
8484
rlang (>= 1.0.6),
8585
scales,
8686
scDblFinder (== 1.8.0),
87-
Seurat (== 4.1.1),
87+
Seurat (>= 4.1.1),
8888
SeuratObject (== 4.1.1),
8989
SingleR (>= 1.8.1),
9090
statmod (>= 1.4.37),

_pkgdown.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ url: https://nidap-community.github.io/SCWorkflow/
22
template:
33
bootstrap: 5
44
bslib:
5-
bootswatch: yeti
65
primary: "#296b7f"
76
secondary: "#7cc349"
87
base_font: {google: "Roboto"}

vignettes/SCWorkflow-DEG.Rmd

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ knitr::opts_chunk$set(
1616
warning = FALSE, message = FALSE
1717
)
1818
19+
library(Seurat)
1920
library(data.table)
2021
library(dplyr)
2122
library(ggplot2)
@@ -25,12 +26,10 @@ run_Chunks=F
2526

2627
```{r,include=F,echo=F,eval=run_Chunks}
2728
28-
Anno_SO=readRDS("./images/Anno_SO.rds")
29+
Anno_SO=readRDS("./images/CN_SO.rds")
2930
3031
```
3132

32-
33-
3433
## DE with Find Markers
3534

3635
This function performs a DE (differential expression) analysis on a merged Seurat object to identify expression markers between different groups of cells (contrasts). This analysis uses the FindMarkers() function of the Seurat Workflow.
@@ -41,14 +40,30 @@ This function takes a merged Seurat object [1] as input, expected to contain sin
4140
For best results, it is recommended to use this function with well-curated and preprocessed single-cell data, ensuring that the Seurat object contains relevant metadata and SingleR annotations. Users should carefully select the samples and contrasts based on their experimental design and research questions. Additionally, exploring different statistical algorithms and adjusting the threshold can fine-tune the DEG analysis and reveal more accurate gene expression markers.
4241

4342
```{r,eval=run_Chunks}
44-
DEG_SO=degGeneExpressionMarkers(object = Anno_SO$object,
45-
samples = c("PBS","ENT","NHSIL12","Combo","CD8dep" ),
46-
contrasts = c("0-1","0-all"),
47-
parameter.to.test = "SCT_snn_res_2_8",
48-
test.to.use = test_to_use,
49-
log.fc.threshold = log_fc_threshold,
50-
use.spark = use_spark,
51-
assay.to.use = assay_to_use)
43+
44+
45+
DEG_table=degGeneExpressionMarkers(object = Anno_SO,
46+
samples = c("CD8dep","Combo","ENT","NHSIL12","PBS"),
47+
contrasts = c("0-1"),
48+
parameter.to.test = "SCT_snn_res_0_2",
49+
test.to.use = "MAST",
50+
log.fc.threshold = 0.25,
51+
assay.to.use = "SCT",
52+
use.spark = F)
53+
54+
```
55+
```{r}
56+
if (eval_chunk==T) {
57+
write.table(DEG_table$df ,
58+
file = "./images/DEG_Table.txt",
59+
sep = '\t',
60+
row.names = F)
61+
}else{
62+
DEG_table=read.delim("./images/DEG_Table.txt")
63+
}
64+
65+
DEG_table%>%knitr::kable()
66+
5267
```
5368

5469
1. https://satijalab.org/seurat/

0 commit comments

Comments
 (0)