Skip to content

Commit af4b51a

Browse files
committed
move limma to suggestions
1 parent 4a35bd4 commit af4b51a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

DESCRIPTION

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Suggests:
2525
rmarkdown,
2626
ggrepel,
2727
Seurat,
28+
limma,
2829
GEOquery,
2930
fgsea,
3031
edgeR,

NAMESPACE

-1
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,4 @@ import(graphics)
4141
import(stats)
4242
import(utils)
4343
importFrom(data.table,data.table)
44-
importFrom(limma,makeContrasts)
4544
importFrom(utils,download.file)

R/limma.R

+5-2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ dprocess_dgeList <- function(x, group.column, min.count = 10) {
8383
lcpm <- edgeR::cpm(x, log = TRUE)
8484
boxplot(lcpm, las = 2)
8585
title("Normalized data")
86+
87+
if (requireNamespace("limma", quietly = TRUE)) {
88+
stop("To plot MDS plot, 'plotMDS' requires 'limma' package which cannot be found. Please install 'limma' using 'BiocManager::install('limma')'")
89+
}
8690
limma::plotMDS(lcpm,
8791
label = x$samples[[group.column]],
8892
col = as.integer((x$samples[[group.column]])), dim = c(1, 2)
@@ -106,14 +110,13 @@ dprocess_dgeList <- function(x, group.column, min.count = 10) {
106110
#' @return An `eBayes` object containing the fitted linear model and
107111
#' results of the differential expression analysis.
108112
#' @import data.table
109-
#' @importFrom limma makeContrasts
110113
#' @export
111114
limmaFit <- function(x, group.column) {
112115
oldpar <- par(no.readonly = TRUE)
113116
on.exit(par(oldpar))
114117

115118
if (!requireNamespace("limma", quietly = TRUE)) {
116-
stop("To fit linear model, limmaFit) requires 'limma' package which cannot be found. Please install 'limma' using 'BiocManager::install('limma')'.")
119+
stop("To fit linear model, 'limmaFit' requires 'limma' package which cannot be found. Please install 'limma' using 'BiocManager::install('limma')'.")
117120
}
118121
makeContrasts <- limma::makeContrasts()
119122

0 commit comments

Comments
 (0)