Mercurial > repos > iuc > sleuth
annotate sleuth.R @ 0:5f1cb4c28d73 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
| author | iuc |
|---|---|
| date | Thu, 01 Jun 2023 07:56:00 +0000 |
| parents | |
| children | d3e447dd52c8 |
| rev | line source |
|---|---|
|
0
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
1 library(sleuth, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
2 quietly = TRUE, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
3 warn.conflicts = FALSE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
4 library(annotables, quietly = TRUE, warn.conflicts = FALSE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
5 library(argparse, quietly = TRUE, warn.conflicts = FALSE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
6 library(tidyverse) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
7 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
8 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
9 # setup R error handling to go to stderr |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
10 options( |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
11 show.error.messages = FALSE, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
12 error = function() { |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
13 cat(geterrmessage(), file = stderr()) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
14 q("no", 1, FALSE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
15 } |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
16 ) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
17 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
18 # we need that to not crash galaxy with an UTF8 error on German LC settings. |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
19 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
20 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
21 ################################################################################ |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
22 ### Input Processing |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
23 ################################################################################ |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
24 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
25 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
26 # Collect arguments from command line |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
27 parser <- ArgumentParser(description = "Sleuth R script") |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
28 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
29 parser$add_argument("--factorLevel", action = "append", required = TRUE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
30 parser$add_argument("--factorLevel_counts", |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
31 action = "append", |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
32 required = TRUE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
33 parser$add_argument("--factorLevel_n", action = "append", required = TRUE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
34 parser$add_argument("--cores", type = "integer", required = TRUE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
35 parser$add_argument("--normalize", action = "store_true", required = FALSE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
36 parser$add_argument("--nbins", type = "integer", required = TRUE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
37 parser$add_argument("--lwr", type = "numeric", required = TRUE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
38 parser$add_argument("--upr", type = "numeric", required = TRUE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
39 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
40 args <- parser$parse_args() |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
41 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
42 all_files <- args$factorLevel_counts |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
43 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
44 conditions <- c() |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
45 for (x in seq_along(args$factorLevel)) { |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
46 temp <- append(conditions, rep(args$factorLevel[[x]])) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
47 conditions <- temp |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
48 } |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
49 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
50 sample_names <- all_files %>% |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
51 str_replace(pattern = "\\.tab", "") |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
52 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
53 design <- |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
54 data.frame(list( |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
55 sample = sample_names, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
56 condition = conditions, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
57 path = all_files |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
58 )) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
59 so <- sleuth_prep(design, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
60 cores = args$cores, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
61 normalize = args$normalize) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
62 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
63 so <- sleuth_fit( |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
64 so, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
65 ~ condition, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
66 "full", |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
67 n_bins = args$nbins, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
68 lwr = args$lwr, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
69 upr = args$upr |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
70 ) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
71 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
72 so <- sleuth_fit( |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
73 so, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
74 ~ 1, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
75 "reduced", |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
76 n_bins = args$nbins, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
77 lwr = args$lwr, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
78 upr = args$upr |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
79 ) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
80 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
81 so <- sleuth_lrt(so, "reduced", "full") |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
82 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
83 sleuth_table <- |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
84 sleuth_results(so, "reduced:full", "lrt", show_all = FALSE) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
85 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
86 write.table( |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
87 sleuth_table, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
88 file = "sleuth_table.tab", |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
89 quote = FALSE, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
90 sep = "\t", |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
91 col.names = TRUE, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
92 row.names = FALSE |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
93 ) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
94 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
95 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
96 outputFile <- file.path(getwd(), "pca_plot.pdf") |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
97 pdf(file = outputFile, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
98 height = 6, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
99 width = 9) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
100 plot_pca(so, color_by = "condition") |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
101 dev.off() |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
102 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
103 outputFile <- file.path(getwd(), "group_density.pdf") |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
104 pdf(file = outputFile, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
105 height = 6, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
106 width = 9) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
107 plot_group_density( |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
108 so, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
109 use_filtered = TRUE, |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
110 units = "est_counts", |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
111 trans = "log", |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
112 grouping = setdiff(colnames(so$sample_to_covariates), |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
113 "sample"), |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
114 offset = 1 |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
115 ) |
|
5f1cb4c28d73
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6b943159b4d68812dc6911309f23d54ec659282f
iuc
parents:
diff
changeset
|
116 dev.off() |
