Mercurial > repos > iuc > limma_voom
comparison limma_voom.R @ 19:c9c6427edfe9 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4c0406815cb76175d7d90b2874310635694126f5
author | iuc |
---|---|
date | Tue, 28 May 2019 10:04:10 -0400 |
parents | 97e06a4c7c75 |
children | 0921444c832d |
comparison
equal
deleted
inserted
replaced
18:97e06a4c7c75 | 19:c9c6427edfe9 |
---|---|
7 # filesPath", "j", 2, "character" -JSON list object if multiple files input | 7 # filesPath", "j", 2, "character" -JSON list object if multiple files input |
8 # matrixPath", "m", 2, "character" -Path to count matrix | 8 # matrixPath", "m", 2, "character" -Path to count matrix |
9 # factFile", "f", 2, "character" -Path to factor information file | 9 # factFile", "f", 2, "character" -Path to factor information file |
10 # factInput", "i", 2, "character" -String containing factors if manually input | 10 # factInput", "i", 2, "character" -String containing factors if manually input |
11 # annoPath", "a", 2, "character" -Path to input containing gene annotations | 11 # annoPath", "a", 2, "character" -Path to input containing gene annotations |
12 # contrastData", "C", 1, "character" -String containing contrasts of interest | 12 # contrastFile", "C", 1, "character" -Path to contrasts information file |
13 # contrastInput", "D", 1, "character" -String containing contrasts of interest | |
13 # cpmReq", "c", 2, "double" -Float specifying cpm requirement | 14 # cpmReq", "c", 2, "double" -Float specifying cpm requirement |
14 # cntReq", "z", 2, "integer" -Integer specifying minimum total count requirement | 15 # cntReq", "z", 2, "integer" -Integer specifying minimum total count requirement |
15 # sampleReq", "s", 2, "integer" -Integer specifying cpm requirement | 16 # sampleReq", "s", 2, "integer" -Integer specifying cpm requirement |
16 # normCounts", "x", 0, "logical" -String specifying if normalised counts should be output | 17 # normCounts", "x", 0, "logical" -String specifying if normalised counts should be output |
17 # rdaOpt", "r", 0, "logical" -String specifying if RData should be output | 18 # rdaOpt", "r", 0, "logical" -String specifying if RData should be output |
159 "filesPath", "j", 2, "character", | 160 "filesPath", "j", 2, "character", |
160 "matrixPath", "m", 2, "character", | 161 "matrixPath", "m", 2, "character", |
161 "factFile", "f", 2, "character", | 162 "factFile", "f", 2, "character", |
162 "factInput", "i", 2, "character", | 163 "factInput", "i", 2, "character", |
163 "annoPath", "a", 2, "character", | 164 "annoPath", "a", 2, "character", |
164 "contrastData", "C", 1, "character", | 165 "contrastFile", "C", 1, "character", |
166 "contrastInput", "D", 1, "character", | |
165 "cpmReq", "c", 1, "double", | 167 "cpmReq", "c", 1, "double", |
166 "totReq", "y", 0, "logical", | 168 "totReq", "y", 0, "logical", |
167 "cntReq", "z", 1, "integer", | 169 "cntReq", "z", 1, "integer", |
168 "sampleReq", "s", 1, "integer", | 170 "sampleReq", "s", 1, "integer", |
169 "filtCounts", "F", 0, "logical", | 171 "filtCounts", "F", 0, "logical", |
341 } | 343 } |
342 | 344 |
343 #Create output directory | 345 #Create output directory |
344 dir.create(opt$outPath, showWarnings=FALSE) | 346 dir.create(opt$outPath, showWarnings=FALSE) |
345 | 347 |
346 # Split up contrasts seperated by comma into a vector then sanitise | 348 # Process contrasts |
347 contrastData <- unlist(strsplit(opt$contrastData, split=",")) | 349 if (is.null(opt$contrastInput)) { |
350 contrastData <- read.table(opt$contrastFile, header=TRUE, sep="\t", quote= "", strip.white=TRUE, stringsAsFactors=FALSE) | |
351 contrastData <- contrastData[, 1, drop=TRUE] | |
352 } else { | |
353 # Split up contrasts seperated by comma into a vector then sanitise | |
354 contrastData <- unlist(strsplit(opt$contrastInput, split=",")) | |
355 } | |
356 | |
357 # in case input groups start with numbers this will make the names valid R names, required for makeContrasts | |
348 contrastData <- sanitiseEquation(contrastData) | 358 contrastData <- sanitiseEquation(contrastData) |
349 contrastData <- gsub(" ", ".", contrastData, fixed=TRUE) | 359 contrastData <- gsub(" ", ".", contrastData, fixed=TRUE) |
350 # in case input groups start with numbers this will make the names valid R names, required for makeContrasts | |
351 cons <- NULL | 360 cons <- NULL |
352 for (i in contrastData) { | 361 for (i in contrastData) { |
353 i <- strsplit(i, split="-") | 362 i <- strsplit(i, split="-") |
354 i <- lapply(i, make.names) | 363 i <- lapply(i, make.names) |
355 i <- lapply(i, paste, collapse="-") | 364 i <- lapply(i, paste, collapse="-") |