Mercurial > repos > immport-devteam > profile_cl
annotate getOntology.R @ 1:62d8985a41e2 draft default tip
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
author | azomics |
---|---|
date | Thu, 23 Jul 2020 08:58:29 -0400 |
parents | |
children |
rev | line source |
---|---|
1
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
1 #!/usr/bin/Rscript --vanilla |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
2 # Cell Ontology Module for Galaxy |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
3 # FlowCL |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
4 ###################################################################### |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
5 # Copyright (c) 2016 Northrop Grumman. |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
6 # All rights reserved. |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
7 ###################################################################### |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
8 # |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
9 # Version 1 |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
10 # Cristel Thomas |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
11 # |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
12 # |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
13 |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
14 suppressWarnings(suppressMessages(library(flowCL))) |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
15 suppressWarnings(suppressMessages(library(base))) |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
16 |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
17 getOntology <- function(output_file, markers) { |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
18 res <- flowCL(markers, ResetArch = TRUE) |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
19 if (length(res) == 6) { |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
20 report <- capture.output(res$Table) |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
21 sink(output_file) |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
22 cat(report, sep = "\n") |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
23 sink() |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
24 } |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
25 } |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
26 |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
27 args <- commandArgs(trailingOnly = TRUE) |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
28 markers <- paste(args[2:length(args)], collapse="") |
62d8985a41e2
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/profile_cl commit 5cdc32e68f9ec685f9890902c5ecc75047248361"
azomics
parents:
diff
changeset
|
29 getOntology(args[1], markers) |