Mercurial > repos > proteore > proteore_maps_visualization
diff kegg_maps_visualization.R @ 1:6f389729a30b draft
planemo upload commit 93c44875036dbc9b3b9c1416566cf91004b97429-dirty
author | proteore |
---|---|
date | Thu, 31 Jan 2019 05:24:33 -0500 |
parents | 9845dc9c7323 |
children | dfceadc0b703 |
line wrap: on
line diff
--- a/kegg_maps_visualization.R Tue Dec 18 10:02:54 2018 -0500 +++ b/kegg_maps_visualization.R Thu Jan 31 05:24:33 2019 -0500 @@ -8,9 +8,9 @@ suppressMessages(library(KEGGREST)) read_file <- function(path,header){ - file <- try(read.csv(path,header=header, sep="\t",stringsAsFactors = FALSE, quote="\"", check.names = F, comment.char = "#"),silent=TRUE) + file <- try(read.csv(path,header=header, sep="\t",stringsAsFactors = FALSE, quote="\"", check.names = F, comment.char = ""),silent=TRUE) if (inherits(file,"try-error")){ - stop("File not found !") + stop("Read file error ! Please check your file (header, # character, etc) ") }else{ return(file) } @@ -75,6 +75,7 @@ } get_list_from_cp <-function(list){ + list = gsub(",","\t",list) list = strsplit(list, "[ \t\n]+")[[1]] list = list[list != ""] #remove empty entry list = gsub("-.+", "", list) #Remove isoform accession number (e.g. "-2")