diff test-data/out_rscript.txt @ 11:4f2967b27e67 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/annotatemyids commit 3e791f5bd978eee4cd42787c33d4cccc76612c9e
author iuc
date Fri, 01 Jul 2022 12:24:49 +0000
parents 442e2d79b05c
children
line wrap: on
line diff
--- a/test-data/out_rscript.txt	Fri Jul 09 14:20:02 2021 +0000
+++ b/test-data/out_rscript.txt	Fri Jul 01 12:24:49 2022 +0000
@@ -8,8 +8,10 @@
 organism <- "Hs"
 output_cols <- "ENSEMBL,ENTREZID,SYMBOL,GENENAME"
 file_has_header <- FALSE
+remove_dups <- FALSE
 
-ids <- as.character(read.table("/tmp/tmpY5XREO/files/000/dataset_3.dat", header=file_has_header)[,1])
+input <- read.table('/tmp/tmpqa0_mcvo/files/3/1/c/dataset_31cbce15-3708-4c78-bdf6-aca07697ccb7.dat', header=file_has_header, sep="\t", quote="")
+ids <- as.character(input[, 1])
 
 if(organism == "Hs"){
     suppressPackageStartupMessages(library(org.Hs.eg.db))
@@ -23,12 +25,23 @@
 } else if (organism == "Dr"){
     suppressPackageStartupMessages(library(org.Dr.eg.db))
     db <- org.Dr.eg.db
+} else if (organism == "Rn"){
+    suppressPackageStartupMessages(library(org.Rn.eg.db))
+    db <- org.Rn.eg.db
+} else if (organism == "At"){
+    suppressPackageStartupMessages(library(org.At.tair.db))
+    db <- org.At.tair.db
 } else {
     cat(paste("Organism type not supported", organism))
 }
 
 cols <- unlist(strsplit(output_cols, ","))
 result <- select(db, keys=ids, keytype=id_type, columns=cols)
-write.table(result, file="/tmp/tmpY5XREO/files/000/dataset_4.dat", sep="\t", row.names=FALSE, quote=FALSE)
+
+if(remove_dups) {
+    result <- result[!duplicated(result$ENSEMBL),]
+}
+
+write.table(result, file='/tmp/tmpqa0_mcvo/job_working_directory/000/4/outputs/galaxy_dataset_b06fd1c6-69cb-4c43-9caf-1a445a3b8b2e.dat', sep="\t", row.names=FALSE, quote=FALSE)
 
     
\ No newline at end of file