Mercurial > repos > proteore > proteore_maps_visualization
comparison kegg_maps_visualization.R @ 4:8e611bdc96ec draft
"planemo upload commit 6bef056b0e52bfa39dbe8591bfe67f8c95bf3ba2-dirty"
| author | proteore |
|---|---|
| date | Wed, 15 Jan 2020 11:31:03 -0500 |
| parents | dfceadc0b703 |
| children | eb140217a9f1 |
comparison
equal
deleted
inserted
replaced
| 3:dfceadc0b703 | 4:8e611bdc96ec |
|---|---|
| 83 return(list) | 83 return(list) |
| 84 } | 84 } |
| 85 | 85 |
| 86 get_ref_pathways <- function(species){ | 86 get_ref_pathways <- function(species){ |
| 87 ##all available pathways for the species | 87 ##all available pathways for the species |
| 88 pathways <-keggLink("pathway", species) | 88 pathways <- keggLink("pathway", species) |
| 89 tot_path<-unique(pathways) | 89 tot_path <- unique(pathways) |
| 90 | 90 |
| 91 ##formating the dat into a list object | 91 ##formating the dat into a list object |
| 92 ##key= pathway ID, value = genes of the pathway in the kegg format | 92 ##key= pathway ID, value = genes of the pathway in the kegg format |
| 93 pathways_list <- sapply(tot_path, function(pathway) names(which(pathways==pathway))) | 93 pathways_list <- sapply(tot_path, function(pathway) names(which(pathways==pathway))) |
| 94 return (pathways_list) | 94 return (pathways_list) |
| 236 header2 <- str2bool(args$header2) | 236 header2 <- str2bool(args$header2) |
| 237 pathway_col <- as.numeric(gsub("c", "" ,args$pathway_col)) | 237 pathway_col <- as.numeric(gsub("c", "" ,args$pathway_col)) |
| 238 pathways_file = read_file(args$pathways_input,header2) | 238 pathways_file = read_file(args$pathways_input,header2) |
| 239 ids <- sapply(rapply(strsplit(clean_bad_character(pathways_file[,pathway_col]),","),c), function(x) remove_kegg_prefix(x),USE.NAMES = FALSE) | 239 ids <- sapply(rapply(strsplit(clean_bad_character(pathways_file[,pathway_col]),","),c), function(x) remove_kegg_prefix(x),USE.NAMES = FALSE) |
| 240 } | 240 } |
| 241 if (args$native_kegg) { ids <- ids[ids != "04215"] } | |
| 241 pathways_list <- read_file(args$pathways_list,F) | 242 pathways_list <- read_file(args$pathways_list,F) |
| 242 if (!is.null(args$id_list)) { | 243 if (!is.null(args$id_list)) { |
| 243 id_list <- get_list_from_cp(args$id_list) | 244 id_list <- get_list_from_cp(args$id_list) |
| 244 } | 245 } |
| 245 id_type <- tolower(args$id_type) | 246 id_type <- tolower(args$id_type) |
