comparison annotateMyIDs.xml @ 2:9ab35a2245ce draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/annotatemyids commit 348750c48bc5e4f9ecad408519cdd2c68ac749ab
author iuc
date Sun, 11 Mar 2018 05:17:23 -0400
parents 2e1b256f732f
children 1a125daea0d8
comparison
equal deleted inserted replaced
1:2e1b256f732f 2:9ab35a2245ce
1 <tool id="annotatemyids" name="annotateMyIDs" version="3.5.0.0"> 1 <tool id="annotatemyids" name="annotateMyIDs" version="3.5.0.1">
2 <description>annotate a generic set of identifiers</description> 2 <description>annotate a generic set of identifiers</description>
3 <requirements> 3 <requirements>
4 <requirement type="package" version="3.5.0">bioconductor-org.hs.eg.db</requirement> 4 <requirement type="package" version="3.5.0">bioconductor-org.hs.eg.db</requirement>
5 <requirement type="package" version="3.5.0">bioconductor-org.mm.eg.db</requirement> 5 <requirement type="package" version="3.5.0">bioconductor-org.mm.eg.db</requirement>
6 <requirement type="package" version="3.5.0">bioconductor-org.dm.eg.db</requirement> 6 <requirement type="package" version="3.5.0">bioconductor-org.dm.eg.db</requirement>
7 <requirement type="package" version="3.5.0">bioconductor-org.dr.eg.db</requirement> 7 <requirement type="package" version="3.5.0">bioconductor-org.dr.eg.db</requirement>
8 </requirements> 8 </requirements>
9 <version_command><![CDATA[ 9 <version_command><![CDATA[
10 echo $(R --version | grep version | grep -v GNU)", org.Hs.eg.db version" $(R --vanilla --slave -e "library(org.Hs.eg.db); cat(sessionInfo()\$otherPkgs\$org.Hs.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Dr.eg.db version" $(R --vanilla --slave -e "library(org.Dr.eg.db); cat(sessionInfo()\$otherPkgs\$org.Dr.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Dm.eg.db version" $(R --vanilla --slave -e "library(org.Dm.eg.db); cat(sessionInfo()\$otherPkgs\$org.Dm.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Mm.eg.db version" $(R --vanilla --slave -e "library(org.Mm.eg.db); cat(sessionInfo()\$otherPkgs\$org.Mm.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", optparse version" $(R --vanilla --slave -e "library(optparse); cat(sessionInfo()\$otherPkgs\$optparse\$Version)" 2> /dev/null | grep -v -i "WARNING: ") 10 echo $(R --version | grep version | grep -v GNU)", org.Hs.eg.db version" $(R --vanilla --slave -e "library(org.Hs.eg.db); cat(sessionInfo()\$otherPkgs\$org.Hs.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Dr.eg.db version" $(R --vanilla --slave -e "library(org.Dr.eg.db); cat(sessionInfo()\$otherPkgs\$org.Dr.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Dm.eg.db version" $(R --vanilla --slave -e "library(org.Dm.eg.db); cat(sessionInfo()\$otherPkgs\$org.Dm.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Mm.eg.db version" $(R --vanilla --slave -e "library(org.Mm.eg.db); cat(sessionInfo()\$otherPkgs\$org.Mm.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")
11 ]]></version_command> 11 ]]></version_command>
12 <command detect_errors="exit_code"><![CDATA[ 12 <command detect_errors="exit_code"><![CDATA[
13 #if $rscriptOpt: 13 #if $rscriptOpt:
14 cp '${annotatemyids_script}' '${out_rscript}' && 14 cp '${annotatemyids_script}' '${out_rscript}' &&
15 #end if 15 #end if
25 25
26 id_type <- "${id_type}" 26 id_type <- "${id_type}"
27 organism <- "${organism}" 27 organism <- "${organism}"
28 output_cols <- "${output_cols}" 28 output_cols <- "${output_cols}"
29 file_has_header <- ${file_has_header} 29 file_has_header <- ${file_has_header}
30 remove_dups <- ${remove_dups}
30 31
31 ids <- as.character(read.table('$id_file', header=file_has_header)[,1]) 32 ids <- as.character(read.table('$id_file', header=file_has_header)[,1])
32 33
33 if(organism == "Hs"){ 34 if(organism == "Hs"){
34 suppressPackageStartupMessages(library(org.Hs.eg.db)) 35 suppressPackageStartupMessages(library(org.Hs.eg.db))
46 cat(paste("Organism type not supported", organism)) 47 cat(paste("Organism type not supported", organism))
47 } 48 }
48 49
49 cols <- unlist(strsplit(output_cols, ",")) 50 cols <- unlist(strsplit(output_cols, ","))
50 result <- select(db, keys=ids, keytype=id_type, columns=cols) 51 result <- select(db, keys=ids, keytype=id_type, columns=cols)
52
53 if(remove_dups) {
54 result <- result[!duplicated(result$${id_type}),]
55 }
56
51 write.table(result, file='$out_tab', sep="\t", row.names=FALSE, quote=FALSE) 57 write.table(result, file='$out_tab', sep="\t", row.names=FALSE, quote=FALSE)
52 58
53 ]]></configfile> 59 ]]></configfile>
54 </configfiles> 60 </configfiles>
55 <inputs> 61 <inputs>
85 <option value="REFSEQ">REFSEQ</option> 91 <option value="REFSEQ">REFSEQ</option>
86 <option value="GO">GO</option> 92 <option value="GO">GO</option>
87 <option value="ONTOLOGY">ONTOLOGY</option> 93 <option value="ONTOLOGY">ONTOLOGY</option>
88 <option value="PATH">KEGG</option> 94 <option value="PATH">KEGG</option>
89 </param> 95 </param>
96 <param name="remove_dups" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="False" label="Remove duplicates?" help="If this option is set to Yes, only the first occurrence of each input Gene ID will be kept. Default: No" />
90 <param name="rscriptOpt" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="False" label="Output Rscript?" help="If this option is set to Yes, the Rscript used to annotate the IDs will be provided as a text file in the output. Default: No" /> 97 <param name="rscriptOpt" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="False" label="Output Rscript?" help="If this option is set to Yes, the Rscript used to annotate the IDs will be provided as a text file in the output. Default: No" />
91 </inputs> 98 </inputs>
92 <outputs> 99 <outputs>
93 <data name="out_tab" format="tabular" from_work_dir="*.tab" label="${tool.name} on ${on_string}: Annotated IDs" /> 100 <data name="out_tab" format="tabular" from_work_dir="*.tab" label="${tool.name} on ${on_string}: Annotated IDs" />
94 <data name="out_rscript" format="txt" from_work_dir="*.txt" label="${tool.name} on ${on_string}: Rscript"> 101 <data name="out_rscript" format="txt" from_work_dir="*.txt" label="${tool.name} on ${on_string}: Rscript">
116 <test expect_num_outputs="1"> 123 <test expect_num_outputs="1">
117 <param name="id_file" value="ensembl_ids.tab" ftype="tabular"/> 124 <param name="id_file" value="ensembl_ids.tab" ftype="tabular"/>
118 <param name="id_type" value="ENSEMBL"/> 125 <param name="id_type" value="ENSEMBL"/>
119 <param name="organism" value="Hs"/> 126 <param name="organism" value="Hs"/>
120 <param name="output_cols" value="ENSEMBL,GO,ONTOLOGY,EVIDENCE" /> 127 <param name="output_cols" value="ENSEMBL,GO,ONTOLOGY,EVIDENCE" />
121 <output name="out_tab" file="out_gokegg.tab" compare="contains" /> 128 <output name="out_tab" file="out_gokegg.tab" />
129 </test>
130 <!-- Ensure duplicate Gene ID removal works -->
131 <test expect_num_outputs="1">
132 <param name="id_file" value="ensembl_ids.tab" ftype="tabular"/>
133 <param name="id_type" value="ENSEMBL"/>
134 <param name="organism" value="Hs"/>
135 <param name="output_cols" value="ENSEMBL,GO,ONTOLOGY,EVIDENCE" />
136 <param name="remove_dups" value="True" />
137 <output name="out_tab" file="out_gokegg_dupsrem.tab" />
122 </test> 138 </test>
123 </tests> 139 </tests>
124 <help><![CDATA[ 140 <help><![CDATA[
125 141
126 .. class:: infomark 142 .. class:: infomark