changeset 9:0bff0ee0683a draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid3 commit 82a18e57158136e265a26f27feb40f8dc13437bf
author iuc
date Wed, 24 Aug 2022 18:09:06 +0000
parents f911a64454fb
children
files macros.xml macros_cheetah.xml raceid_clustering.xml scripts/cluster.R scripts/clusterinspect.R scripts/trajectoryinspect.R
diffstat 6 files changed, 72 insertions(+), 72 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Mon Dec 20 10:12:47 2021 +0000
+++ b/macros.xml	Wed Aug 24 18:09:06 2022 +0000
@@ -26,7 +26,7 @@
 }
     </token>
     <token name="@TOOL_VERSION@">0.2.3</token>
-    <token name="@VERSION_SUFFIX@">2</token>
+    <token name="@VERSION_SUFFIX@">3</token>
     <token name="@PROFILE@">21.01</token>
 
     <macro name="version_command_config" token_prog="temp" token_cheetah="temp2" token_out="2&#62; '$outlog'">
--- a/macros_cheetah.xml	Mon Dec 20 10:12:47 2021 +0000
+++ b/macros_cheetah.xml	Wed Aug 24 18:09:06 2022 +0000
@@ -104,7 +104,6 @@
 clust.clustexp\$cln = as.integer( '$clust.use.cln' )
 clust.clustexp\$clustnr = as.integer( '$clust.use.clustnr' )
 clust.clustexp\$bootnr = as.integer( '$clust.use.bootnr' )
-##clust.clustexp\$rseed = as.integer( '$clust.use.rseed' )
     #end if
 #end if
 
@@ -313,12 +312,12 @@
     <token name="@INSPECTTRAJECTORIES_CHEETAH@"><![CDATA[
 in.rdat = readRDS('${inputrds}')
 
-perform.stemID = FALSE
-perform.fateID = FALSE
-perform.fateID.sominspect = FALSE
+perform.stemid = FALSE
+perform.fateid = FALSE
+perform.fateid.sominspect = FALSE
 
 #if str($trjsid.basic.doit) == "yes"
-perform.stemID = TRUE
+perform.stemid = TRUE
 trjsid.getproj = formals(getproj)
 
 trjsid.numdiffgenes = 10
@@ -334,29 +333,29 @@
 #end if
 
 #if str($trjfid.basic.doit) == "yes":
-perform.fateID = TRUE
-trjfid.cellsfrom = formals(cellsfromtree)
-trjfid.filterset = formals(filterset)
-trjfid.getsom = formals(getsom)
-trjfid.procsom = formals(procsom)
-trjfid.plotheat = list()
+perform.fateid = TRUE
+trjfid_cellsfrom = formals(cellsfromtree)
+trjfid_filterset = formals(filterset)
+trjfid_getsom = formals(getsom)
+trjfid_procsom = formals(procsom)
+trjfid_plotheat = list()
 
-trjfid.cellsfrom\$z = string2numericvector( '$trjfid.basic.cellsfromz' )
+trjfid_cellsfrom\$z = string2numericvector( '$trjfid.basic.cellsfromz' )
     #if str($trjfid.basic.use.def) == "no":
 
-trjfid.filterset\$minexpr = as.integer( '$trjfid.basic.use.filterset_minexpr' )
-trjfid.filterset\$minnumber = as.integer( '$trjfid.basic.use.filterset_minnumber' )
-trjfid.getsom\$nb = as.numeric( '$trjfid.basic.use.getsom_nb' )
-trjfid.getsom\$alpha = as.numeric( '$trjfid.basic.use.getsom_alpha' )
-trjfid.procsom\$corthr = as.numeric( '$trjfid.basic.use.procsom_corthr' )
-trjfid.procsom\$minsom = as.integer( '$trjfid.basic.use.procsom_minsom' )
-trjfid.plotheat\$xgrid = as.logical( '$trjfid.basic.use.plotheat_xgrid' )
-trjfid.plotheat\$ygrid = as.logical( '$trjfid.basic.use.plotheat_ygrid' )
-trjfid.plotheat\$xlab = as.logical( '$trjfid.basic.use.plotheat_xlab' )
+trjfid_filterset\$minexpr = as.integer( '$trjfid.basic.use.filterset_minexpr' )
+trjfid_filterset\$minnumber = as.integer( '$trjfid.basic.use.filterset_minnumber' )
+trjfid_getsom\$nb = as.numeric( '$trjfid.basic.use.getsom_nb' )
+trjfid_getsom\$alpha = as.numeric( '$trjfid.basic.use.getsom_alpha' )
+trjfid_procsom\$corthr = as.numeric( '$trjfid.basic.use.procsom_corthr' )
+trjfid_procsom\$minsom = as.integer( '$trjfid.basic.use.procsom_minsom' )
+trjfid_plotheat\$xgrid = as.logical( '$trjfid.basic.use.plotheat_xgrid' )
+trjfid_plotheat\$ygrid = as.logical( '$trjfid.basic.use.plotheat_ygrid' )
+trjfid_plotheat\$xlab = as.logical( '$trjfid.basic.use.plotheat_xlab' )
     #end if
 
     #if str($trjfid.basic.som.doit) == "yes":
-perform.fateID.sominspect = TRUE
+perform.fateid.sominspect = TRUE
 
 trjfidsomi = list()
         #if str($trjfid.basic.som.use_genes.typer) == "genelist":
--- a/raceid_clustering.xml	Mon Dec 20 10:12:47 2021 +0000
+++ b/raceid_clustering.xml	Wed Aug 24 18:09:06 2022 +0000
@@ -33,7 +33,6 @@
                 <param name="samp" type="integer" min="0" optional="true" label="Sample random number of cells" help="Number of random sample of cells used for the inference of cluster number and Jaccard similarity" /><!-- 0:NULL -->
                 <param name="cln" type="integer" min="0" optional="true" label="Number of clusters" /><!-- 0:Null -->
                 <param name="bootnr" type="integer" min="0" value="50" label="Number of booststrapping runs" />
-                <param name="rseed" type="integer" value="17000" label="Random seed" />
             </expand>
         </section>
         <section name="outlier" title="Outliers" expanded="true" >
--- a/scripts/cluster.R	Mon Dec 20 10:12:47 2021 +0000
+++ b/scripts/cluster.R	Wed Aug 24 18:09:06 2022 +0000
@@ -1,7 +1,7 @@
 #!/usr/bin/env R
 VERSION <- "0.5" # nolint
 
-args <- commandArgs(trailingOnly = T)
+args <- commandArgs(trailingOnly = TRUE)
 
 if (length(args) != 1) {
      message(paste("VERSION:", VERSION))
@@ -52,8 +52,8 @@
     if (filt.use.ccorrect) {
         par(mfrow = c(2, 2))
         sc <- do.call(CCcorrect, c(sc, filt.ccc))
-        print(plotdimsat(sc, change = T))
-        print(plotdimsat(sc, change = F))
+        print(plotdimsat(sc, change = TRUE))
+        print(plotdimsat(sc, change = FALSE))
     }
     return(sc)
 }
@@ -62,8 +62,8 @@
     sc <- do.call(compdist, c(sc, clust.compdist))
     sc <- do.call(clustexp, c(sc, clust.clustexp))
     if (clust.clustexp$sat) {
-        print(plotsaturation(sc, disp = F))
-        print(plotsaturation(sc, disp = T))
+        print(plotsaturation(sc, disp = FALSE))
+        print(plotsaturation(sc, disp = TRUE))
     }
     print(plotjaccard(sc))
     return(sc)
@@ -125,7 +125,7 @@
         print(do.call(mtext, c(paste(buffer, "(fc > ",
                                      genelist.foldchange, ")"), test)))
     })
-    write.table(df, file = out.genelist, sep = "\t", quote = F)
+    write.table(df, file = out.genelist, sep = "\t", quote = FALSE)
 }
 
 
@@ -138,7 +138,7 @@
                       is.outlier = names(dat) %in% sc@out$out)
 
     write.table(tab, file = out.assignments, sep = "\t",
-                quote = F, row.names = F)
+                quote = FALSE, row.names = FALSE)
 }
 
 
@@ -158,7 +158,7 @@
                                             getfdata(sc))) / ncol(sc@expdata)),
                   "% of cells remain"))
     write.table(as.matrix(sc@ndata), file = out.table, col.names = NA,
-                row.names = T, sep = "\t", quote = F)
+                row.names = TRUE, sep = "\t", quote = FALSE)
 }
 
 if (use.cluster) {
--- a/scripts/clusterinspect.R	Mon Dec 20 10:12:47 2021 +0000
+++ b/scripts/clusterinspect.R	Wed Aug 24 18:09:06 2022 +0000
@@ -1,7 +1,7 @@
 #!/usr/bin/env R
 VERSION <- "0.5"  # nolint
 
-args <- commandArgs(trailingOnly = T)
+args <- commandArgs(trailingOnly = TRUE)
 
 if (length(args) != 1) {
      message(paste("VERSION:", VERSION))
@@ -74,12 +74,10 @@
         use_names <- NULL
         if (!is.null(lob$manual)) {
             use_names <- lob$manual
-        }
-        else if (!is.null(lob$regex)) {
+        }else if (!is.null(lob$regex)) {
             nm <- colnames(sc@ndata)
             use_names <- nm[grep(lob$regex, nm)]
-        }
-        else if (!is.null(lob$cln)) {
+        }else if (!is.null(lob$cln)) {
             use_names <- names(sc@cpart)[sc@cpart %in% lob$cln]
         }
         if (is.null(use_names)) {
@@ -112,19 +110,23 @@
     title <- paste(":", plotexp$n)
     plotexp$n <- ""
 
-    plotexp$logsc <- FALSE; plotexp$fr <- FALSE
+    plotexp$logsc <- FALSE
+    plotexp$fr <- FALSE
     print(do.call(plotexpmap, c(sc, plotexp)))
     print(do.call(mtext, c(paste("tSNE", title), test)))
 
-    plotexp$logsc <- TRUE; plotexp$fr <- FALSE
+    plotexp$logsc <- TRUE
+    plotexp$fr <- FALSE
     print(do.call(plotexpmap, c(sc, plotexp)))
     print(do.call(mtext, c(paste("tSNE (Log)", title), test)))
 
-    plotexp$logsc <- FALSE; plotexp$fr <- TRUE
+    plotexp$logsc <- FALSE
+    plotexp$fr <- TRUE
     print(do.call(plotexpmap, c(sc, plotexp)))
     print(do.call(mtext, c(paste("FR", title), test)))
 
-    plotexp$logsc <- TRUE; plotexp$fr <- TRUE
+    plotexp$logsc <- TRUE
+    plotexp$fr <- TRUE
     print(do.call(plotexpmap, c(sc, plotexp)))
     print(do.call(mtext, c(paste("FR (Log)", title), test)))
 
--- a/scripts/trajectoryinspect.R	Mon Dec 20 10:12:47 2021 +0000
+++ b/scripts/trajectoryinspect.R	Wed Aug 24 18:09:06 2022 +0000
@@ -1,7 +1,7 @@
 #!/usr/bin/env R
 VERSION <- "0.2" # nolint
 
-args <- commandArgs(trailingOnly = T)
+args <- commandArgs(trailingOnly = TRUE)
 
 if (length(args) != 1) {
      message(paste("VERSION:", VERSION))
@@ -19,7 +19,7 @@
 second$cex <- 0.5
 second$line <- 2.5
 
-do.trajectoryinspection.stemID <- function(ltr) { # nolint
+do.trajectoryinspection.stemid <- function(ltr) { # nolint
     makeBranchLink <- function(i, j, k) { # nolint
         ingoing <- paste(sort(c(i, j)), collapse = ".")
         outgoing <- paste(sort(c(j, k)), collapse = ".")
@@ -51,57 +51,57 @@
     print(do.call(mtext, c("Final Clusters (F-R)", test)))
 }
 
-do.trajectoryinspection.fateID <- function(ltr) { # nolint
-    n <- do.call(cellsfromtree, c(ltr, trjfid.cellsfrom))
+do.trajectoryinspection.fateid <- function(ltr) { # nolint
+    n <- do.call(cellsfromtree, c(ltr, trjfid_cellsfrom))
     x <- getfdata(ltr@sc)
 
-    trjfid.filterset$x <- x
-    trjfid.filterset$n <- n$f
-    fs <- do.call(filterset, c(trjfid.filterset))
-    trjfid.getsom$x <- fs
-    s1d <- do.call(getsom, c(trjfid.getsom))
-    trjfid.procsom$s1d <- s1d
-    ps <- do.call(procsom, c(trjfid.procsom))
+    trjfid_filterset$x <- x
+    trjfid_filterset$n <- n$f
+    fs <- do.call(filterset, c(trjfid_filterset))
+    trjfid_getsom$x <- fs
+    s1d <- do.call(getsom, c(trjfid_getsom))
+    trjfid_procsom$s1d <- s1d
+    ps <- do.call(procsom, c(trjfid_procsom))
 
     y    <- ltr@sc@cpart[n$f]
     fcol <- ltr@sc@fcol
 
-    trjfid.plotheat$xpart <- y
-    trjfid.plotheat$xcol <- fcol
+    trjfid_plotheat$xpart <- y
+    trjfid_plotheat$xcol <- fcol
 
     test$side <- 3
     test$line <- 3
 
     ##Plot average z-score for all modules derived from the SOM:
-    trjfid.plotheat$x <- ps$nodes.z
-    trjfid.plotheat$ypart <- unique(ps$nodes)
-    print(do.call(plotheatmap, c(trjfid.plotheat)))
+    trjfid_plotheat$x <- ps$nodes.z
+    trjfid_plotheat$ypart <- unique(ps$nodes)
+    print(do.call(plotheatmap, c(trjfid_plotheat)))
     print(do.call(mtext, c("Average z-score for all modules derived from SOM",
                            test)))
     ##Plot z-score profile of each gene ordered by SOM modules:
-    trjfid.plotheat$x <- ps$all.z
-    trjfid.plotheat$ypart <- ps$nodes
-    print(do.call(plotheatmap, c(trjfid.plotheat)))
+    trjfid_plotheat$x <- ps$all.z
+    trjfid_plotheat$ypart <- ps$nodes
+    print(do.call(plotheatmap, c(trjfid_plotheat)))
     print(do.call(mtext, c(paste0("z-score profile of each gene",
                                   "ordered by SOM modules"), test)))
     ##Plot normalized expression profile of each gene ordered by SOM modules:
-    trjfid.plotheat$x <- ps$all.e
-    trjfid.plotheat$ypart <- ps$nodes
-    print(do.call(plotheatmap, c(trjfid.plotheat)))
+    trjfid_plotheat$x <- ps$all.e
+    trjfid_plotheat$ypart <- ps$nodes
+    print(do.call(plotheatmap, c(trjfid_plotheat)))
     print(do.call(mtext, c(paste0("Normalized expression profile of each",
                                   "gene ordered by SOM modules"), test)))
     ##Plot binarized expression profile of each gene
     ##(z-score < -1, -1 < z-score < 1, z-score > 1)
-    trjfid.plotheat$x <- ps$all.b
-    trjfid.plotheat$ypart <- ps$nodes
-    print(do.call(plotheatmap, c(trjfid.plotheat)))
+    trjfid_plotheat$x <- ps$all.b
+    trjfid_plotheat$ypart <- ps$nodes
+    print(do.call(plotheatmap, c(trjfid_plotheat)))
     print(do.call(mtext, c("Binarized expression profile of each gene", test)))
     ## This should be written out, and passed back into the tool
     ## to perform sominspect
     return(list(fs = fs, ps = ps, y = y, fcol = fcol, nf = n$f))
 }
 
-do.trajectoryinspection.fateID.sominspect <- function(domo) { # nolint
+do.trajectoryinspection.fateid.sominspect <- function(domo) { # nolint
     g <- trjfidsomi.use.genes
     if (class(g) == "numeric") {
         g <- names(ps$nodes)[ps$nodes %in% g]
@@ -135,11 +135,11 @@
 ltr <- in.rdat
 
 pdf(out.pdf)
-if (perform.stemID) do.trajectoryinspection.stemID(ltr)
-if (perform.fateID) {
-    domo <- do.trajectoryinspection.fateID(ltr)
-    if (perform.fateID.sominspect) {
-        do.trajectoryinspection.fateID.sominspect(domo)
+if (perform.stemid) do.trajectoryinspection.stemid(ltr)
+if (perform.fateid) {
+    domo <- do.trajectoryinspection.fateid(ltr)
+    if (perform.fateid.sominspect) {
+        do.trajectoryinspection.fateid.sominspect(domo)
     }
 }
 dev.off()