Mercurial > repos > iuc > dexseq
comparison plotdexseq.R @ 18:ffa256d657b2 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dexseq commit ed4091f895ae0f46323534ca42da290c6e103598
author | iuc |
---|---|
date | Fri, 31 Jan 2025 18:00:29 +0000 |
parents | d104044e4257 |
children |
comparison
equal
deleted
inserted
replaced
17:d104044e4257 | 18:ffa256d657b2 |
---|---|
12 }) | 12 }) |
13 | 13 |
14 options(stringAsfactors = FALSE, useFancyQuotes = FALSE) | 14 options(stringAsfactors = FALSE, useFancyQuotes = FALSE) |
15 args <- commandArgs(trailingOnly = TRUE) | 15 args <- commandArgs(trailingOnly = TRUE) |
16 | 16 |
17 #get options, using the spec as defined by the enclosed list. | 17 # get options, using the spec as defined by the enclosed list. |
18 #we read the options from the default: commandArgs(TRUE). | 18 # we read the options from the default: commandArgs(TRUE). |
19 spec <- matrix(c( | 19 spec <- matrix(c( |
20 "rdata", "r", 1, "character", | 20 "rdata", "r", 1, "character", |
21 "primaryfactor", "p", 1, "character", | 21 "primaryfactor", "p", 1, "character", |
22 "geneid", "g", 1, "character", | 22 "geneid", "g", 1, "character", |
23 "genefile", "f", 1, "character", | 23 "genefile", "f", 1, "character", |
24 "fdr", "c", 1, "double", | 24 "fdr", "c", 1, "double", |
25 "transcripts", "t", 1, "logical", | 25 "transcripts", "t", 1, "logical", |
26 "names", "a", 1, "logical", | 26 "names", "a", 1, "logical", |
27 "normcounts", "n", 1, "logical", | 27 "normcounts", "n", 1, "logical", |
28 "splicing", "s", 1, "logical" | 28 "splicing", "s", 1, "logical", |
29 "pl_width", "w", 2, "integer", | |
30 "pl_height", "h", 2, "integer" | |
29 ), byrow = TRUE, ncol = 4) | 31 ), byrow = TRUE, ncol = 4) |
30 opt <- getopt(spec) | 32 opt <- getopt(spec) |
31 | 33 |
32 res <- readRDS(opt$rdata) | 34 res <- readRDS(opt$rdata) |
33 | 35 |
36 genes <- genes[, 1] | 38 genes <- genes[, 1] |
37 } else { | 39 } else { |
38 genes <- opt$geneid | 40 genes <- opt$geneid |
39 } | 41 } |
40 | 42 |
41 pdf("plot.pdf") | 43 pl_width <- pl_height <- 7 |
44 if (!is.null(opt$pl_width)) pl_width <- opt$pl_width | |
45 if (!is.null(opt$pl_height)) pl_height <- opt$pl_height | |
46 pdf("plot.pdf", width = pl_width, height = pl_height) | |
42 for (i in genes) { | 47 for (i in genes) { |
43 plotDEXSeq(res, i, FDR = opt$fdr, fitExpToVar = opt$primaryfactor, | 48 par(oma = c(pl_height * 0.2, pl_width * 0.2, pl_height * 0.2, pl_width * 0.2)) |
49 plotDEXSeq(res, i, | |
50 FDR = opt$fdr, fitExpToVar = opt$primaryfactor, | |
44 norCounts = opt$normcounts, expression = TRUE, splicing = opt$splicing, | 51 norCounts = opt$normcounts, expression = TRUE, splicing = opt$splicing, |
45 displayTranscripts = opt$transcripts, names = opt$names, legend = TRUE, | 52 displayTranscripts = opt$transcripts, names = opt$names, legend = TRUE, |
46 color = NULL, color.samples = NULL, transcriptDb = NULL) | 53 color = NULL, color.samples = NULL, transcriptDb = NULL |
54 ) | |
47 } | 55 } |
48 dev.off() | 56 dev.off() |
49 | 57 |
50 sessionInfo() | 58 sessionInfo() |