changeset 9:69f5c4d6e6bd draft

planemo upload for repository https://github.com/igg-molecular-biology-lab/pipe-t.git commit 7664e4dc44eb4f141ffd01627ee66858cc9887ff
author davidecangelosi
date Fri, 10 May 2019 10:49:09 -0400
parents e5953805ad7a
children bc5697f41720
files pipe-t.R pipe-t.xml
diffstat 2 files changed, 248 insertions(+), 62 deletions(-) [+]
line wrap: on
line diff
--- a/pipe-t.R	Tue May 07 06:05:32 2019 -0400
+++ b/pipe-t.R	Fri May 10 10:49:09 2019 -0400
@@ -47,49 +47,147 @@
 x<-args[9]
 normalizationMethod<-args[10]
 if (normalizationMethod=="deltaCt") {
-    normalizers<-args[11]
-    outputNorm<-args[12]
-    outputECDF<-args[13]
-    percentofnastoremove<-args[14]
-    outputRemaining<-args[15]
-    imputeMethod<-args[16]
-    if (imputeMethod=="knn") {
-      kappa<- args[17]
-      macsp<-args[18]
-      outputIMP<-args[19]
+    submethod<-args[11]
+  switch(submethod,
+      "userdefined"={
+        normalizers<-args[12]
+        outputNorm<-args[13]
+        outputECDF<-args[14]
+        percentofnastoremove<-args[15]
+        outputRemaining<-args[16]
+        imputeMethod<-args[17]
+        if (imputeMethod=="knn") {
+          kappa<- args[18]
+          macsp<-args[19]
+          outputIMP<-args[20]
 
-      DEAMethod<-args[20]
-      if (DEAMethod=="ttest") {
-          alternative<- args[21]
-          paired<-args[22]
-          replicates<- args[23]
-          sort<-args[24]
-          stringent<- args[25]
-          padjust<-args[26]
-          outputDEA<-args[27]
-          filtnames<-args[28]
+          DEAMethod<-args[21]
+          if (DEAMethod=="ttest") {
+              alternative<- args[22]
+              paired<-args[23]
+              replicates<- args[24]
+              sort<-args[25]
+              stringent<- args[26]
+              padjust<-args[27]
+              outputDEA<-args[28]
+              filtnames<-args[29]
+            } else {
+              outputDEA<-args[22]
+              filtnames<-args[23]
+            }
         } else {
-          outputDEA<-args[21]
-          filtnames<-args[22]
+          #mean, median, nondetects, cubic
+            outputIMP<-args[18]
+            DEAMethod<-args[19]
+            if (DEAMethod=="ttest") {
+                alternative<- args[20]
+                paired<-args[21]
+                replicates<- args[22]
+                sort<-args[23]
+                stringent<- args[24]
+                padjust<-args[25]
+                outputDEA<-args[26]
+                filtnames<-args[27]
+              } else {
+                outputDEA<-args[20]
+                filtnames<-args[21]
+              }
         }
-    } else {
-      #mean, median, nondetects, cubic 
-        outputIMP<-args[17]
-        DEAMethod<-args[18]
-        if (DEAMethod=="ttest") {
-            alternative<- args[19]
-            paired<-args[20]
-            replicates<- args[21]
-            sort<-args[22]
-            stringent<- args[23]
-            padjust<-args[24]
-            outputDEA<-args[25]
-            filtnames<-args[26]
-          } else {
-            outputDEA<-args[19]
-            filtnames<-args[20]
-          }
-    }
+      },
+      "genorm"={
+        user_number<-as.numeric(args[12])
+        outputNorm<-args[13]
+        outputECDF<-args[14]
+        percentofnastoremove<-args[15]
+        outputRemaining<-args[16]
+        imputeMethod<-args[17]
+        if (imputeMethod=="knn") {
+          kappa<- args[18]
+          macsp<-args[19]
+          outputIMP<-args[20]
+
+          DEAMethod<-args[21]
+          if (DEAMethod=="ttest") {
+              alternative<- args[22]
+              paired<-args[23]
+              replicates<- args[24]
+              sort<-args[25]
+              stringent<- args[26]
+              padjust<-args[27]
+              outputDEA<-args[28]
+              filtnames<-args[29]
+            } else {
+              outputDEA<-args[22]
+              filtnames<-args[23]
+            }
+        } else {
+          #mean, median, nondetects, cubic
+            outputIMP<-args[18]
+            DEAMethod<-args[19]
+            if (DEAMethod=="ttest") {
+                alternative<- args[20]
+                paired<-args[21]
+                replicates<- args[22]
+                sort<-args[23]
+                stringent<- args[24]
+                padjust<-args[25]
+                outputDEA<-args[26]
+                filtnames<-args[27]
+              } else {
+                outputDEA<-args[20]
+                filtnames<-args[21]
+              }
+        }
+
+      },
+      "normfinder"={
+        user_number<-as.numeric(args[12])
+        outputNorm<-args[13]
+        outputECDF<-args[14]
+        percentofnastoremove<-args[15]
+        outputRemaining<-args[16]
+        imputeMethod<-args[17]
+        if (imputeMethod=="knn") {
+          kappa<- args[18]
+          macsp<-args[19]
+          outputIMP<-args[20]
+
+          DEAMethod<-args[21]
+          if (DEAMethod=="ttest") {
+              alternative<- args[22]
+              paired<-args[23]
+              replicates<- args[24]
+              sort<-args[25]
+              stringent<- args[26]
+              padjust<-args[27]
+              outputDEA<-args[28]
+              filtnames<-args[29]
+            } else {
+              outputDEA<-args[22]
+              filtnames<-args[23]
+            }
+        } else {
+          #mean, median, nondetects, cubic
+            outputIMP<-args[18]
+            DEAMethod<-args[19]
+            if (DEAMethod=="ttest") {
+                alternative<- args[20]
+                paired<-args[21]
+                replicates<- args[22]
+                sort<-args[23]
+                stringent<- args[24]
+                padjust<-args[25]
+                outputDEA<-args[26]
+                filtnames<-args[27]
+              } else {
+                outputDEA<-args[20]
+                filtnames<-args[21]
+              }
+        }
+
+      },
+      stop("Enter something that switches me!")
+  )
   }else {
     outputNorm<-args[11]
     outputECDF<-args[12]
@@ -649,7 +747,27 @@
 
 switch(normalizationMethod,
     "deltaCt"={
-      normalizedDataset <- normalizeCtDataDav(xFilter, norm="deltaCt",  deltaCt.genes =explode(normalizers, sep = ","))
+      delete.na <- function(DF, n=0) {
+        DF[rowSums(is.na(DF)) <= n,]
+      }
+      switch(submethod,
+          "userdefined"={
+            normalizedDataset <- normalizeCtDataDav(xFilter, norm="deltaCt",  deltaCt.genes =explode(normalizers, sep = ","))
+          },
+          "genorm"={
+            library(NormqPCR)
+            genorm <- selectHKs(t(delete.na(as.matrix(exprs(xFilter)),0)), method = "geNorm", Symbols = rownames(as.matrix(delete.na(exprs(xFilter),0))), minNrHK = as.numeric(user_number), trace=TRUE, log = TRUE)
+            genorm
+            normalizedDataset <- normalizeCtDataDav(xFilter, norm="deltaCt",  deltaCt.genes =genorm$ranking[1:length(genorm$meanM[genorm$meanM<1.5])])
+          },
+          "normfinder"={
+            library(NormqPCR)
+            normfinder <- selectHKs(as.matrix(t(delete.na(exprs(xFilter),0))), group= files$Treatment , method = "NormFinder", Symbols =rownames(as.matrix(delete.na(exprs(xFilter),0))), minNrHK = as.numeric(user_number),  trace=TRUE, log = TRUE)
+            normfinder
+            normalizedDataset <- normalizeCtDataDav(xFilter, norm="deltaCt",  deltaCt.genes =normfinder$ranking)
+          },
+          stop("Enter something that switches me!")
+      )
     },
     "quantile"={
       normalizedDataset <- normalizeCtDataDav(xFilter, norm=normalizationMethod)
--- a/pipe-t.xml	Tue May 07 06:05:32 2019 -0400
+++ b/pipe-t.xml	Fri May 10 10:49:09 2019 -0400
@@ -12,6 +12,7 @@
 <requirement type="package" version="1.8_3">r-zoo</requirement>
 <requirement type="package" version="2.10.0">bioconductor-nondetects</requirement>
 <requirement type="package" version="4.1_1">r-hmisc</requirement>
+<requirement type="package" version="1.28.0">bioconductor-normqpcr </requirement>
 </requirements>
 <stdio>
    <exit_code range="1:" />
@@ -23,29 +24,82 @@
     #end for
 
     #if str( $dn.condNorm.normMethod ) == "deltaCt":
-      #if str( $df.condImpute.format ) == "mestdagh" or str( $df.condImpute.format ) == "mean" or str( $df.condImpute.format ) == "median" or str( $df.condImpute.format ) == "nondetects" or str( $df.condImpute.format ) == "cubic": 
-          #if str( $de.condDEA.method ) == "ttest":
-              Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.normalizers" $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $de.condDEA.alternative $de.condDEA.paired $de.condDEA.replicates $de.condDEA.sort $de.condDEA.stringent $de.condDEA.padjust $galaxy_output7 "$df.filtname";
+        #if str( $dn.condNorm.deltamethod.format ) == "userdefined":
+          #if str( $df.condImpute.format ) == "mestdagh" or str( $df.condImpute.format ) == "mean" or str( $df.condImpute.format ) == "median" or str( $df.condImpute.format ) == "nondetects" or str( $df.condImpute.format ) == "cubic":
+              #if str( $de.condDEA.method ) == "ttest":
+                  Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" "$dn.condNorm.deltamethod.normalizers" $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $de.condDEA.alternative $de.condDEA.paired $de.condDEA.replicates $de.condDEA.sort $de.condDEA.stringent $de.condDEA.padjust $galaxy_output7 "$df.filtname";
+              #end if
+              #if str( $de.condDEA.method ) == "rp":
+                  Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" "$dn.condNorm.deltamethod.normalizers"  $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+              #end if
+              #if str( $de.condDEA.method ) == "none":
+                  Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" "$dn.condNorm.deltamethod.normalizers"  $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+              #end if
           #end if
-          #if str( $de.condDEA.method ) == "rp":
-              Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.normalizers" $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+
+          #if str( $df.condImpute.format ) == "knn":
+              #if str( $de.condDEA.method ) == "ttest":
+                    Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" "$dn.condNorm.deltamethod.normalizers"  $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $de.condDEA.alternative $de.condDEA.paired $de.condDEA.replicates $de.condDEA.sort $de.condDEA.stringent $de.condDEA.padjust $galaxy_output7 "$df.filtname";
+              #end if
+              #if str( $de.condDEA.method ) == "rp":
+                    Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" "$dn.condNorm.deltamethod.normalizers"  $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+              #end if
+               #if str( $de.condDEA.method ) == "none":
+                    Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" "$dn.condNorm.deltamethod.normalizers" $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+              #end if
           #end if
-          #if str( $de.condDEA.method ) == "none":
-              Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.normalizers" $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
-          #end if
-      #end if
+        #end if
+        #if str( $dn.condNorm.deltamethod.format ) == "genorm":
+            #if str( $df.condImpute.format ) == "mestdagh" or str( $df.condImpute.format ) == "mean" or str( $df.condImpute.format ) == "median" or str( $df.condImpute.format ) == "nondetects" or str( $df.condImpute.format ) == "cubic":
+                #if str( $de.condDEA.method ) == "ttest":
+                    Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhkgenorm $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $de.condDEA.alternative $de.condDEA.paired $de.condDEA.replicates $de.condDEA.sort $de.condDEA.stringent $de.condDEA.padjust $galaxy_output7 "$df.filtname";
+                #end if
+                #if str( $de.condDEA.method ) == "rp":
+                    Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhkgenorm $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+                #end if
+                #if str( $de.condDEA.method ) == "none":
+                    Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhkgenorm  $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+                #end if
+            #end if
 
-      #if str( $df.condImpute.format ) == "knn":
-          #if str( $de.condDEA.method ) == "ttest":
-                Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.normalizers" $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $de.condDEA.alternative $de.condDEA.paired $de.condDEA.replicates $de.condDEA.sort $de.condDEA.stringent $de.condDEA.padjust $galaxy_output7 "$df.filtname";
+            #if str( $df.condImpute.format ) == "knn":
+                #if str( $de.condDEA.method ) == "ttest":
+                      Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhkgenorm  $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $de.condDEA.alternative $de.condDEA.paired $de.condDEA.replicates $de.condDEA.sort $de.condDEA.stringent $de.condDEA.padjust $galaxy_output7 "$df.filtname";
+                #end if
+                #if str( $de.condDEA.method ) == "rp":
+                      Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhkgenorm  $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+                #end if
+                 #if str( $de.condDEA.method ) == "none":
+                      Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhkgenorm $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+                #end if
+            #end if
           #end if
-          #if str( $de.condDEA.method ) == "rp":
-                Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.normalizers" $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
-          #end if
-           #if str( $de.condDEA.method ) == "none":
-                Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.normalizers" $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
-          #end if
-      #end if
+          #if str( $dn.condNorm.deltamethod.format ) == "normfinder":
+              #if str( $df.condImpute.format ) == "mestdagh" or str( $df.condImpute.format ) == "mean" or str( $df.condImpute.format ) == "median" or str( $df.condImpute.format ) == "nondetects" or str( $df.condImpute.format ) == "cubic":
+                  #if str( $de.condDEA.method ) == "ttest":
+                      Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhknormfinder $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $de.condDEA.alternative $de.condDEA.paired $de.condDEA.replicates $de.condDEA.sort $de.condDEA.stringent $de.condDEA.padjust $galaxy_output7 "$df.filtname";
+                  #end if
+                  #if str( $de.condDEA.method ) == "rp":
+                      Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhknormfinder $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+                  #end if
+                  #if str( $de.condDEA.method ) == "none":
+                      Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhknormfinder $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+                  #end if
+              #end if
+
+              #if str( $df.condImpute.format ) == "knn":
+                  #if str( $de.condDEA.method ) == "ttest":
+                        Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhknormfinder  $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $de.condDEA.alternative $de.condDEA.paired $de.condDEA.replicates $de.condDEA.sort $de.condDEA.stringent $de.condDEA.padjust $galaxy_output7 "$df.filtname";
+                  #end if
+                  #if str( $de.condDEA.method ) == "rp":
+                        Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhknormfinder  $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+                  #end if
+                   #if str( $de.condDEA.method ) == "none":
+                        Rscript $__tool_directory__/pipe-t.R $dp.files "$dp.formatFile" $dp.n $galaxy_output1 "$__tool_directory__/Symlink" $dc.Ctmin $dc.Ctmax $dc.flag $galaxy_output2 $dn.condNorm.normMethod "$dn.condNorm.deltamethod.format" $dn.condNorm.deltamethod.minhknormfinder $galaxy_output3 $galaxy_output4 $df.percent $galaxy_output5 $df.condImpute.format $df.condImpute.k $df.condImpute.maxp $galaxy_output6 $de.condDEA.method $galaxy_output7 "$df.filtname";
+                  #end if
+              #end if
+            #end if
+
     #else
       #if str( $df.condImpute.format ) == "mestdagh" or str( $df.condImpute.format ) == "mean" or str( $df.condImpute.format ) == "median" or str( $df.condImpute.format ) == "nondetects" or str( $df.condImpute.format ) == "cubic":
           #if str( $de.condDEA.method ) == "ttest":
@@ -110,8 +164,22 @@
       <option value="scale.rankinvariant">Scale rank invariant</option>
     </param>
     <when value="deltaCt">
-      <param name="normalizers" type="text" label="Type a comma separated list of housekeeping transcript identifiers that will be used as normalizers." value="U6 snRNA-001973">
-      	  </param>
+       <conditional name="deltamethod">
+        <param name="format" type="select"  label="Select one of the methods from the list below for selecting normalizers." help="">
+          <option value="userdefined" selected="true">User defined</option>
+          <option value="genorm">geNorm</option>
+          <option value="normfinder">NormFinder</option>
+        </param>
+        <when value="userdefined">
+          <param name="normalizers" type="text" label="Type a comma separated list of housekeeping transcript identifiers that will be used as normalizers." value="U6 snRNA-001973"></param>
+        </when>
+        <when value="genorm">
+          <param name="minhkgenorm" type="integer" label="Type the minimum number of housekeeping transcripts that should be considered." value="2"></param>
+        </when>
+        <when value="normfinder">
+          <param name="minhknormfinder" type="integer" label="Type the minimum number of housekeeping transcripts that should be considered." value="1"></param>
+        </when>
+        </conditional>
     </when>
   </conditional>
 </section>