Skip to content

Commit

Permalink
Limma voom nf-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KamilMaliszArdigen committed Oct 14, 2024
1 parent 2dcfb12 commit f557caa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
9 changes: 2 additions & 7 deletions modules/nf-core/limma/differential/environment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
channels:
- conda-forge
- bioconda
- bioconda
dependencies:
- bioconda::bioconductor-edger=4.0.16
- bioconda::bioconductor-ihw=1.28.0
- bioconda::bioconductor-limma=3.58.1
- conda-forge::r-dplyr=1.1.4
- conda-forge::r-readr=2.1.5
- bioconductor-limma:3.54.0
2 changes: 1 addition & 1 deletion modules/nf-core/limma/differential/templates/limma_de.R
Original file line number Diff line number Diff line change
Expand Up @@ -409,4 +409,4 @@ writeLines(
################################################
################################################
################################################
################################################
################################################
14 changes: 7 additions & 7 deletions modules/nf-core/limma/differentialvoom/templates/limma_de.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ if (opt\$analysis_type == "pairwise") {
normalized_counts_with_genes <- data.frame(Gene = rownames(normalized_counts), normalized_counts, row.names = NULL)
colnames(normalized_counts_with_genes)[1] <- opt\$probe_id_col
write.table(normalized_counts_with_genes,
file = paste(opt\$output_prefix, "normalised_counts.tsv", sep = '.'),
sep = "\t",
quote = FALSE,
row.names = FALSE)
file = paste(opt\$output_prefix, "normalised_counts.tsv", sep = '.'),
sep = "\t",
quote = FALSE,
row.names = FALSE)

lmfit_args = list(object = voom_1, design = design)
fit <- do.call(lmFit, lmfit_args)
Expand All @@ -266,7 +266,7 @@ if (opt\$analysis_type == "pairwise") {
reference_level <- make.names(opt\$reference_level)
target_level <- make.names(opt\$target_level)
sample.sheet[[contrast_variable]] = paste(sample.sheet[[strsplit2(contrast_variable, split = "\\\\.")[1]]],
sample.sheet[[strsplit2(contrast_variable, split = "\\\\.")[2]]], sep = ".")
sample.sheet[[strsplit2(contrast_variable, split = "\\\\.")[2]]], sep = ".")

validate_sample_sheet(sample.sheet, contrast_variable, reference_level, target_level, opt\$blocking_variables)

Expand Down Expand Up @@ -358,10 +358,10 @@ if (opt\$IHW_correction) {
select(Gene, everything()) # Move 'Gene' column to the front

} else {
toptable_args <- list(fit = fit, number = opt\$number, adjust.method = opt\$adjust.method,
toptable_args <- list(fit = fit, number = opt\$number, adjust.method = opt\$adjust.method,
p.value = opt\$p.value, lfc = opt\$lfc, confint = opt\$confint)

comp.results <- do.call(topTable,toptable_args)
comp.results <- do.call(topTable,toptable_args)
}

names(comp.results)[names(comp.results) == 'Gene'] <- opt\$probe_id_col
Expand Down

0 comments on commit f557caa

Please sign in to comment.