changeset 13:cddbb2f13c28 draft

Uploaded
author greg
date Wed, 04 Jan 2017 14:14:27 -0500
parents b75510484c16
children 595088cc480a
files gene_family_classifier.xml
diffstat 1 files changed, 35 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/gene_family_classifier.xml	Wed Jan 04 13:52:09 2017 -0500
+++ b/gene_family_classifier.xml	Wed Jan 04 14:14:27 2017 -0500
@@ -12,18 +12,20 @@
     </stdio>
     <command>
         <![CDATA[
-        #set create_ortho_sequences = str($options_type.options_type_selector) == 'advanced' and str($options_type.create_orthogroup_cond.create_orthogroup) == 'yes'
-            #if create_ortho_sequences:
+            #if str($options_type.options_type_selector) == 'advanced' and str($options_type.create_orthogroup_cond.create_orthogroup) == 'yes':
                 #import os
+                #set create_ortho_sequences = True
                 #set src_dir = $os.path.join('geneFamilyClassification_dir', 'orthogroups_fasta')
                 #set dest_dir = $output.extra_files_path
                 mkdir -p $dest_dir &&
+            #else:
+                #set create_ortho_sequences = False
             #end if
             GeneFamilyClassifier
             --proteins "$input"
             --scaffold "$scaffold"
             --method $method
-            --classifier $classifier
+            --classifier $save_hmmscan_log_cond.classifier
             #if str($options_type.options_type_selector) == 'advanced':
                 --super_orthogroups $options_type.super_orthogroups
                 #if str($options_type.single_copy_cond) == 'taxa':
@@ -37,9 +39,13 @@
             #end if
             --scaffold_dir "${GALAXY_DATA_INDEX_DIR}/plant_tribes/scaffolds"
             --num_threads \${GALAXY_SLOTS:-4}
-            #if str($classifier) == 'hmmscan' or str($classifier) == 'both':
-                # Eliminate the hmmscan.log file
-                && rm $src_dir/*.log
+            #if str($save_hmmscan_log_cond.classifier) == 'hmmscan' or str($save_hmmscan_log_cond.classifier) == 'both':
+                #if str($save_hmmscan_log_cond.save_hmmscan_log) == 'yes':
+                    && mv $src_dir/hmmscan.log $hmmscan_log
+                #else:
+                    # Eliminate the hmmscan.log file
+                    && rm $src_dir/hmmscan.log
+                #end if
             #end if
             #if create_ortho_sequences:
                 && echo "Sequences classified into pre-computed orthologous plant gene family clusters: `ls $src_dir | wc -l` files" > $output
@@ -58,11 +64,26 @@
             <option value="orthofinder">OrthoFinder</option>
             <option value="orthomcl">OrthoMCL</option>
         </param>
-        <param name="classifier" type="select" label="Protein classification method">
-            <option value="blastp" selected="true">blastp</option>
-            <option value="hmmscan">HMMScan</option>
-            <option value="both">Both blastp and HMMScan</option>
-        </param>
+        <conditional name="save_hmmscan_log_cond">
+            <param name="classifier" type="select" label="Protein classification method">
+                <option value="blastp" selected="true">blastp</option>
+                <option value="hmmscan">HMMScan</option>
+                <option value="both">Both blastp and HMMScan</option>
+            </param>
+            <when value="blastp" />
+            <when value="hmmscan">
+                <param name="save_hmmscan_log" type="select" label="Save hmmscan log?" help="Save the hmmscan log in an additional output dataset">
+                    <option value="no" selected="true">No</option>
+                    <option value="yes">Yes</option>
+                </param>
+            </when>
+            <when value="both">
+                <param name="save_hmmscan_log" type="select" label="Save hmmscan log?" help="Save the hmmscan log in an additional output dataset">
+                    <option value="no" selected="true">No</option>
+                    <option value="yes">Yes</option>
+                </param>
+            </when>
+        </conditional>
         <conditional name="options_type">
             <param name="options_type_selector" type="select" label="Options Configuration">
                 <option value="basic" selected="true">Basic</option>
@@ -102,6 +123,9 @@
         <data name="output" format="txt" label="Sequences classified into gene family clusters on ${on_string}">
             <filter>options_type['options_type_selector'] == 'advanced' and options_type['create_orthogroup_cond']['create_orthogroup'] == 'yes'</filter>
         </data>
+        <data name="hmmscan_log" format="txt" label="Protein classification hmmscan.log on ${on_string}">
+            <filter>save_hmmscan_log_cond['classifier'] in ['hmmscan', 'both'] and save_hmmscan_log_cond['save_hmmscan_log'] == 'yes'</filter>
+        </data>
         <collection name="transcripts" type="list">
             <discover_datasets pattern="__name__" directory="geneFamilyClassification_dir" visible="false" ext="tabular" />
         </collection>