annotate ngsap-vc/gatk/gatk_macros.xml @ 3:0d10255b5434 draft default tip

Uploaded
author scisjnu123
date Thu, 03 Oct 2019 10:42:15 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
1 <macros>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
2
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
3 <xml name="requirements">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
4 <requirements>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
5 <requirement type="package">gatk</requirement>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
6 <requirement type="set_environment">GATK_PATH</requirement>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
7 <requirement type="set_environment">GATK_SITE_OPTIONS</requirement>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
8 <requirement type="package" version="3.1.2.1">package_r_for_gatk_3_4_0</requirement>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
9 </requirements>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
10 </xml>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
11
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
12 <xml name="version_command">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
13 <version_command><![CDATA[ @GATK_EXEC@ --help|grep '^The Genome' ]]></version_command>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
14 </xml>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
15
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
16 <token name="@VERSION@">3.4-0</token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
17 <token name="@OUTPUT_NAME_PREFIX@">${tool.name} - ${analysis_type.analysis_type_selector}</token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
18 <token name="@GATK_EXEC@">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
19 <![CDATA[
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
20 #if $cond_threads.cond_threads_enabled:
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
21 #if int($cond_threads.nct) > 1:
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
22 THREAD_STRING="-nct $cond_threads.nct" &&
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
23 #end if
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
24 #if int($cond_threads.nt) > 1:
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
25 THREAD_STRING=$THREAD_STRING" -nt $cond_threads.nt" &&
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
26 #end if
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
27 #if int($cond_threads.mem) > 0:
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
28 GATK_MEM=$cond_threads.mem &&
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
29 #end if
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
30 #end if
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
31 java -Xmx\${GATK_MEM:-\${SLURM_MEM_PER_NODE:-4096}}M -jar "\$GATK_PATH/GenomeAnalysisTK.jar" \${THREAD_STRING:-}
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
32 ]]>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
33 </token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
34
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
35 <xml name="macro_vcf_input" tokens="tag">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
36 <param name="input" type="data" format="vcf" multiple="true" label="Variant files (VCF format)" help="-V, &#8209;&#8209;variant">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
37 <validator type="unspecified_build" />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
38 <validator type="dataset_metadata_in_data_table" table_name="picard_indexes" metadata_name="dbkey" metadata_column="dbkey" message="Sequences are not currently available for the specified build." />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
39 </param>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
40 </xml>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
41 <token name="@token_vcf_input_pre@" tokens="tag">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
42 <![CDATA[
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
43 ############################
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
44 ## create links to gVCF input files with correct extensions
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
45 ############################
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
46 #for $i, $variant in enumerate($analysis_type.input):
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
47 ln -s -f ${variant} variant_${i}.vcf &&
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
48 #end for
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
49 ]]>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
50 </token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
51 <token name="@token_vcf_input@">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
52 <![CDATA[
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
53 #for $i, $variant in enumerate($analysis_type.input):
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
54 --variant variant_${i}.vcf
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
55 #end for
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
56 @token_reference_input@
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
57 ]]>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
58 </token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
59
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
60
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
61 <xml name="macro_gvcf_input" tokens="tag">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
62 <param name="input" type="data" format="vcf" multiple="true" label="Variant files (gVCF format)" help="-V, &#8209;&#8209;variant">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
63 <validator type="unspecified_build" />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
64 <validator type="dataset_metadata_in_data_table" table_name="picard_indexes" metadata_name="dbkey" metadata_column="dbkey" message="Sequences are not currently available for the specified build." />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
65 </param>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
66 </xml>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
67 <token name="@token_gvcf_input_pre@" tokens="tag">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
68 <![CDATA[
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
69 ############################
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
70 ## create links to gVCF input files with correct extensions
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
71 ############################
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
72 #for $i, $variant in enumerate($analysis_type.input):
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
73 ln -s -f ${variant} variant_${i}.g.vcf &&
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
74 #end for
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
75 ]]>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
76 </token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
77 <token name="@token_gvcf_input@">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
78 <![CDATA[
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
79 #for $i, $variant in enumerate($analysis_type.input):
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
80 --variant variant_${i}.g.vcf
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
81 #end for
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
82 @token_reference_input@
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
83 ]]>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
84 </token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
85
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
86 <xml name="macro_bam_input">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
87 <conditional name="cond_bam_input">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
88 <param name="all_in_one" type="boolean" value="false" label="Input all BAM files in a single command" />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
89 <when value="true">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
90 <param name="input" type="data" format="bam" multiple="true" label="Input file containing sequence data (BAM)" help="-I, ‑‑input_file">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
91 <validator type="unspecified_build"/>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
92 <validator type="dataset_metadata_in_data_table" table_name="picard_indexes" metadata_name="dbkey" metadata_column="dbkey" message="Sequences are not currently available for the specified build."/>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
93 </param>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
94 </when>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
95 <when value="false">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
96 <param name="input" type="data" format="bam" label="Input file containing sequence data (BAM)" help="-I, ‑‑input_file">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
97 <validator type="unspecified_build"/>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
98 <validator type="dataset_metadata_in_data_table" table_name="picard_indexes" metadata_name="dbkey" metadata_column="dbkey" message="Sequences are not currently available for the specified build."/>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
99 </param>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
100 </when>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
101 </conditional>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
102 </xml>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
103 <token name="@token_bam_input_pre@">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
104 <![CDATA[
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
105 ############################
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
106 ## create links to bam input files with correct extensions
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
107 ############################
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
108 #if $analysis_type.cond_bam_input.all_in_one
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
109 #for $i, $bam in enumerate($analysis_type.cond_bam_input.input):
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
110 ln -s -f ${bam} input_${i}.bam &&
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
111 ln -s -f ${bam.metadata.bam_index} input_${i}.bam.bai &&
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
112 #end for
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
113 #else
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
114 ln -s -f ${analysis_type.cond_bam_input.input} input.bam &&
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
115 ln -s -f ${analysis_type.cond_bam_input.input.metadata.bam_index} input.bam.bai &&
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
116 #end if
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
117 ]]>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
118 </token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
119 <token name="@token_bam_input@">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
120 <![CDATA[
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
121 #if $analysis_type.cond_bam_input.all_in_one
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
122 #for $i, $bam in enumerate($analysis_type.cond_bam_input.input):
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
123 --input_file input_${i}.bam
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
124 #end for
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
125 #else
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
126 --input_file input.bam
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
127 #end if
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
128 @token_reference_input@
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
129 ]]>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
130 </token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
131
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
132 <token name="@token_reference_input@">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
133 <![CDATA[
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
134 ]]>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
135 </token>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
136 <xml name="macro_input" tokens="tag">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
137 <yield />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
138 </xml>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
139
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
140 <xml name="macro_optional_parameters">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
141 <conditional name="optional_parameters">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
142 <param name="optional_parameters_enabled" type="boolean" label="Configure Optional Parameters" />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
143 <when value="true">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
144 <yield />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
145 </when>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
146 <when value="false" />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
147 </conditional>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
148 </xml>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
149
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
150 <xml name="macro_advanced_parameters">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
151 <conditional name="advanced_parameters">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
152 <param name="advanced_parameters_enabled" type="boolean" label="Configure Advanced Parameters" />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
153 <when value="true">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
154 <yield />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
155 </when>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
156 <when value="false" />
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
157 </conditional>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
158 </xml>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
159
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
160 <xml name="macro_tests">
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
161 <tests>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
162
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
163 </tests>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
164 </xml>
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
165
0d10255b5434 Uploaded
scisjnu123
parents:
diff changeset
166 </macros>