Skip to content

Commit

Permalink
Removed all the glimma stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Leary committed Oct 22, 2021
1 parent 8a459ab commit fd84c58
Showing 1 changed file with 0 additions and 71 deletions.
71 changes: 0 additions & 71 deletions R/app-deseq2TwoGroups.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,77 +41,6 @@ ezMethodDeseq2 = function(input=NA, output=NA, param=NA){
row.names = rownames(deResult),
check.names = FALSE)

glimmaResults <- list()
glimmaResults[["res"]] <- results(
object = dds,
contrast = c("grouping", param$sampleGroup, param$refGroup))
glimmaResults[["status"]] <- as.numeric(
glimmaResults[["res"]]$pvalue < param$pValueHighlightThresh &
abs(glimmaResults[["res"]]$log2FoldChange) > param$log2RatioHighlightThresh)
glimmaResults[["counts"]] <- as.data.frame(
assay(varianceStabilizingTransformation(dds)))
if (!is.null(param$grouping2Name)) {
glimmaResults[["counts"]] <- limma::removeBatchEffect(
glimmaResults[["counts"]], dataset[[param$grouping2Name]]
)
}
glimmaResults[["samples"]] <- colnames(dds)
glimmaResults[["anno"]] <- seqAnno[, c("gene_id", "gene_name", "description")]
glimmaResults[["anno"]]$GeneID <- glimmaResults[["anno"]]$gene_id
glimmaResults[["groups"]] <- colData(dds)$grouping
glimmaResults[["resDF"]] <- as.data.frame(glimmaResults[["res"]])
glimmaResults[["resDF"]] <- glimmaResults[["resDF"]][
rownames(glimmaResults[["resDF"]]) %in%
seqAnno$gene_id[seqAnno$usedInTest == TRUE], ]
glimmaResults[["countsXY"]] <- glimmaResults[["counts"]][
rownames(glimmaResults[["counts"]]) %in%
rownames(glimmaResults[["resDF"]]), ]
glimmaResults[["statusXY"]] <- as.numeric(
glimmaResults[["resDF"]]$pvalue <
param$pValueHighlightThresh &
abs(glimmaResults[["resDF"]]$log2FoldChange) >
param$log2RatioHighlightThresh)
glimmaResults[["annoXY"]] <- glimmaResults[["anno"]][
glimmaResults[["anno"]]$gene_id %in%
rownames(glimmaResults[["resDF"]]), ]

#Glimma::glMDPlot(
# x = glimmaResults[["res"]],
# counts = glimmaResults[["counts"]],
# anno = glimmaResults[["anno"]],
# groups = glimmaResults[["groups"]],
# samples = glimmaResults[["samples"]],
# status = glimmaResults[["status"]],
# main = param$comparison,
# html = paste0(param$comparison, "_MA"),
# side.main = "gene_name",
# launch = FALSE)

#Glimma::glXYPlot(
# x = glimmaResults[["resDF"]]$log2FoldChange,
# y = -log10(glimmaResults[["resDF"]]$pvalue),
# xlab = "Log2FC",
# ylab = "-log10 p-value",
# counts = glimmaResults[["countsXY"]],
# groups = glimmaResults[["groups"]],
# samples = glimmaResults[["samples"]],
# status = glimmaResults[["statusXY"]],
# anno = glimmaResults[["annoXY"]],
# main = param$comparison,
# html = paste0(param$comparison, "_Volcano"),
# launch = FALSE)

#Glimma::glMDSPlot(
# x = glimmaResults[["counts"]],
# top = 2000,
# labels = glimmaResults[["samples"]],
# groups = glimmaResults[["groups"]],
# main = param$comparison,
# html = paste0(param$comparison, "_MDS"),
# launch = FALSE)

#system(paste0("zip -r ", param$comparison, "_glimma-plots glimma-plots"))

makeRmdReport(output=output, param=param, deResult=deResult, rmdFile="twoGroups.Rmd", reportTitle = param$comparison)
return("Success")
}
Expand Down

0 comments on commit fd84c58

Please sign in to comment.