diff plink.xml @ 7:66b35562554d draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/plink commit 6e391fa7267f5225f0bca795c002107821bbac27"
author iuc
date Mon, 05 Oct 2020 16:08:24 +0000
parents f76d842e960f
children 16d22eee0fe3
line wrap: on
line diff
--- a/plink.xml	Wed Sep 30 20:29:06 2020 +0000
+++ b/plink.xml	Mon Oct 05 16:08:24 2020 +0000
@@ -1,7 +1,7 @@
 <tool id='plink' name='plink' version='@TOOL_VERSION@+galaxy@VERSION_SUFFIX@'>
     <macros>
         <token name='@TOOL_VERSION@'>1.9.b618</token>
-        <token name='@VERSION_SUFFIX@'>1</token>
+        <token name='@VERSION_SUFFIX@'>2</token>
         <xml name='template_sanitizer'>
             <sanitizer>
                 <valid initial='default'>
@@ -76,8 +76,8 @@
     #if $inputs.covar_input:
             --covar '$inputs.covar_input'
     #end if
-    #if $inputs.pheno:
-        --pheno $inputs.pheno
+    #if $inputs.set_pheno.set_pheno == 'Yes':
+        --pheno $inputs.set_pheno.pheno $inputs.set_pheno.all_pheno
     #end if
     #if $functions.func == 'filtering':
         ##ID list functions
@@ -381,6 +381,24 @@
     --memory \${GALAXY_MEMORY_MB:-8192}
     --make-bed
     --out plink_output/plink_output
+
+    #if $functions.func == 'association':
+        #if $functions.logistic.logistic == 'Yes':
+            && mkdir logistic_out
+            && mv plink_output/plink_output.*.l* logistic_out
+            && find ./logistic_out/. -type f -exec mv {} {}.txt ';'
+        #end if
+        #if $functions.adjust.adjust == 'Yes':
+            && mkdir adjust_out
+            && mv ./plink_output/*.adjuste* adjust_out
+            && find ./adjust_out/. -type f -exec mv {} {}.txt ';'
+        #end if
+        #if $functions.assoc.assoc == 'Yes':
+            && mkdir assoc_out
+            && mv ./plink_output/*asso* assoc_out
+            && find ./assoc_out/. -type f -exec mv {} {}.txt ';'
+        #end if
+    #end if
     ]]></command>
     <inputs>
         <section name='inputs' title='Data inputs' expanded='true'>
@@ -398,7 +416,17 @@
                     <param name='input' format='vcf,vcf_bgzip,bcf' type='data' label='VCF/BCF Input file'/>
                 </when>
             </conditional>
-            <param name='pheno' type='data' format='txt,tabular' label='Phenotype file' help='Read phenotype values from the 3rd column of the specified space- or tab-delimited file, instead of the .fam or .ped file.' optional='true'/> 
+            <conditional name='set_pheno'>
+                <param name='set_pheno' type='select' label='Set phenotype'>
+                    <option value=''>No</option>
+                    <option value='Yes'>Yes</option>
+                </param>
+                <when value=''/>
+                <when value='Yes'>
+                    <param name='pheno' type='data' format='txt,tabular' label='Phenotype file' help='Read phenotype values from the 3rd column of the specified space- or tab-delimited file, instead of the .fam or .ped file.'/> 
+                    <param name='all_pheno' type='boolean' truevalue='--all-pheno' falsevalue='' label='Allow all phenotypes present in the phenotype file to be subject to the association tests you have requested' checked='false'/>
+                </when>
+            </conditional>
             <param name='covar_input' type='data' format='tabular,tsv' label='Input covariate file' optional='true'/>
         </section>
         <conditional name='functions'>
@@ -998,52 +1026,21 @@
         </data>
         
         <!--Association-->
-           <!--assoc-->
-        <data name='assoc' format='tabular' from_work_dir='plink_output/plink_output.assoc' label='${tool.name}: Association'>
-            <filter>functions['func'] == 'association' and functions['assoc']['assoc'] == 'Yes' and not functions['assoc']['fisher']</filter>         
-        </data>
-        <data name='perm' format='tabular' from_work_dir='plink_output/plink_output.assoc.perm' label='${tool.name}: Association Monte Carlo'>
-            <filter>functions['func'] == 'association' and functions['assoc']['assoc'] == 'Yes' and functions['assoc']['perm']['perm'] == 'perm' and not functions['assoc']['fisher']</filter>
-        </data>
-        <data name='mperm' format='tabular' from_work_dir='plink_output/plink_output.assoc.mperm' label='${tool.name}: Association Max(T) permutation test'>
-            <filter>functions['func'] == 'association' and functions['assoc']['assoc'] == 'Yes' and functions['assoc']['perm']['perm'] == 'mperm' and not functions['assoc']['fisher']</filter>
-        </data>
-        <data name='fisher' format='tabular' from_work_dir='plink_output/plink_output.assoc.fisher' label='${tool.name}: Association Fisher'>
-            <filter>functions['func'] == 'association' and functions['assoc']['assoc'] == 'Yes' and functions['assoc']['assoc'] == 'Yes' and functions['assoc']['fisher']</filter>
-        </data>
-        <data name='fisher_perm' format='tabular' from_work_dir='plink_output/plink_output.assoc.fisher.perm' label='${tool.name}: Association Fisher perm'>
-            <filter>functions['func'] == 'association' and functions['assoc']['assoc'] == 'Yes' and functions['assoc']['perm']['perm'] == 'perm' and functions['assoc']['fisher']</filter>
-        </data>
-        <data name='fisher_mperm' format='tabular' from_work_dir='plink_output/plink_output.assoc.fisher.mperm' label='${tool.name}: Association Fisher mperm'>
-            <filter>functions['func'] == 'association' and functions['assoc']['assoc'] == 'Yes' and functions['assoc']['perm']['perm'] == 'mperm' and functions['assoc']['fisher']</filter>
-        </data>
-
-           <!--adjust-->
-        <data name='adjust' format='tabular' from_work_dir='plink_output/plink_output.assoc.adjusted' label='${tool.name}: Adjusted'>
-            <filter>functions['func'] == 'association' and functions['assoc']['assoc'] == 'Yes' and functions['adjust']['adjust'] == 'Yes' and not functions['assoc']['fisher']</filter>
-        </data>
-        <data name='adjust_fisher' format='tabular' from_work_dir='plink_output/plink_output.assoc.fisher.adjusted' label='${tool.name}: Fisher Adjusted'>
-            <filter>functions['func'] == 'association' and functions['assoc']['assoc'] == 'Yes' and functions['adjust']['adjust'] == 'Yes' and functions['assoc']['fisher']</filter>
-        </data>
-        <data name='adjust_logistic' format='tabular' from_work_dir='plink_output/plink_output.assoc.logistic.adjusted' label='${tool.name}: Logistic Adjusted'>
-            <filter>functions['func'] == 'association' and functions['adjust']['adjust'] == 'Yes' and functions['logistic']['logistic'] == 'Yes'</filter>
-        </data>
-
-        <!-- <data name='linear' format='tabular' from_work_dir='plink_output/plink_output.assoc.linenar' label='${tool.name}: Linear Regression'>
-            <filter>functions['func'] == 'association' and functions.func.association.linear['linear'] == 'Yes'</filter>
-        </data> -->
-
+            <!--Assoc -->
+        <collection name='assoc_outfiles' type='list' label='Association outfiles'>
+            <discover_datasets directory='assoc_out' pattern='__name_and_ext__'/>
+                <filter>functions['func'] == 'association' and functions['assoc']['assoc'] == 'Yes'</filter>
+        </collection>
+            <!--Adjust-->
+        <collection name='adjust_outfiles' type='list' label='Adjust outfiles'>
+            <discover_datasets directory='adjust_out' pattern='__name_and_ext__'/>
+                <filter>functions['func'] == 'association' and functions['adjust']['adjust'] == 'Yes'</filter>
+        </collection>
             <!--Logistic-->
-        <data name='logistic' format='tabular' from_work_dir='plink_output/plink_output.assoc.logistic' label='${tool.name}: Logistic Regression'>
-            <filter>functions['func'] == 'association' and functions['logistic']['logistic'] == 'Yes'</filter>
-        </data>
-        <data name='logistic_perm' format='tabular' from_work_dir='plink_output/plink_output.assoc.logistic.perm' label='${tool.name}: Logistic Association Monte Carlo'>
-            <filter>functions['func'] == 'association' and functions['logistic']['logistic'] == 'Yes' and  functions['logistic']['perm']['perm'] == 'perm'</filter>
-        </data>
-        <data name='logistic_mperm' format='tabular' from_work_dir='plink_output/plink_output.assoc.logistic.mperm' label='${tool.name}: Logistic Association Max(T) permutation test'>
-            <filter>functions['func'] == 'association' and functions['logistic']['logistic'] == 'Yes' and  functions['logistic']['perm']['perm'] == 'mperm'</filter>
-        </data>
-        
+        <collection name='log_outfiles' type='list' label='Logistic outfiles'>
+            <discover_datasets directory='logistic_out' pattern='__name_and_ext__'/>
+                <filter>functions['func'] == 'association' and functions['logistic']['logistic'] == 'Yes'</filter>
+        </collection>   
         <!--Link-->
         <data name='prune_in' format='tabular' from_work_dir='plink_output/plink_output.prune.in' label='${tool.name}: Prune In'>
             <filter>functions['func'] == 'link' and functions['set_indep']['choice'] == 'Yes'</filter>
@@ -1291,7 +1288,7 @@
             <output name='eigenvals' value='plink.mds.eigenval' compare='sim_size'/>
         </test>
 
-        <test expect_num_outputs='11'>
+        <test expect_num_outputs='8'>
             <section name='inputs'>
                 <conditional name='inputs'>
                     <param name='filetype' value='bfile'/>
@@ -1333,12 +1330,18 @@
                 <element name='plink_bim' file='out.assoc.bim'/>
                 <element name='plink_fam' file='out.assoc.fam'/>
             </output_collection>
-            <output name='fisher' value="out.assoc.fisher"/>
-            <output name='adjust_fisher' value="out.assoc.fisher.adjusted" sort="True" />
-            <output name='fisher_mperm' value="out.assoc.fisher.mperm" compare='sim_size'/>
-            <output name='logistic' value="out.assoc.logistic"/>
-            <output name='adjust_logistic' value="out.assoc.logistic.adjusted"/>
-            <output name='logistic_perm' value="out.assoc.logistic.perm" compare='sim_size'/>
+            <output_collection name='assoc_outfiles'  type='list' count='2'>
+                <element name='plink_output.assoc.fisher.mperm' value='out.assoc.fisher.mperm' compare='sim_size'/>
+                <element name='plink_output.assoc.fisher' value='out.assoc.fisher'/>
+            </output_collection>
+            <output_collection name='adjust_outfiles' type='list' count='1'>
+                <element name='plink_output.assoc.fisher.adjusted' value='out.assoc.fisher.adjusted' compare='sim_size' />
+            </output_collection>
+            <output_collection name='log_outfiles' type='list' count='3'>
+                <element name='plink_output.assoc.logistic' value='out.assoc.logistic'/>
+                <element name='plink_output.assoc.logistic.adjusted' value='out.assoc.logistic.adjusted'/>
+                <element name='plink_output.assoc.logistic.perm' value='out.assoc.logistic.perm' compare='sim_size'/>
+            </output_collection>
         </test>
 
         <test expect_num_outputs='6'>