Mercurial > repos > iuc > dexseq
diff 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 |
line wrap: on
line diff
--- a/plotdexseq.R Tue Apr 04 08:25:36 2023 +0000 +++ b/plotdexseq.R Fri Jan 31 18:00:29 2025 +0000 @@ -14,8 +14,8 @@ options(stringAsfactors = FALSE, useFancyQuotes = FALSE) args <- commandArgs(trailingOnly = TRUE) -#get options, using the spec as defined by the enclosed list. -#we read the options from the default: commandArgs(TRUE). +# get options, using the spec as defined by the enclosed list. +# we read the options from the default: commandArgs(TRUE). spec <- matrix(c( "rdata", "r", 1, "character", "primaryfactor", "p", 1, "character", @@ -25,7 +25,9 @@ "transcripts", "t", 1, "logical", "names", "a", 1, "logical", "normcounts", "n", 1, "logical", - "splicing", "s", 1, "logical" + "splicing", "s", 1, "logical", + "pl_width", "w", 2, "integer", + "pl_height", "h", 2, "integer" ), byrow = TRUE, ncol = 4) opt <- getopt(spec) @@ -38,12 +40,18 @@ genes <- opt$geneid } -pdf("plot.pdf") +pl_width <- pl_height <- 7 +if (!is.null(opt$pl_width)) pl_width <- opt$pl_width +if (!is.null(opt$pl_height)) pl_height <- opt$pl_height +pdf("plot.pdf", width = pl_width, height = pl_height) for (i in genes) { - plotDEXSeq(res, i, FDR = opt$fdr, fitExpToVar = opt$primaryfactor, + par(oma = c(pl_height * 0.2, pl_width * 0.2, pl_height * 0.2, pl_width * 0.2)) + plotDEXSeq(res, i, + FDR = opt$fdr, fitExpToVar = opt$primaryfactor, norCounts = opt$normcounts, expression = TRUE, splicing = opt$splicing, displayTranscripts = opt$transcripts, names = opt$names, legend = TRUE, - color = NULL, color.samples = NULL, transcriptDb = NULL) + color = NULL, color.samples = NULL, transcriptDb = NULL + ) } dev.off()