Mercurial > repos > iuc > pathview
changeset 4:dbac244d2214 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/pathview commit 4abfa1933dc0631419b5a277045fbaf2b2a562b8
| author | iuc |
|---|---|
| date | Mon, 23 Mar 2026 13:46:44 +0000 |
| parents | f1691de443a7 |
| children | |
| files | pathview.r pathview.xml |
| diffstat | 2 files changed, 76 insertions(+), 74 deletions(-) [+] |
line wrap: on
line diff
--- a/pathview.r Mon May 09 20:12:57 2022 +0000 +++ b/pathview.r Mon Mar 23 13:46:44 2026 +0000 @@ -1,6 +1,6 @@ error_foo <- function() { - cat(geterrmessage(), file = stderr()); - q("no", 1, F) + cat(geterrmessage(), file = stderr()) + q("no", 1, F) } options(show.error.messages = F, error = error_foo) @@ -15,24 +15,24 @@ sessionInfo() option_list <- list( - make_option(c("--pathway_id"), type = "character", default = NULL, help = "Path to tabular file with gene data"), - make_option(c("--pathway_id_fp"), type = "character", default = NULL, help = "Path to tabular file with pathway ids"), - make_option(c("--pathway_id_header"), type = "logical", default = FALSE, help = "Header for tabular file with pathway ids"), - make_option(c("--species"), type = "character", default = "hsa", help = "KEGG code, scientific name or the common name of the species"), - make_option(c("--gene_data"), type = "character", default = NULL, help = "Path to tabular file with gene data"), - make_option(c("--gd_header"), type = "logical", default = FALSE, help = "Header for the gene data file"), - make_option(c("--gene_idtype"), type = "character", default = "entrez", help = "ID type used for the gene data"), - make_option(c("--cpd_data"), type = "character", default = NULL, help = "Path to tabular file with compound data"), - make_option(c("--cpd_header"), type = "logical", default = FALSE, help = "Header for the compound data file"), - make_option(c("--cpd_idtype"), type = "character", default = "kegg", help = "ID type used for the compound data"), - make_option(c("--multi_state"), type = "logical", default = TRUE, help = "Are the gene and compound data paired?"), - make_option(c("--match_data"), type = "logical", default = TRUE, help = "Are the gene and compound data paired?"), - make_option(c("--kegg_native"), type = "logical", default = TRUE, help = "Render pathway graph as native KEGG grap? Alternative is the Graphviz layout"), - make_option(c("--same_layer"), type = "logical", default = TRUE, help = "Plot on same layer?"), - make_option(c("--map_null"), type = "logical", default = TRUE, help = "Map the NULL gene or compound data to pathway?"), - make_option(c("--split_group"), type = "logical", default = FALSE, help = "Split node groups into individual nodes?"), - make_option(c("--expand_node"), type = "logical", default = FALSE, help = "Expand multiple-gene nodes into single-gene nodes?"), - make_option(c("--sign_pos"), type = "character", default = "bottomright", help = "Position of pathview signature") + make_option(c("--pathway_id"), type = "character", default = NULL, help = "Path to tabular file with gene data"), + make_option(c("--pathway_id_fp"), type = "character", default = NULL, help = "Path to tabular file with pathway ids"), + make_option(c("--pathway_id_header"), type = "logical", default = FALSE, help = "Header for tabular file with pathway ids"), + make_option(c("--species"), type = "character", default = "hsa", help = "KEGG code, scientific name or the common name of the species"), + make_option(c("--gene_data"), type = "character", default = NULL, help = "Path to tabular file with gene data"), + make_option(c("--gd_header"), type = "logical", default = FALSE, help = "Header for the gene data file"), + make_option(c("--gene_idtype"), type = "character", default = "entrez", help = "ID type used for the gene data"), + make_option(c("--cpd_data"), type = "character", default = NULL, help = "Path to tabular file with compound data"), + make_option(c("--cpd_header"), type = "logical", default = FALSE, help = "Header for the compound data file"), + make_option(c("--cpd_idtype"), type = "character", default = "kegg", help = "ID type used for the compound data"), + make_option(c("--multi_state"), type = "logical", default = TRUE, help = "Are the gene and compound data paired?"), + make_option(c("--match_data"), type = "logical", default = TRUE, help = "Are the gene and compound data paired?"), + make_option(c("--kegg_native"), type = "logical", default = TRUE, help = "Render pathway graph as native KEGG grap? Alternative is the Graphviz layout"), + make_option(c("--same_layer"), type = "logical", default = TRUE, help = "Plot on same layer?"), + make_option(c("--map_null"), type = "logical", default = TRUE, help = "Map the NULL gene or compound data to pathway?"), + make_option(c("--split_group"), type = "logical", default = FALSE, help = "Split node groups into individual nodes?"), + make_option(c("--expand_node"), type = "logical", default = FALSE, help = "Expand multiple-gene nodes into single-gene nodes?"), + make_option(c("--sign_pos"), type = "character", default = "bottomright", help = "Position of pathview signature") ) parser <- OptionParser(usage = "%prog [options] file", option_list = option_list) @@ -40,22 +40,22 @@ print(args) read_table <- function(fp, header, rownames = 1, colclasses = NA) { - table <- read.table(fp, header = header, sep = "\t", row.names = rownames, colClasses = colclasses) - # transform to vector if only one column - if (dim(table)[2] == 1) { - names <- rownames(table) - table <- table[, 1] - names(table) <- names - } - return(table) + table <- read.table(fp, header = header, sep = "\t", row.names = rownames, colClasses = colclasses) + # transform to vector if only one column + if (dim(table)[2] == 1) { + names <- rownames(table) + table <- table[, 1] + names(table) <- names + } + return(table) } get_table <- function(fp, header) { - table <- NULL - if (!is.null(fp)) { - table <- read_table(fp, header, rownames = 1) - } - return(table) + table <- NULL + if (!is.null(fp)) { + table <- read_table(fp, header, rownames = 1) + } + return(table) } # load gene_data file @@ -65,29 +65,30 @@ cpd_data <- get_table(args$cpd_data, args$cpd_header) run_pathview <- function(pathway_id) { - pathview( - pathway.id = pathway_id, - gene.data = gene_data, - gene.idtype = args$gene_idtype, - cpd.data = cpd_data, - cpd.idtype = args$cpd_idtype, - species = args$species, - multi.state = args$multi_state, - match.data = args$match_data, - kegg.native = args$kegg_native, - same.layer = args$same_layer, - split.group = args$split_group, - expand.node = args$expand_node, - sign.pos = args$sign_pos, - map.null = args$map_null) + pathview( + pathway.id = pathway_id, + gene.data = gene_data, + gene.idtype = args$gene_idtype, + cpd.data = cpd_data, + cpd.idtype = args$cpd_idtype, + species = args$species, + multi.state = args$multi_state, + match.data = args$match_data, + kegg.native = args$kegg_native, + same.layer = args$same_layer, + split.group = args$split_group, + expand.node = args$expand_node, + sign.pos = args$sign_pos, + map.null = args$map_null + ) } # get pathway ids if (!is.null(args$pathway_id)) { - run_pathview(args$pathway_id) + run_pathview(args$pathway_id) } else { - pthws <- read_table(args$pathway_id_fp, args$pathway_id_header, rownames = NULL, colclasses = "character") - for (p in pthws) { - run_pathview(p) - } + pthws <- read_table(args$pathway_id_fp, args$pathway_id_header, rownames = NULL, colclasses = "character") + for (p in pthws) { + run_pathview(p) + } }
--- a/pathview.xml Mon May 09 20:12:57 2022 +0000 +++ b/pathview.xml Mon Mar 23 13:46:44 2026 +0000 @@ -2,33 +2,34 @@ <description>for pathway based data integration and visualization</description> <xrefs> <xref type="bio.tools">pathview</xref> + <xref type="bioconductor">pathview</xref> </xrefs> <macros> - <token name="@TOOL_VERSION@">1.34.0</token> + <token name="@TOOL_VERSION@">1.50.0</token> <token name="@VERSION_SUFFIX@">0</token> </macros> <requirements> <requirement type="package" version="@TOOL_VERSION@">bioconductor-pathview</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.ag.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.at.tair.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.bt.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.ce.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.cf.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.dm.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.dr.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.eck12.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.ecsakai.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.gg.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.hs.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.mm.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.mmu.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.pf.plasmo.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.pt.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.rn.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.sc.sgd.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.ss.eg.db</requirement> - <requirement type="package" version="3.14.0">bioconductor-org.xl.eg.db</requirement> - <requirement type="package" version="1.7.1">r-optparse</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.ag.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.at.tair.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.bt.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.ce.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.cf.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.dm.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.dr.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.eck12.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.ecsakai.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.gg.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.hs.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.mm.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.mmu.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.pf.plasmo.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.pt.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.rn.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.sc.sgd.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.ss.eg.db</requirement> + <requirement type="package" version="3.22.0">bioconductor-org.xl.eg.db</requirement> + <requirement type="package" version="1.7.5">r-optparse</requirement> </requirements> <version_command><