Mercurial > repos > greg > plant_tribes_assembly_post_processor
changeset 6:c197d5306cd6 draft
Uploaded
author | greg |
---|---|
date | Thu, 30 Aug 2018 09:40:24 -0400 |
parents | 2732db7dd0ef |
children | ade62ce0029b |
files | assembly_post_processor.xml get_clustering_methods.py macros.xml |
diffstat | 3 files changed, 23 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/assembly_post_processor.xml Thu Dec 21 09:13:41 2017 -0500 +++ b/assembly_post_processor.xml Thu Aug 30 09:40:24 2018 -0400 @@ -6,6 +6,7 @@ <requirements> <requirement type="package" version="1.0.3">plant_tribes_assembly_post_processor</requirement> </requirements> + <code file="get_clustering_methods.py"/> <command detect_errors="exit_code"><![CDATA[ #set output_dir = 'assemblyPostProcessing_dir' AssemblyPostProcessor @@ -92,15 +93,8 @@ <when value="no" /> <when value="yes"> <param name="orthogroups" format="tabular" type="data" label="Targeted gene families"/> - <param name="scaffold" type="select" label="Gene family scaffold"> - <options from_data_table="plant_tribes_scaffolds" /> - <validator type="no_options" message="No PlantTribes scaffolds are available. Use the PlantTribes Scaffolds Download Data Manager tool in Galaxy to install and populate the PlantTribes scaffolds data table."/> - </param> - <param name="method" type="select" label="Protein clustering method"> - <option value="gfam" selected="true">GFam</option> - <option value="orthofinder">OrthoFinder</option> - <option value="orthomcl">OrthoMCL</option> - </param> + <expand macro="param_scaffold"/> + <expand macro="param_method"/> <param name="gap_trimming" type="float" value="0.1" min="0" max="1.0" label="Trim alignments"/> <param name="min_coverage" type="float" value="0" min="0" max="1.0" label="Minimum alignment coverage"/> </when>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get_clustering_methods.py Thu Aug 30 09:40:24 2018 -0400 @@ -0,0 +1,12 @@ +import os + + +def get_clustering_method_options(file_path): + options = [] + if not os.path.isdir(file_path): + return options + methods_dir = os.path.join(file_path, "alns") + for i, file_name in enumerate(os.listdir(methods_dir)): + full_path = os.path.join(file_path, file_name) + options.append((file_name, full_path, i == 0)) + return options
--- a/macros.xml Thu Dec 21 09:13:41 2017 -0500 +++ b/macros.xml Thu Aug 30 09:40:24 2018 -0400 @@ -2,16 +2,16 @@ <macros> <token name="@WRAPPER_VERSION@">1.0</token> <xml name="param_method"> - <param name="method" type="select" label="Protein clustering method"> - <option value="gfam" selected="true">GFam</option> - <option value="orthofinder">OrthoFinder</option> - <option value="orthomcl">OrthoMCL</option> - </param> + <param name="method" type="select" label="Protein clustering method" dynamic_options="get_clustering_method_options(scaffold)"/> </xml> <xml name="param_scaffold"> - <param name="scaffold" type="select" label="Gene family scaffold"> - <options from_data_table="plant_tribes_scaffolds" /> - <validator type="no_options" message="No PlantTribes scaffolds are available. Use the PlantTribes Scaffolds Download Data Manager tool in Galaxy to install and populate the PlantTribes scaffolds data table." /> + <param name="scaffold" type="select" label="Gene family scaffold" refresh_on_change="True"> + <options from_data_table="plant_tribes_scaffolds"> + <column name="name" index="1"/> + <column name="value" index="2"/> + <filter type="sort_by" column="1"/> + <validator type="no_options" message="No PlantTribes scaffolds are available. Use the PlantTribes Scaffolds Download Data Manager tool in Galaxy to install and populate the PlantTribes scaffolds data table."/> + </options> </param> </xml> <xml name="citation1">