Mercurial > repos > iuc > dexseq
comparison dexseq.R @ 11:9a7c5b6d8f1e draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dexseq commit 0ccfadf8ac4bc6514836c4efe6f605973a08d1ed
author | iuc |
---|---|
date | Tue, 02 Apr 2024 12:59:54 +0000 |
parents | df929f257179 |
children |
comparison
equal
deleted
inserted
replaced
10:df929f257179 | 11:9a7c5b6d8f1e |
---|---|
14 | 14 |
15 | 15 |
16 options(stringAsfactors = FALSE, useFancyQuotes = FALSE) | 16 options(stringAsfactors = FALSE, useFancyQuotes = FALSE) |
17 args <- commandArgs(trailingOnly = TRUE) | 17 args <- commandArgs(trailingOnly = TRUE) |
18 | 18 |
19 #get options, using the spec as defined by the enclosed list. | 19 # get options, using the spec as defined by the enclosed list. |
20 #we read the options from the default: commandArgs(TRUE). | 20 # we read the options from the default: commandArgs(TRUE). |
21 spec <- matrix(c( | 21 spec <- matrix(c( |
22 "verbose", "v", 2, "integer", | 22 "verbose", "v", 2, "integer", |
23 "help", "h", 0, "logical", | 23 "help", "h", 0, "logical", |
24 "gtf", "a", 1, "character", | 24 "gtf", "a", 1, "character", |
25 "outfile", "o", 1, "character", | 25 "outfile", "o", 1, "character", |
107 head(res_sorted) | 107 head(res_sorted) |
108 | 108 |
109 export_table <- as.data.frame(res_sorted) | 109 export_table <- as.data.frame(res_sorted) |
110 last_column <- ncol(export_table) | 110 last_column <- ncol(export_table) |
111 for (i in seq_len(nrow(export_table))) { | 111 for (i in seq_len(nrow(export_table))) { |
112 export_table[i, last_column] <- paste(export_table[i, last_column][[1]], collapse = ", ") | 112 export_table[i, last_column] <- paste(export_table[i, last_column][[1]], collapse = ", ") |
113 } | 113 } |
114 export_table[, c(last_column)] <- sapply(export_table[, c(last_column)], as.character) | 114 export_table[, c(last_column)] <- sapply(export_table[, c(last_column)], as.character) |
115 write.table(export_table, file = opt$outfile, sep = "\t", quote = FALSE, row.names = FALSE, col.names = FALSE) | 115 write.table(export_table, file = opt$outfile, sep = "\t", quote = FALSE, row.names = FALSE, col.names = FALSE) |
116 print("Written Results") | 116 print("Written Results") |
117 | 117 |