Skip to content

Commit

Permalink
Update DESeq2 configuration file to include rjson package and output …
Browse files Browse the repository at this point in the history
…size factors
  • Loading branch information
alsmith151 committed Mar 21, 2024
1 parent 2ad91f0 commit c7eb167
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion seqnado/workflow/config/deseq2.qmd.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ suppressPackageStartupMessages(library(clusterProfiler))
suppressPackageStartupMessages(library(org.Hs.eg.db))
suppressPackageStartupMessages(library(msigdbr))
suppressPackageStartupMessages(library(fgsea))
suppressPackageStartupMessages(library(rjson))
```

# Background {.tabset}
Expand Down Expand Up @@ -116,13 +117,16 @@ dds <- DESeq(dds, quiet = T)
if (nrow(counts) > 1000){
vst <- suppressMessages(vst(dds))
} else {
vst <- VarianceStabilizingTransformation(dds)
vst <- varianceStabilizingTransformation(dds)
}

res_names <- resultsNames(dds)[-1]
res <- results(dds, name = res_names)

# Output size factors

size_factors <- colData(dds)[, "sizeFactor"]
names(size_factors) <- colData(dds)[, "sample"]
sf <- toJSON(size_factors)
writeLines(sf, "all_spikein_factors.json")

Expand Down

0 comments on commit c7eb167

Please sign in to comment.