comparison plink.xml @ 10:2c0ac05fe240 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/plink commit 6d29c051fe8a6564805da7a13668d067c31f0e86
author iuc
date Tue, 14 Nov 2023 17:51:25 +0000
parents 272aca44b3dd
children
comparison
equal deleted inserted replaced
9:272aca44b3dd 10:2c0ac05fe240
1 <tool id='plink' name='plink' version='@TOOL_VERSION@+galaxy@VERSION_SUFFIX@'> 1 <tool id='plink' name='plink' version='@TOOL_VERSION@+galaxy@VERSION_SUFFIX@'>
2 <description>genome association analysis toolset</description>
2 <macros> 3 <macros>
3 <token name='@TOOL_VERSION@'>1.90b6.21</token> 4 <token name='@TOOL_VERSION@'>1.90b6.21</token>
4 <token name='@VERSION_SUFFIX@'>0</token> 5 <token name='@VERSION_SUFFIX@'>1</token>
5 <xml name='template_sanitizer'> 6 <xml name='template_sanitizer'>
6 <sanitizer> 7 <sanitizer>
7 <valid initial='default'> 8 <valid initial='default'>
8 <add value='#' /> 9 <add value='#' />
9 <add value='@' /> 10 <add value='@' />
48 <xrefs> 49 <xrefs>
49 <xref type="bio.tools">plink</xref> 50 <xref type="bio.tools">plink</xref>
50 </xrefs> 51 </xrefs>
51 <requirements> 52 <requirements>
52 <requirement type='package' version='@TOOL_VERSION@'>plink</requirement> 53 <requirement type='package' version='@TOOL_VERSION@'>plink</requirement>
54 <requirement type='package' version='5.3.0'>gawk</requirement>
53 </requirements> 55 </requirements>
54 <command detect_errors='exit_code'><![CDATA[ 56 <command detect_errors='exit_code'><![CDATA[
55 57
56 ## Create Plink folder for any inputs 58 ## Create Plink folder for any inputs
57 mkdir ./plink_output 59 mkdir ./plink_output
60 62
61 ## If bmerge is set, create folder for merged files 63 ## If bmerge is set, create folder for merged files
62 #if $functions.func == 'data_manage': 64 #if $functions.func == 'data_manage':
63 #if $functions.bmerge.set == 'Yes': 65 #if $functions.bmerge.set == 'Yes':
64 && mkdir bmerge_files 66 && mkdir bmerge_files
65 && ln -s '$functions.bmerge.bed.extra_files_path'/RgeneticsData.bed bmerge_files/bmerge_input.bed 67 && ln -s '$functions.bmerge.bed.extra_files_path/RgeneticsData.bed' 'bmerge_files/bmerge_input.bed'
66 && ln -s '$functions.bmerge.bed.extra_files_path'/RgeneticsData.bim bmerge_files/bmerge_input.bim 68 && ln -s '$functions.bmerge.bed.extra_files_path/RgeneticsData.bim' 'bmerge_files/bmerge_input.bim'
67 && ln -s '$functions.bmerge.bed.extra_files_path'/RgeneticsData.fam bmerge_files/bmerge_input.fam 69 && ln -s '$functions.bmerge.bed.extra_files_path/RgeneticsData.fam' 'bmerge_files/bmerge_input.fam'
68 #end if 70 #end if
69 #end if 71 #end if
70 72
71 73
72 #if $inputs.inputs.filetype == 'bfile': 74 #if $inputs.inputs.filetype == 'bfile':
73 && ln -s '$inputs.inputs.bed.extra_files_path'/RgeneticsData.bed plink_input/plink_input.bed 75 && ln -s '$inputs.inputs.bed.extra_files_path/RgeneticsData.bed' 'plink_input/plink_input.bed'
74 && ln -s '$inputs.inputs.bed.extra_files_path'/RgeneticsData.bim plink_input/plink_input.bim 76 && ln -s '$inputs.inputs.bed.extra_files_path/RgeneticsData.bim' 'plink_input/plink_input.bim'
75 && ln -s '$inputs.inputs.bed.extra_files_path'/RgeneticsData.fam plink_input/plink_input.fam 77 && ln -s '$inputs.inputs.bed.extra_files_path/RgeneticsData.fam' 'plink_input/plink_input.fam'
76 && plink --bfile plink_input/plink_input 78 && plink --bfile plink_input/plink_input
77 #elif $inputs.inputs.filetype == 'vcf': 79 #elif $inputs.inputs.filetype == 'vcf':
78 #if $inputs.inputs.input.is_of_type('bcf'): 80 #if $inputs.inputs.input.is_of_type('bcf'):
79 && plink --bcf '$inputs.inputs.input' 81 && plink --bcf '$inputs.inputs.input'
80 #else: 82 #else:
82 #end if 84 #end if
83 #end if 85 #end if
84 86
85 ## Plink commands by section 87 ## Plink commands by section
86 #if $inputs.covar_input: 88 #if $inputs.covar_input:
87 --covar '$inputs.covar_input' 89 --covar '$inputs.covar_input'
88 #end if 90 #end if
89 #if $inputs.set_pheno.set_pheno == 'Yes': 91 #if $inputs.set_pheno.set_pheno == 'Yes':
90 --pheno $inputs.set_pheno.pheno $inputs.set_pheno.all_pheno 92 --pheno $inputs.set_pheno.pheno $inputs.set_pheno.all_pheno
91 #end if 93 #end if
92 #if $functions.func == 'filtering': 94 #if $functions.func == 'filtering':
230 #end if 232 #end if
231 $functions.sex_founder_filter.nonfounders 233 $functions.sex_founder_filter.nonfounders
232 #end if 234 #end if
233 235
234 #elif $functions.func == 'data_manage': 236 #elif $functions.func == 'data_manage':
235
236 #if $functions.bmerge.set == 'Yes': 237 #if $functions.bmerge.set == 'Yes':
237 --bmerge bmerge_files/bmerge_input 238 --bmerge bmerge_files/bmerge_input
238 #end if 239 #end if
239 240
240 #if $functions.template: 241 #if $functions.template:
283 $functions.sex.mode.female_max 284 $functions.sex.mode.female_max
284 $functions.sex.mode.male_min 285 $functions.sex.mode.male_min
285 #end if 286 #end if
286 #end if 287 #end if
287 #end if 288 #end if
288
289
290 #elif $functions.func == 'link': 289 #elif $functions.func == 'link':
291 #if $functions.set_indep.choice == 'Yes': 290 #if $functions.set_indep.choice == 'Yes':
292 --indep-pairwise $functions.set_indep.window $functions.set_indep.step $functions.set_indep.r2 291 --indep-pairwise $functions.set_indep.window $functions.set_indep.step $functions.set_indep.r2
293 #end if 292 #end if
294 ## #elif $functions.func == 'pair_compare': 293 ## #elif $functions.func == 'pair_compare':
380 #if $functions.genome.ppc: 379 #if $functions.genome.ppc:
381 --ppc-gap $functions.genome.ppc 380 --ppc-gap $functions.genome.ppc
382 #end if 381 #end if
383 #end if 382 #end if
384 383
385 ## #elif $functions.func == 'scoring': 384 #elif $functions.func == 'scoring':
386 ## 385 --score '$functions.score_file' $functions.variant_id_i $functions.allel_codes_j $functions.scores_k $functions.header $functions.sum
387 ## #else: 386 ## #else:
388 ## --rerun $functions.logfile 387 ## --rerun $functions.logfile
389 ## 388 ##
390 #end if 389 #end if
391 --memory \${GALAXY_MEMORY_MB:-8192} 390 --memory \${GALAXY_MEMORY_MB:-8192}
408 && mv ./plink_output/*asso* assoc_out 407 && mv ./plink_output/*asso* assoc_out
409 && find ./assoc_out/. -type f -exec mv {} {}.txt ';' 408 && find ./assoc_out/. -type f -exec mv {} {}.txt ';'
410 #end if 409 #end if
411 #end if 410 #end if
412 && mkdir '$plink_out.extra_files_path' 411 && mkdir '$plink_out.extra_files_path'
413 && cp plink_output/plink_output.bed '$plink_out.extra_files_path'/RgeneticsData.bed 412 && cp plink_output/plink_output.bed '$plink_out.extra_files_path/RgeneticsData.bed'
414 && cp plink_output/plink_output.bim '$plink_out.extra_files_path'/RgeneticsData.bim 413 && cp plink_output/plink_output.bim '$plink_out.extra_files_path/RgeneticsData.bim'
415 && cp plink_output/plink_output.fam '$plink_out.extra_files_path'/RgeneticsData.fam 414 && cp plink_output/plink_output.fam '$plink_out.extra_files_path/RgeneticsData.fam'
415 #if $functions.func == 'scoring':
416 && awk -v OFS="\t" '{$1=$1; print}' plink_output/plink_output.profile > plink_output/plink_output.profile.tab
417 #end if
416 ]]></command> 418 ]]></command>
417 <inputs> 419 <inputs>
418 <section name='inputs' title='Data inputs' expanded='true'> 420 <section name='inputs' title='Data inputs' expanded='true'>
419 <conditional name='inputs'> 421 <conditional name='inputs'>
420 <param name='filetype' type='select' label='Main input data type'> 422 <param name='filetype' type='select' label='Main input data type'>
448 <option value='stats'>Basic statistics</option> 450 <option value='stats'>Basic statistics</option>
449 <option value='link'>Linkage disequalibrium</option> 451 <option value='link'>Linkage disequalibrium</option>
450 <option value='stratification'>Population stratification</option> 452 <option value='stratification'>Population stratification</option>
451 <option value='association'>Association analysis</option> 453 <option value='association'>Association analysis</option>
452 <option value='ibd'>Identity-by-descent</option> 454 <option value='ibd'>Identity-by-descent</option>
455 <option value='scoring'>Apply a linear scoring system (--score)</option>
453 <!-- <option value='rerun'>Rerun</option> --> 456 <!-- <option value='rerun'>Rerun</option> -->
454 </param> 457 </param>
455 <when value='filtering'> 458 <when value='filtering'>
456 <conditional name='id_list'> 459 <conditional name='id_list'>
457 <param name='func' type='select' label='ID list functions'> 460 <param name='func' type='select' label='ID list functions'>
968 <param name='intercept' label='Intercept' type='boolean' truevalue='intercept' falsevalue='' checked='false' help=''/> 971 <param name='intercept' label='Intercept' type='boolean' truevalue='intercept' falsevalue='' checked='false' help=''/>
969 </when> 972 </when>
970 </conditional> 973 </conditional>
971 <param name='lambda' type='float' label='Lambda value' optional='true'/> 974 <param name='lambda' type='float' label='Lambda value' optional='true'/>
972 </when> 975 </when>
973 <!-- <when value='scoring'> 976 <when value='scoring'>
974 </when> --> 977 <!-- this implements a part of the -\-score parameter -->
978 <param name='score_file' format='tabular' type='data' label='Scoring system which should be applied to all samples'/>
979 <param name="variant_id_i" type="data_column" data_ref="score_file" label="Variant ID column"/>
980 <param name="allel_codes_j" type="data_column" data_ref="score_file" label="Allel column"/>
981 <param name="scores_k" type="data_column" data_ref="score_file" label="Score column"/>
982 <param name='header' type='boolean' truevalue='header' falsevalue='' checked='false' label='Is a header line present in the scores file?'/>
983
984 <param name="sum" type="select" label="How to combine the valid per-variant scores?" help="Average is the default, but it can be changed to sum.">
985 <option value="">Final scores are averages of the valid per-variant scores</option>
986 <option value="sum">Report sums (sum; can not be used with 'no-mean-imputation'; is automatically on with dosage data)</option>
987 <option value="no-sum">Disable sum (no-sum)</option>
988 </param>
989 </when>
975 <when value='ibd'> 990 <when value='ibd'>
976 <conditional name='genome'> 991 <conditional name='genome'>
977 <param name='output_genome' type='select' help='Perform and return results of IBS/IBD computation'> 992 <param name='output_genome' type='select' help='Perform and return results of IBS/IBD computation'>
978 <option value=''>No</option> 993 <option value=''>No</option>
979 <option value='Yes'>Yes</option> 994 <option value='Yes'>Yes</option>
1058 <!--IBD--> 1073 <!--IBD-->
1059 <data name='genome' format='tabular' from_work_dir='plink_output/plink_output.genome' label='${tool.name}: Genome'> 1074 <data name='genome' format='tabular' from_work_dir='plink_output/plink_output.genome' label='${tool.name}: Genome'>
1060 <filter>functions['func'] == 'ibd' and functions['genome']['output_genome']</filter> 1075 <filter>functions['func'] == 'ibd' and functions['genome']['output_genome']</filter>
1061 </data> 1076 </data>
1062 1077
1078 <!--scores-->
1079 <data name='scores' format='tabular' from_work_dir='plink_output/plink_output.profile.tab' label='${tool.name}: Scores'>
1080 <filter>functions['func'] == 'scoring'</filter>
1081 </data>
1082
1063 <!--Stratifiction--> 1083 <!--Stratifiction-->
1064 <data name='mds' format='txt' from_work_dir='plink_output/plink_output.mds' label='${tool.name}: MDS'> 1084 <data name='mds' format='txt' from_work_dir='plink_output/plink_output.mds' label='${tool.name}: MDS'>
1065 <filter>functions['func'] == 'stratification' and functions['cluster']['cluster'] == 'Yes' and functions['cluster']['mds']['mds_scaling'] == 'Yes'</filter> 1085 <filter>functions['func'] == 'stratification' and functions['cluster']['cluster'] == 'Yes' and functions['cluster']['mds']['mds_scaling'] == 'Yes'</filter>
1066 </data> 1086 </data>
1067 <data name='cluster1' format='tabular' from_work_dir='plink_output/plink_output.cluster1' label='${tool.name}: Cluster 1'> 1087 <data name='cluster1' format='tabular' from_work_dir='plink_output/plink_output.cluster1' label='${tool.name}: Cluster 1'>
1201 <extra_files type="file" name="RgeneticsData.fam" value="vcf_out.fam"/> 1221 <extra_files type="file" name="RgeneticsData.fam" value="vcf_out.fam"/>
1202 </output> 1222 </output>
1203 <expand macro="log_out_assert"/> 1223 <expand macro="log_out_assert"/>
1204 </test> 1224 </test>
1205 1225
1226
1206 <test expect_num_outputs='8'> 1227 <test expect_num_outputs='8'>
1207 <section name='inputs'> 1228 <section name='inputs'>
1208 <conditional name='inputs'> 1229 <conditional name='inputs'>
1209 <param name='filetype' value='bfile'/> 1230 <param name='filetype' value='bfile'/>
1210 <param name='bed' value='' ftype="pbed"> 1231 <param name='bed' value='' ftype="pbed">
1391 </conditional> 1412 </conditional>
1392 </conditional> 1413 </conditional>
1393 <expand macro="log_out_assert"/> 1414 <expand macro="log_out_assert"/>
1394 <output name='genome' file='out.genome'/> 1415 <output name='genome' file='out.genome'/>
1395 </test> 1416 </test>
1417 <!-- scoring function test-->
1418 <test expect_num_outputs='3'>
1419 <section name='inputs'>
1420 <conditional name='inputs'>
1421 <param name='filetype' value='bfile'/>
1422 <param name='bed' value='' ftype="pbed">
1423 <composite_data value="plink.bim"/>
1424 <composite_data value="plink.bed"/>
1425 <composite_data value="plink.fam"/>
1426 </param>
1427 </conditional>
1428 </section>
1429 <conditional name='functions'>
1430 <param name='func' value='scoring'/>
1431 <param name='score_file' value='scores_file.tab'/>
1432 <param name='variant_id_i' value='1'/>
1433 <param name='allel_codes_j' value='2'/>
1434 <param name='scores_k' value='3'/>
1435 <param name='header' value='true'/>
1436 <param name='sum' value='sum'/>
1437 </conditional>
1438 <expand macro="log_out_assert"/>
1439 <output name='scores' file='scores_results.tab'/>
1440 </test>
1396 </tests> 1441 </tests>
1397 <help><![CDATA[ 1442 <help><![CDATA[
1398 PLINK is a free, open-source whole genome association analysis toolset, designed to perform a range of basic, large-scale analyses in a computationally efficient manner. 1443 PLINK is a free, open-source whole genome association analysis toolset, designed to perform a range of basic, large-scale analyses in a computationally efficient manner.
1399 1444
1400 For detailed usage notes, visit http://www.cog-genomics.org/plink/2.0/ 1445 For detailed usage notes, visit http://www.cog-genomics.org/plink/2.0/