diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 7b50d4c8005..604612a9d4f 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -443,6 +443,8 @@ class Tool( object, Dictifiable ): else: raise Exception( "Missing tool 'version' for tool with id '%s' at '%s'" % (self.id, tool_source) ) + self.edam_operations = tool_source.parse_edam_operations() + # Support multi-byte tools self.is_multi_byte = tool_source.parse_is_multi_byte() # Legacy feature, ignored by UI. @@ -1539,6 +1541,8 @@ class Tool( object, Dictifiable ): # Basic information tool_dict = super( Tool, self ).to_dict() + tool_dict["edam_operations"] = self.edam_operations + # Fill in ToolShedRepository info if hasattr(self, 'tool_shed') and self.tool_shed: tool_dict['tool_shed_repository'] = { diff --git a/lib/galaxy/tools/parser/xml.py b/lib/galaxy/tools/parser/xml.py index f92f19a4ac1..a8a77ac34db 100644 --- a/lib/galaxy/tools/parser/xml.py +++ b/lib/galaxy/tools/parser/xml.py @@ -78,6 +78,12 @@ class XmlToolSource(ToolSource): def parse_name(self): return self.root.get( "name" ) + def parse_edam_operations(self): + edam_ops = self.root.find("edam_operations") + if edam_ops is None: + return [] + return [ edam_op.text for edam_op in edam_ops.findall("edam_operation") ] + def parse_description(self): return xml_text(self.root, "description") diff --git a/lib/galaxy/tools/parser/yaml.py b/lib/galaxy/tools/parser/yaml.py index e0dc48ca019..0310ce3057a 100644 --- a/lib/galaxy/tools/parser/yaml.py +++ b/lib/galaxy/tools/parser/yaml.py @@ -33,6 +33,9 @@ class YamlToolSource(ToolSource): def parse_description(self): return self.root_dict.get("description", "") + def parse_edam_operations(self): + return self.root_dict.get("edam_operations", []) + def parse_is_multi_byte(self): return self.root_dict.get("is_multi_byte", self.default_is_multi_byte) diff --git a/test/functional/tools/simple_constructs.yml b/test/functional/tools/simple_constructs.yml index 6c40e65a443..05030d22fdb 100644 --- a/test/functional/tools/simple_constructs.yml +++ b/test/functional/tools/simple_constructs.yml @@ -2,6 +2,10 @@ id: simple_constructs_y name: simple_constructs_y class: GalaxyTool version: 1.0 +description: Simple constructs +edam_operations: + - operation_0004 + - operation_0336 command: > echo "$booltest" >> $out_file1; diff --git a/tools/filters/axt_to_concat_fasta.xml b/tools/filters/axt_to_concat_fasta.xml index 043e554105e..5ded7a2a272 100644 --- a/tools/filters/axt_to_concat_fasta.xml +++ b/tools/filters/axt_to_concat_fasta.xml @@ -1,5 +1,8 @@ Converts an AXT formatted file to a concatenated FASTA alignment + + operation_3434 + axt_to_concat_fasta.py $dbkey_1 $dbkey_2 < $axt_input > $out_file1 diff --git a/tools/filters/axt_to_fasta.xml b/tools/filters/axt_to_fasta.xml index cbb7e8bef4e..e34d706b2af 100644 --- a/tools/filters/axt_to_fasta.xml +++ b/tools/filters/axt_to_fasta.xml @@ -1,5 +1,8 @@ Converts an AXT formatted file to FASTA format + + operation_3434 + axt_to_fasta.py $dbkey_1 $dbkey_2 < $axt_input > $out_file1 diff --git a/tools/filters/axt_to_lav.xml b/tools/filters/axt_to_lav.xml index 1d7fe85cc8e..ea8f428dd91 100644 --- a/tools/filters/axt_to_lav.xml +++ b/tools/filters/axt_to_lav.xml @@ -1,5 +1,8 @@ Converts an AXT formatted file to LAV format + + operation_3434 + axt_to_lav.py /galaxy/data/$dbkey_1/seq/%s.nib:$dbkey_1:${GALAXY_DATA_INDEX_DIR}/shared/ucsc/chrom/${dbkey_1}.len /galaxy/data/$dbkey_2/seq/%s.nib:$dbkey_2:${GALAXY_DATA_INDEX_DIR}/shared/ucsc/chrom/${dbkey_2}.len $align_input $lav_file $seq_file1 $seq_file2 diff --git a/tools/filters/bed2gff.xml b/tools/filters/bed2gff.xml index f9e2128c3ba..4734b747e42 100644 --- a/tools/filters/bed2gff.xml +++ b/tools/filters/bed2gff.xml @@ -1,5 +1,8 @@ converter + + operation_3434 + bed_to_gff_converter.py $input $out_file1 diff --git a/tools/filters/bed_to_bigbed.xml b/tools/filters/bed_to_bigbed.xml index 325d48ee180..d72858ab7f4 100644 --- a/tools/filters/bed_to_bigbed.xml +++ b/tools/filters/bed_to_bigbed.xml @@ -1,6 +1,9 @@ converter - bedToBigBed $input1 $chromInfo $out_file1 + + operation_3434 + + bedToBigBed $input1 $chromInfo $out_file1 #if $settings.settingsType == "full": -blockSize=${settings.blockSize} -itemsPerSlot=${settings.itemsPerSlot} ${settings.unc} #end if diff --git a/tools/filters/gff2bed.xml b/tools/filters/gff2bed.xml index 270ff023733..cb81bf4ca91 100644 --- a/tools/filters/gff2bed.xml +++ b/tools/filters/gff2bed.xml @@ -1,5 +1,8 @@ converter + + operation_3434 + gff_to_bed_converter.py $input $out_file1 diff --git a/tools/filters/gtf2bedgraph.xml b/tools/filters/gtf2bedgraph.xml index 2df1f3e861b..f1123afd58c 100644 --- a/tools/filters/gtf2bedgraph.xml +++ b/tools/filters/gtf2bedgraph.xml @@ -1,5 +1,8 @@ converter + + operation_3434 + gtf_to_bedgraph_converter.py $input $out_file1 $attribute_name diff --git a/tools/stats/filtering.xml b/tools/stats/filtering.xml index d6b446787a5..be86fc5603b 100644 --- a/tools/stats/filtering.xml +++ b/tools/stats/filtering.xml @@ -1,5 +1,8 @@ data on any column using simple expressions + + operation_0335 + filtering.py $input $out_file1 "$cond" ${input.metadata.columns} "${input.metadata.column_types}" $header_lines