Mercurial > repos > iuc > isoformswitchanalyzer
diff IsoformSwitchAnalyzeR.R @ 5:b3f292d9f35d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/isoformswitchanalyzer commit 7b7d9892618706dad95641831db8b9f83deb86e1
author | iuc |
---|---|
date | Fri, 02 Jun 2023 10:27:16 +0000 |
parents | 512d6462f2ce |
children |
line wrap: on
line diff
--- a/IsoformSwitchAnalyzeR.R Tue May 30 08:39:23 2023 +0000 +++ b/IsoformSwitchAnalyzeR.R Fri Jun 02 10:27:16 2023 +0000 @@ -29,10 +29,23 @@ parser$add_argument("--modeSelector") parser$add_argument("--parentDir", required = FALSE, help = "Parent directory") +parser$add_argument("--condition", + action = "append", + required = FALSE, + help = "Conditions") +parser$add_argument("--sampleID", + action = "append", + required = FALSE, + help = "SampleID") +parser$add_argument("--replicate", + action = "append", + required = FALSE, + help = "Replicates") parser$add_argument("--readLength", required = FALSE, type = "integer", help = "Read length (required for stringtie)") +parser$add_argument("--pairedSamples", action = "store_true", required = FALSE, help = "Paired samples") parser$add_argument("--annotation", required = FALSE, help = "Annotation") parser$add_argument("--stringtieAnnotation", required = FALSE, help = "Stringtie annotation") parser$add_argument("--transcriptome", required = FALSE, help = "Transcriptome") @@ -344,15 +357,22 @@ readLength = args$readLength ) + if (!args$pairedSamples) { ### Make design matrix myDesign <- data.frame( - sampleID = colnames(quantificationData$abundance)[-1], - condition = gsub( - "[[:digit:]]+", - "", - colnames(quantificationData$abundance)[-1] - ) - ) + sampleID = args$sampleID, + condition = args$condition) + } else { + myDesign <- data.frame( + sampleID = args$sampleID, + condition = args$condition, + replicate = args$replicate) + } + + comparisons <- as.data.frame(cbind( + condition_1 = myDesign$condition[1], + condition_2 = myDesign$condition[length(myDesign$condition)] + )) if (args$toolSource == "stringtie") { if (!is.null(args$stringtieAnnotation)) { @@ -365,6 +385,7 @@ isoformNtFasta = args$transcriptome, addAnnotatedORFs = FALSE, showProgress = TRUE, + comparisonsToMake = comparisons, fixStringTieAnnotationProblem = args$fixStringTieAnnotationProblem ) @@ -383,6 +404,7 @@ isoformNtFasta = args$transcriptome, isoformExonAnnoation = args$annotation, showProgress = TRUE, + comparisonsToMake = comparisons, fixStringTieAnnotationProblem = args$fixStringTieAnnotationProblem ) } @@ -395,7 +417,8 @@ removeNonConvensionalChr = args$removeNonConvensionalChr, isoformExonAnnoation = args$annotation, isoformNtFasta = args$transcriptome, - showProgress = TRUE + showProgress = TRUE, + comparisonsToMake = comparisons ) }