mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #2379 from mvdbeek/edam_operations
Add EDAM operations to tools and expose in API
This commit is contained in:
@@ -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'] = {
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<tool id="axt_to_concat_fasta" name="AXT to concatenated FASTA" version="1.0.0">
|
||||
<description>Converts an AXT formatted file to a concatenated FASTA alignment</description>
|
||||
<edam_operations>
|
||||
<edam_operation>operation_3434</edam_operation>
|
||||
</edam_operations>
|
||||
<command interpreter="python">axt_to_concat_fasta.py $dbkey_1 $dbkey_2 < $axt_input > $out_file1</command>
|
||||
<inputs>
|
||||
<param format="axt" name="axt_input" type="data" label="AXT file"/>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<tool id="axt_to_fasta" name="AXT to FASTA" version="1.0.0">
|
||||
<description>Converts an AXT formatted file to FASTA format</description>
|
||||
<edam_operations>
|
||||
<edam_operation>operation_3434</edam_operation>
|
||||
</edam_operations>
|
||||
<command interpreter="python">axt_to_fasta.py $dbkey_1 $dbkey_2 < $axt_input > $out_file1</command>
|
||||
<inputs>
|
||||
<param format="axt" name="axt_input" type="data" label="AXT file"/>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<tool id="axt_to_lav_1" name="AXT to LAV" version="1.0.0">
|
||||
<description>Converts an AXT formatted file to LAV format</description>
|
||||
<edam_operations>
|
||||
<edam_operation>operation_3434</edam_operation>
|
||||
</edam_operations>
|
||||
<command interpreter="python">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</command>
|
||||
<inputs>
|
||||
<param name="align_input" type="data" format="axt" label="Alignment File" optional="False"/>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<tool id="bed2gff1" name="BED-to-GFF" version="2.0.0">
|
||||
<description>converter</description>
|
||||
<edam_operations>
|
||||
<edam_operation>operation_3434</edam_operation>
|
||||
</edam_operations>
|
||||
<command interpreter="python">bed_to_gff_converter.py $input $out_file1</command>
|
||||
<inputs>
|
||||
<param format="bed" name="input" type="data" label="Convert this dataset"/>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<tool id="bed_to_bigBed" name="BED-to-bigBed" version="1.0.0">
|
||||
<description>converter</description>
|
||||
<command>bedToBigBed $input1 $chromInfo $out_file1
|
||||
<edam_operations>
|
||||
<edam_operation>operation_3434</edam_operation>
|
||||
</edam_operations>
|
||||
<command>bedToBigBed $input1 $chromInfo $out_file1
|
||||
#if $settings.settingsType == "full":
|
||||
-blockSize=${settings.blockSize} -itemsPerSlot=${settings.itemsPerSlot} ${settings.unc}
|
||||
#end if
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<tool id="gff2bed1" name="GFF-to-BED" version="1.0.1">
|
||||
<description>converter</description>
|
||||
<edam_operations>
|
||||
<edam_operation>operation_3434</edam_operation>
|
||||
</edam_operations>
|
||||
<command interpreter="python">gff_to_bed_converter.py $input $out_file1</command>
|
||||
<inputs>
|
||||
<param format="gff" name="input" type="data" label="Convert this dataset"/>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<tool id="gtf2bedgraph" name="GTF-to-BEDGraph" version="1.0.0">
|
||||
<description>converter</description>
|
||||
<edam_operations>
|
||||
<edam_operation>operation_3434</edam_operation>
|
||||
</edam_operations>
|
||||
<command interpreter="python">gtf_to_bedgraph_converter.py $input $out_file1 $attribute_name</command>
|
||||
<inputs>
|
||||
<param format="gtf" name="input" type="data" label="Convert this query"/>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<tool id="Filter1" name="Filter" version="1.1.0">
|
||||
<description>data on any column using simple expressions</description>
|
||||
<edam_operations>
|
||||
<edam_operation>operation_0335</edam_operation>
|
||||
</edam_operations>
|
||||
<command interpreter="python">
|
||||
filtering.py $input $out_file1 "$cond" ${input.metadata.columns} "${input.metadata.column_types}" $header_lines
|
||||
</command>
|
||||
|
||||
Reference in New Issue
Block a user