Mercurial > repos > iuc > dexseq
comparison dexseq.R @ 18:ffa256d657b2 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dexseq commit ed4091f895ae0f46323534ca42da290c6e103598
| author | iuc |
|---|---|
| date | Fri, 31 Jan 2025 18:00:29 +0000 |
| parents | d104044e4257 |
| children |
comparison
equal
deleted
inserted
replaced
| 17:d104044e4257 | 18:ffa256d657b2 |
|---|---|
| 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 |
