annotate getOntology.R @ 1:f70f75e89890 draft default tip

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