Mercurial > repos > proteore > proteore_ms_observation_pepatlas
comparison Get_ms-ms_observations.R @ 10:ef723082fc54 draft default tip
"planemo upload commit b061341e1157cccd90e33b945bc17705880b3e57"
author | proteore |
---|---|
date | Mon, 04 May 2020 03:29:36 -0400 |
parents | 14c890ff105a |
children |
comparison
equal
deleted
inserted
replaced
9:14c890ff105a | 10:ef723082fc54 |
---|---|
75 tissue=paste(strsplit(file_name,"_")[[1]][1:2],collapse="_") | 75 tissue=paste(strsplit(file_name,"_")[[1]][1:2],collapse="_") |
76 return (c(date,tissue,file_name,path)) | 76 return (c(date,tissue,file_name,path)) |
77 } | 77 } |
78 | 78 |
79 clean_ids <- function(ids){ | 79 clean_ids <- function(ids){ |
80 | 80 ids = gsub(" ",NA,ids) |
81 ids = gsub(" ","",ids) | 81 ids = gsub("^$|^ $", NA, ids) |
82 ids = ids[which(ids!="")] | 82 ids = gsub("NA",NA,ids) |
83 ids = ids[which(ids!="NA")] | |
84 ids = ids[!is.na(ids)] | |
85 | |
86 return(ids) | 83 return(ids) |
87 } | 84 } |
88 | 85 |
89 main = function() { | 86 main = function() { |
90 args <- commandArgs(TRUE) | 87 args <- commandArgs(TRUE) |
106 # Parse arguments | 103 # Parse arguments |
107 parseArgs <- function(x) strsplit(sub("^--", "", x), "=") | 104 parseArgs <- function(x) strsplit(sub("^--", "", x), "=") |
108 argsDF <- as.data.frame(do.call("rbind", parseArgs(args))) | 105 argsDF <- as.data.frame(do.call("rbind", parseArgs(args))) |
109 args <- as.list(as.character(argsDF$V2)) | 106 args <- as.list(as.character(argsDF$V2)) |
110 names(args) <- argsDF$V1 | 107 names(args) <- argsDF$V1 |
111 | |
112 #save(args,file="/Users/David/work/ProteoRE/tools/Get_ms-ms_observations/args.Rda") | |
113 load("/Users/David/work/ProteoRE/tools/Get_ms-ms_observations/args.Rda") | |
114 | 108 |
115 # Extract input | 109 # Extract input |
116 input_type = args$input_type | 110 input_type = args$input_type |
117 if (input_type == "list") { | 111 if (input_type == "list") { |
118 input = unlist(strsplit(strsplit(args$input, "[ \t\n]+")[[1]],";")) | 112 input = unlist(strsplit(strsplit(args$input, "[ \t\n]+")[[1]],";")) |