Mercurial > repos > proteore > proteore_expression_levels_by_tissue
changeset 12:56c93d1fc8fd draft
planemo upload commit 4ba1ebe7b3f5e3fabf78b5fed7ed0b92e2cbf9e5-dirty
author | proteore |
---|---|
date | Fri, 28 Jun 2019 05:10:08 -0400 |
parents | 6e85f07c20ee |
children | 2173192d4824 |
files | get_expression_profiles.R get_expression_profiles.xml proteore_protein_atlas_normal_tissue.loc.sample proteore_protein_atlas_tumor_tissue.loc.sample tool_data_table_conf.xml.sample |
diffstat | 5 files changed, 42 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/get_expression_profiles.R Wed Mar 13 09:30:12 2019 -0400 +++ b/get_expression_profiles.R Fri Jun 28 05:10:08 2019 -0400 @@ -69,6 +69,15 @@ return(res) } +clean_ids <- function(ids){ + + ids = gsub(" ","",ids) + ids = ids[which(ids!="")] + ids = ids[which(ids!="NA")] + ids = ids[!is.na(ids)] + + return(ids) +} main <- function() { args <- commandArgs(TRUE) @@ -109,16 +118,17 @@ # Extract input input_type = args$input_type if (input_type == "list") { - list_id = strsplit(args$input, "[ \t\n]+")[[1]] + ids = unlist(strsplit(strsplit(args$input, "[ \t\n]+")[[1]],";")) } else if (input_type == "file") { filename = args$input column_number = as.numeric(gsub("c", "" ,args$column_number)) header = str2bool(args$header) file = read_file(filename, header) - list_id = sapply(strsplit(file[,column_number], ";"), "[", 1) + ids = unlist(strsplit(file[,column_number], ";")) } - input = list_id - + #filter ids + ids = clean_ids(ids) + # Read reference file reference_file = read_file(args$ref_file, TRUE) @@ -130,11 +140,11 @@ level = strsplit(args$level, ",")[[1]] reliability = strsplit(args$reliability, ",")[[1]] # Calculation - res = annot.HPAnorm(input, reference_file, tissue, level, reliability, not_mapped_option) + res = annot.HPAnorm(ids, reference_file, tissue, level, reliability, not_mapped_option) } else if (atlas=="cancer") { cancer = strsplit(args$cancer, ",")[[1]] # Calculation - res = annot.HPAcancer(input, reference_file, cancer, not_mapped_option) + res = annot.HPAcancer(ids, reference_file, cancer, not_mapped_option) } # Write output
--- a/get_expression_profiles.xml Wed Mar 13 09:30:12 2019 -0400 +++ b/get_expression_profiles.xml Fri Jun 28 05:10:08 2019 -0400 @@ -1,4 +1,4 @@ -<tool id="sel_ann_hpa" name="Get expression profiles" version="2019.03.13"> +<tool id="sel_ann_hpa" name="Get expression profiles" version="2019.06.27"> <description>by (normal or tumor) tissue/cell type [Human Protein Atlas] </description> <requirements> @@ -38,7 +38,7 @@ </command> <inputs> <conditional name="input" > - <param name="ids" type="select" label="Enter your IDs (ENSG IDs only)" help="Copy/paste or from a file (e.g. table)" > + <param name="ids" type="select" label="Enter your IDs (Ensembl gene ID only; e.g. ENSG00000163631)" help="Copy/paste or from a file (e.g. table)" > <option value="list">Copy/paste your IDs</option> <option value="file" selected="true">Input file containing your IDs</option> </param> @@ -68,8 +68,10 @@ <option value="tumor">Human Tumor Tissue</option> </param> <when value="normal"> - <param name="proteinatlas" type="select" label="Normal tissue HPA version" > - <options from_data_table="proteore_protein_atlas_normal_tissue"/> + <param name="proteinatlas" type="select" label="Normal tissue HPA version 18.1" > + <options from_data_table="proteore_protein_atlas_normal_tissue"> + <filter type="sort_by" column="0"/> + </options> </param> <param name="normal_tissue" type="select" label="Select tissue(s)" multiple="True" display="checkboxes" optional="False"> <option value="adrenal gland" >Adrenal gland</option> @@ -123,7 +125,7 @@ </param> <param name="level" type="select" label="Expression level" display="checkboxes" multiple="True" optional="False"> <option value="High" selected="true">High</option> - <option value="Medium">Medium</option> + <option value="Medium" selected="true">Medium</option> <option value="Low">Low</option> <option value="Not detected">Not detected</option> </param> @@ -135,8 +137,10 @@ </param> </when> <when value="tumor"> - <param name="proteinatlas" type="select" label="Tumor tissue HPA version" > - <options from_data_table="proteore_protein_atlas_tumor_tissue"/> + <param name="proteinatlas" type="select" label="Tumor tissue HPA version 18.1" > + <options from_data_table="proteore_protein_atlas_tumor_tissue"> + <filter type="sort_by" column="0"/> + </options> </param> <param name="cancer_tissue" type="select" label="Select cancer tissue(s)" multiple="True" display="checkboxes" optional="False"> <option value="breast cancer" >Breast cancer</option> @@ -194,7 +198,13 @@ **Input** -A list of ENSG (Ensembl gene) IDs must be entered (either via a copy/paste or by choosing a file); if it's not the case, please use the ID_Converter tool of ProteoRE. +A list of Ensembl gene IDs (e.g. ENSG00000163631) must be entered (either via a copy/paste or by choosing a file); if it's not the case, please use the ID_Converter tool of ProteoRE. + +A line can contains multiple ids if separated by ";". + +.. class:: warningmark + +In copy/paste mode, the number of IDs considered in input is limited to 5000. ----- @@ -232,7 +242,7 @@ **Data sources (release date)** -Both normal and tumor tissues data are based on the Human Protein Atlas version 18 and Ensembl version 88.38. +Both normal and tumor tissues data are based on the Human Protein Atlas version 18.1 and Ensembl version 88.38. More information: https://www.proteinatlas.org/about/download ----- @@ -246,7 +256,7 @@ This work has been partially funded through the French National Agency for Research (ANR) IFB project. -Contact support@proteore.org for any questions or concerns about the Galaxy implementation of this tool. +Help: contact@proteore.org for any questions or concerns about this tool. ]]></help> <citations>
--- a/proteore_protein_atlas_normal_tissue.loc.sample Wed Mar 13 09:30:12 2019 -0400 +++ b/proteore_protein_atlas_normal_tissue.loc.sample Fri Jun 28 05:10:08 2019 -0400 @@ -1,2 +1,2 @@ -#<id> <name> <tissue> <value> -HPA_normal_tissue_23-10-2018 HPA normal tissue 23/10/2018 HPA_normal_tissue /tool-data/HPA_normal_tissue_23-10-2018.tsv +#<id> <release> <name> <tissue> <value> +9979818977 HPA_normal_tissue_23-10-2018 HPA normal tissue 23/10/2018 HPA_normal_tissue /tool-data/HPA_normal_tissue_23-10-2018.tsv
--- a/proteore_protein_atlas_tumor_tissue.loc.sample Wed Mar 13 09:30:12 2019 -0400 +++ b/proteore_protein_atlas_tumor_tissue.loc.sample Fri Jun 28 05:10:08 2019 -0400 @@ -1,2 +1,2 @@ -#<id> <name> <tissue> <value> -HPA_pathology_23-10-2018 HPA pathology 23/10/2018 HPA_pathology /tool-data/HPA_pathology_23-10-2018.tsv +#<id> <release> <name> <tissue> <value> +9979818977 HPA_pathology_23-10-2018 HPA pathology 23/10/2018 HPA_pathology /tool-data/HPA_pathology_23-10-2018.tsv
--- a/tool_data_table_conf.xml.sample Wed Mar 13 09:30:12 2019 -0400 +++ b/tool_data_table_conf.xml.sample Fri Jun 28 05:10:08 2019 -0400 @@ -1,10 +1,10 @@ <tables> <table name="proteore_protein_atlas_normal_tissue" comment_char="#"> - <columns>id, name, tissue, value</columns> + <columns>id, release, name, tissue, value</columns> <file path="tool-data/proteore_protein_atlas_normal_tissue.loc" /> </table> <table name="proteore_protein_atlas_tumor_tissue" comment_char="#"> - <columns>id, name, tissue, value</columns> + <columns>id, release, name, tissue, value</columns> <file path="tool-data/proteore_protein_atlas_tumor_tissue.loc" /> </table> </tables> \ No newline at end of file