comparison gemini_burden.xml @ 4:c70d79e0eed7 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gemini commit 283362494058ed64143b1f27afb447b8a1cb4313
author iuc
date Fri, 14 Dec 2018 13:03:59 -0500
parents e799c1a6854b
children 699ce2631e79
comparison
equal deleted inserted replaced
3:1a4c5adcd587 4:c70d79e0eed7
1 <tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@.0"> 1 <tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@.1">
2 <description>perform sample-wise gene-level burden calculations</description> 2 <description>perform sample-wise gene-level burden calculations</description>
3 <macros> 3 <macros>
4 <import>gemini_macros.xml</import> 4 <import>gemini_macros.xml</import>
5 <token name="@BINARY@">burden</token> 5 <token name="@BINARY@">burden</token>
6 <token name="@GEMINI_BUG_WARNING@">Caveat: due to a bug in this version of GEMINI, filtering on alternate allele frequency will get disabled when you select 'All non-synonymous variants' as the types of variants to be used for the burden calculations above.</token>
6 </macros> 7 </macros>
7 <expand macro="requirements" /> 8 <expand macro="requirements" />
8 <expand macro="stdio" /> 9 <expand macro="stdio" />
9 <expand macro="version_command" /> 10 <expand macro="version_command" />
10 <command> 11 <command>
11 <![CDATA[ 12 <![CDATA[
12 gemini @BINARY@ 13 gemini @BINARY@
13 --cases $cases
14 --controls $controls
15 $save_tscores
16 $nonsynonymous 14 $nonsynonymous
17 $calpha 15 #if str($analysis.mode) == "c-alpha":
18 --permutations $permutations 16 --calpha
19 #if float( str($min_aaf) ) >= 0.0: 17 #if str($analysis.casecontrol.source) == "custom":
20 --min-aaf $min_aaf 18 --cases
19 #echo (" ".join("'" + token + "'" for token in $analysis.casecontrol.cases.strip().split()))#
20 --controls
21 #echo (" ".join("'" + token + "'" for token in $analysis.casecontrol.controls.strip().split()))#
22 #end if
23 --min-aaf ${analysis.min_aaf}
24 --max-aaf ${analysis.max_aaf}
25 --permutations ${analysis.permutations}
26 ${analysis.save_tscores}
21 #end if 27 #end if
22 #if float( str($max_aaf) ) >= 0.0: 28 "$infile"
23 --max-aaf $max_aaf 29 > "$outfile"
24 #end if 30 #if str($analysis.mode) == "c-alpha" and $analysis.save_tscores:
25 "${ infile }" 31 && touch permutated_t_scores.txt
26 > "${ outfile }" 32 && mv permutated_t_scores.txt $t_scores
33 #end if
27 ]]> 34 ]]>
28 35
29 </command> 36 </command>
30 <inputs> 37 <inputs>
31 <expand macro="infile" /> 38 <expand macro="infile" />
32 39 <param argument="--non-synonymous" name="nonsynonymous" type="select"
33 <param name="cases" type="text" value="" label="Space separated list of cases for association testing" help="(--cases)"/> 40 label="Use the following types of variants for the burden calculation">
34 <param name="controls" type="text" value="" label="Space separated list of controls for association testing" help="(--controls)"/> 41 <option value="">High impact variants only</option>
35 42 <option value="--nonsynonymous">All non-synonymous variants</option>
36 <param name="save_tscores" type="boolean" truevalue="--save_tscores" falsevalue="" checked="False"
37 label="Save the permuted T-scores in the output file" help="(--save_tscores)"/>
38
39 <param name="nonsynonymous" type="boolean" truevalue="--nonsynonymous" falsevalue="" checked="False"
40 label="Count all nonsynonymous variants as contributing burden" help="(--nonsynonymous)"/>
41 <param name="calpha" type="boolean" truevalue="--calpha" falsevalue="" checked="False"
42 label="Run the C-alpha association test" help="(--calpha)"/>
43 <param name="min_aaf" type="float" value="-1" label="The min. alt. allele frequency for a variant to be included"
44 help="(--min-aaf)">
45 <!--validator type="in_range" min="0.0"/-->
46 </param> 43 </param>
47 <param name="max_aaf" type="float" value="-1" label="The max. alt. allele frequency for a variant to be included" 44 <conditional name="analysis">
48 help="(--max-aaf)"> 45 <param argument="--calpha" name="mode" type="select"
49 <!--validator type="in_range" min="0.0"/--> 46 label="Which type of burden calculation should be performed?">
50 </param> 47 <option value="counts">Count of variants per gene and sample</option>
51 48 <option value="c-alpha">C-alpha association test per gene</option>
52 <param name="permutations" type="integer" value="1000" label="Number of permutations to run for the C-alpha test" 49 </param>
53 help="(--permutations)"> 50 <when value="counts" />
54 <validator type="in_range" min="0"/> 51 <when value="c-alpha">
55 </param> 52 <conditional name="casecontrol">
56 53 <param name="source" type="select"
54 label="Selection of case and control samples"
55 help="Specify how case and control samples for the C-alpha association test should be selected">
56 <option value="ped">Use PED file information</option>
57 <option value="custom">Custom selection</option>
58 </param>
59 <when value="ped" />
60 <when value="custom">
61 <param argument="--cases" name="cases" type="text" value=""
62 label="Space separated list of cases for association testing"/>
63 <param argument="--controls" name="controls" type="text" value=""
64 label="Space separated list of controls for association testing" help="(--controls)"/>
65 </when>
66 </conditional>
67 <param argument="--min-aaf" name="min_aaf" type="float" min="0" max="1" value="0"
68 label="The min. alt. allele frequency for a variant to be included"
69 help="@GEMINI_BUG_WARNING@" />
70 <param argument="--max-aaf" name="max_aaf" type="float" min="0" max="1" value="1"
71 label="The max. alt. allele frequency for a variant to be included"
72 help="@GEMINI_BUG_WARNING@" />
73 <param argument="--permutations" name="permutations" type="integer" min="1" value="100" label="Number of permutations to run for the C-alpha test" />
74 <param argument="--save_tscores" name="save_tscores" type="boolean" truevalue="--save_tscores" falsevalue="" checked="False"
75 label="Save the list of individual T-scores from all permutations as an extra dataset" />
76 </when>
77 </conditional>
57 </inputs> 78 </inputs>
58 <outputs> 79 <outputs>
59 <data name="outfile" format="tabular" /> 80 <data name="outfile" format="tabular"
81 label="GEMINI burden ${analysis.mode} on ${on_string}" />
82 <data name="t_scores" format="tabular"
83 label="GEMINI burden permuted T scores on ${on_string}">
84 <filter>analysis['mode'] == 'c-alpha' and analysis['save_tscores']</filter>
85 </data>
60 </outputs> 86 </outputs>
61 <tests> 87 <tests>
62 <test> 88 <test expect_num_outputs="1">
63 <param name="infile" value="gemini_burden_input.db" ftype="gemini.sqlite" /> 89 <!-- test counts mode with defaults -->
64 <param name="controls" value="M10475 M10478" /> 90 <param name="infile" value="gemini_de_novo_input.db" ftype="gemini.sqlite" />
65 <param name="cases" value="M10500 M128215" /> 91 <conditional name="analysis">
66 <param name="calpha" value="True" /> 92 <param name="mode" value="counts" />
67 <output name="outfile" file="gemini_burden_result.tabular" /> 93 </conditional>
94 <output name="outfile" file="gemini_burden_count_highimpact_result.tabular" />
95 </test>
96 <test expect_num_outputs="1">
97 <!-- test nonsynonymous parameter -->
98 <param name="infile" value="gemini_de_novo_input.db" ftype="gemini.sqlite" />
99 <param name="nonsynonymous" value="--nonsynonymous" />
100 <conditional name="analysis">
101 <param name="mode" value="counts" />
102 </conditional>
103 <output name="outfile" file="gemini_burden_count_nonsynonymous_result.tabular" />
104 </test>
105 <test expect_num_outputs="1">
106 <!-- test c-alpha mode with defaults -->
107 <param name="infile" value="gemini_de_novo_input.db" ftype="gemini.sqlite" />
108 <conditional name="analysis">
109 <param name="mode" value="c-alpha" />
110 <conditional name="casecontrol">
111 <param name="source" value="ped" />
112 </conditional>
113 </conditional>
114 <output name="outfile" file="gemini_burden_calpha_template.tabular" compare="re_match" />
115 </test>
116 <test expect_num_outputs="1">
117 <!-- test c-alpha mode with user-supplied case/control samples -->
118 <param name="infile" value="gemini_de_novo_input.db" ftype="gemini.sqlite" />
119 <conditional name="analysis">
120 <param name="mode" value="c-alpha" />
121 <conditional name="casecontrol">
122 <param name="source" value="custom" />
123 <param name="controls" value="1_kid 3_kid" />
124 <param name="cases" value="1_dad 1_mom 3_dad 3_mom" />
125 </conditional>
126 </conditional>
127 <output name="outfile" file="gemini_burden_calpha_template.tabular" compare="re_match" />
128 </test>
129 <test expect_num_outputs="2">
130 <!-- test additional T scores output generation -->
131 <param name="infile" value="gemini_de_novo_input.db" ftype="gemini.sqlite" />
132 <conditional name="analysis">
133 <param name="mode" value="c-alpha" />
134 <conditional name="casecontrol">
135 <param name="source" value="custom" />
136 <param name="controls" value="1_kid 3_kid" />
137 <param name="cases" value="1_dad 1_mom 3_dad 3_mom" />
138 </conditional>
139 <param name="permutations" value="2" />
140 <param name="save_tscores" value="True" />
141 </conditional>
142 <output name="t_scores">
143 <assert_contents>
144 <has_line_matching expression="WDR37&#009;.+&#009;.+" />
145 </assert_contents>
146 </output>
68 </test> 147 </test>
69 </tests> 148 </tests>
70 <help><![CDATA[ 149 <help><![CDATA[
71 **What it does** 150 **What it does**
72 151