Mercurial > repos > iuc > raceid_filtnormconf
diff scripts/pseudotemporal.R @ 6:43c146e25a43 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid3 commit 53916f6803b93234f992f5fd4fad61d7013d82af"
author | iuc |
---|---|
date | Thu, 15 Apr 2021 19:00:38 +0000 |
parents | 8dc8ff057b0f |
children |
line wrap: on
line diff
--- a/scripts/pseudotemporal.R Wed Jan 29 17:16:02 2020 -0500 +++ b/scripts/pseudotemporal.R Thu Apr 15 19:00:38 2021 +0000 @@ -1,9 +1,9 @@ #!/usr/bin/env R -VERSION = "0.1" +VERSION <- "0.1" # nolint -args = commandArgs(trailingOnly = T) +args <- commandArgs(trailingOnly = T) # nolint -if (length(args) != 1){ +if (length(args) != 1) { message(paste("VERSION:", VERSION)) stop("Please provide the config file") } @@ -12,37 +12,44 @@ source(args[1]) test <- list() -test$side = 3 -test$line = 3 +test$side <- 3 +test$line <- 3 second <- test -second$cex = 0.5 -second$line = 2.5 +second$cex <- 0.5 +second$line <- 2.5 -do.pseudotemp <- function(sc){ +do.pseudotemp <- function(sc) { # nolint pdf(out.pdf) ltr <- Ltree(sc) ltr <- compentropy(ltr) ltr <- do.call(projcells, c(ltr, pstc.projc)) ltr <- do.call(projback, c(ltr, pstc.projb)) ltr <- lineagegraph(ltr) - ltr <- do.call(comppvalue, c(ltr, pstc.comppval)) + ltr <- do.call(comppvalue, c(ltr, pstc.comppval)) x <- do.call(compscore, c(ltr, pstc.compscore)) print(do.call(mtext, c("Compute Score", test))) - print(do.call(mtext, c("No. of inter-cluster links / Delta median entropy of each cluster / StemID2 score (combination of both)", second))) + print(do.call(mtext, c(paste0("No. of inter-cluster links / ", + "Delta median entropy of each cluster / ", + "StemID2 score (combination of both)"), + second))) plotdistanceratio(ltr) print(do.call(mtext, c("Cell-to-Cell Distance Ratio", test))) - print(do.call(mtext, c("Original vs High-dimensional Embedded Space", second))) + print(do.call(mtext, c("Original vs High-dimensional Embedded Space", + second))) do.call(plotgraph, c(ltr, pstc.plotgraph)) - print(do.call(mtext, c("Lineage Trajectories ", test))) - print(do.call(mtext, c("Colour = Level of Significance, Width = Link Score ", second))) + print(do.call(mtext, c(paste0(c("Lineage Trajectories", rep(" ", 54)), + collapse = ""), test))) + print(do.call(mtext, c(paste0(c(paste0("Colour = Level of Significance, ", + "Width = Link Score"), + rep(" ", 106)), collapse = ""), second))) plotspantree(ltr) print(do.call(mtext, c("Minimum Spanning Tree", test))) - plotprojections(ltr) + plotspantree(ltr, projections = TRUE) print(do.call(mtext, c("Minimum Spanning Tree", test))) print(do.call(mtext, c("Cells Projected onto Links", second))) - test$side = 4 - test$line = 0 + test$side <- 4 + test$line <- 0 plotlinkscore(ltr) print(do.call(mtext, c("Link Score", test))) projenrichment(ltr)