Mercurial > repos > iuc > raceid_inspectclusters
comparison scripts/pseudotemporal.R @ 0:9fec5dd8fbb9 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid3 commit f880060c478d42202df5b78a81329f8af56b1138
author | iuc |
---|---|
date | Thu, 22 Nov 2018 04:45:41 -0500 |
parents | |
children | 41f34e925bd5 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9fec5dd8fbb9 |
---|---|
1 #!/usr/bin/env R | |
2 VERSION = "0.1" | |
3 | |
4 args = commandArgs(trailingOnly = T) | |
5 | |
6 if (length(args) != 1){ | |
7 message(paste("VERSION:", VERSION)) | |
8 stop("Please provide the config file") | |
9 } | |
10 | |
11 suppressWarnings(suppressPackageStartupMessages(require(RaceID))) | |
12 source(args[1]) | |
13 | |
14 test <- list() | |
15 test$side = 3 | |
16 test$line = 3 | |
17 second <- test | |
18 second$cex = 0.5 | |
19 second$line = 2.5 | |
20 | |
21 | |
22 do.pseudotemp <- function(sc){ | |
23 pdf(out.pdf) | |
24 ltr <- Ltree(sc) | |
25 ltr <- compentropy(ltr) | |
26 ltr <- do.call(projcells, c(ltr, pstc.projc)) | |
27 ltr <- do.call(projback, c(ltr, pstc.projb)) | |
28 ltr <- lineagegraph(ltr) | |
29 ltr <- do.call(comppvalue, c(ltr, pstc.comppval)) | |
30 x <- do.call(compscore, c(ltr, pstc.compscore)) | |
31 print(do.call(mtext, c("Compute Score", test))) | |
32 print(do.call(mtext, c("No. of inter-cluster links / Delta median entropy of each cluster / StemID2 score (combination of both)", second))) | |
33 plotdistanceratio(ltr) | |
34 print(do.call(mtext, c("Cell-to-Cell Distance Ratio", test))) | |
35 print(do.call(mtext, c("Original vs High-dimensional Embedded Space", second))) | |
36 do.call(plotgraph, c(ltr, pstc.plotgraph)) | |
37 print(do.call(mtext, c("Lineage Trajectories ", test))) | |
38 print(do.call(mtext, c("Colour = Level of Significance, Width = Link Score ", second))) | |
39 plotspantree(ltr) | |
40 print(do.call(mtext, c("Minimum Spanning Tree", test))) | |
41 plotprojections(ltr) | |
42 print(do.call(mtext, c("Minimum Spanning Tree", test))) | |
43 print(do.call(mtext, c("Cells Projected onto Links", second))) | |
44 test$side = 4 | |
45 test$line = 0 | |
46 plotlinkscore(ltr) | |
47 print(do.call(mtext, c("Link Score", test))) | |
48 projenrichment(ltr) | |
49 print(do.call(mtext, c("Enrichment Ratios", test))) | |
50 dev.off() | |
51 | |
52 return(ltr) | |
53 } | |
54 | |
55 ltr <- do.pseudotemp(in.rdat) | |
56 | |
57 | |
58 saveRDS(ltr, out.rdat) |