comparison gemini_annotate.xml @ 7:567837ca5f33 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gemini commit 251c6024b4ff643a63e17fbfe2590998c2bae3a7"
author iuc
date Fri, 24 Jan 2020 17:35:20 -0500
parents 0c8f7322f8fc
children cf0f0f05ba9f
comparison
equal deleted inserted replaced
6:0c8f7322f8fc 7:567837ca5f33
1 <tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@+galaxy1"> 1 <tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@+galaxy2">
2 <description>the variants in an existing GEMINI database with additional information</description> 2 <description>the variants in an existing GEMINI database with additional information</description>
3 <macros> 3 <macros>
4 <import>gemini_macros.xml</import> 4 <import>gemini_macros.xml</import>
5 <token name="@BINARY@">annotate</token> 5 <token name="@BINARY@">annotate</token>
6 <xml name="add_as"> 6 <xml name="add_as">
17 <expand macro="version_command" /> 17 <expand macro="version_command" />
18 <command> 18 <command>
19 <![CDATA[ 19 <![CDATA[
20 20
21 ## For GEMINI to work correctly, tabixed file must have form [name].[bed|vcf].gz 21 ## For GEMINI to work correctly, tabixed file must have form [name].[bed|vcf].gz
22 #set $tabixed_file = "tabixed.%s.gz" % $annotate_source.ext 22 #if $annotate_source.ext == 'vcf_bgzip':
23 bgzip -c '$annotate_source' > '$tabixed_file' && 23 ## File is bgzipped and tabixed already -> just symlink data and index
24 tabix -p '$annotate_source.ext' '$tabixed_file' && 24 #set $tabixed_file = 'tabixed.vcf.gz'
25 ln -s '$annotate_source' $tabixed_file &&
26 ln -s '$annotate_source.metadata.tabix_index' ${tabixed_file}.tbi &&
27 #else:
28 ## bgzip and index vcf or bed
29 #set $tabixed_file = "tabixed.%s.gz" % $annotate_source.ext
30 bgzip -c '$annotate_source' > '$tabixed_file' &&
31 tabix -p '$annotate_source.ext' '$tabixed_file' &&
32 #end if
33 ## gemini annotate modifies its input database in-place so, in Galaxy,
34 ## we need to create a copy first!
25 cp '$infile' '$outfile' && 35 cp '$infile' '$outfile' &&
26 36
27 gemini @BINARY@ 37 gemini @BINARY@
28 -f '$tabixed_file' 38 -f '$tabixed_file'
29 -a $a.a_selector 39 -a $a.a_selector
44 -o #echo ",".join($operations) 54 -o #echo ",".join($operations)
45 -c '#echo ",".join($column_names)#' 55 -c '#echo ",".join($column_names)#'
46 #else: 56 #else:
47 -c '${a.column_name}' 57 -c '${a.column_name}'
48 #end if 58 #end if
49 #if str($annotate_source.ext) == "vcf": 59 #if str($annotate_source.ext) != "bed":
50 $region_only 60 $region_only
51 #end if 61 #end if
52 '$outfile' 62 '$outfile'
53 ]]> 63 ]]>
54 </command> 64 </command>
55 <inputs> 65 <inputs>
56 <expand macro="infile" /> 66 <expand macro="infile" />
57 <param argument="-f" name="annotate_source" type="data" format="vcf,bed" 67 <param argument="-f" name="annotate_source" type="data" format="vcf,vcf_bgzip,bed"
58 label="Dataset to use as the annotation source" 68 label="Dataset to use as the annotation source"
59 help="The tool can use the information from a BED or VCF dataset to annotate the database variants."/> 69 help="The tool can use the information from a BED or VCF dataset to annotate the database variants."/>
60 <param argument="--region-only" name="region_only" type="boolean" checked="true" truevalue="" falsevalue="--region-only" 70 <param argument="--region-only" name="region_only" type="boolean" checked="true" truevalue="" falsevalue="--region-only"
61 label="Strict variant-identity matching of database and annotation records (VCF format only)" 71 label="Strict variant-identity matching of database and annotation records (VCF format only)"
62 help="The default is to consider VCF-formatted annotations only if a variant in the GEMINI database and a record in the annotation source describe the exact same nucleotide change at the same position in the genome. You can disable this option to make use of any annotation that overlaps with the position of a database variant. This setting is ignored for annotation sources in BED format, for which matching is always based on overlapping positions only." /> 72 help="The default is to consider VCF-formatted annotations only if a variant in the GEMINI database and a record in the annotation source describe the exact same nucleotide change at the same position in the genome. You can disable this option to make use of any annotation that overlaps with the position of a database variant. This setting is ignored for annotation sources in BED format, for which matching is always based on overlapping positions only." />
110 <outputs> 120 <outputs>
111 <data name="outfile" format="gemini.sqlite" /> 121 <data name="outfile" format="gemini.sqlite" />
112 </outputs> 122 </outputs>
113 <tests> 123 <tests>
114 <test> 124 <test>
115 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" /> 125 <!-- test with annotation source in bed format -->
116 <param name="annotate_source" value="anno.bed" /> 126 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" />
127 <param name="annotate_source" value="anno.bed" ftype="bed" />
117 <param name="region_only" value="false" /> 128 <param name="region_only" value="false" />
118 <conditional name="a"> 129 <conditional name="a">
119 <param name="a_selector" value="count" /> 130 <param name="a_selector" value="count" />
120 <param name="column_name" value="anno5" /> 131 <param name="column_name" value="anno5" />
121 </conditional> 132 </conditional>
122 <assert_command> 133 <assert_command>
134 <!-- confirm region_only gets ignored for bed input -->
123 <not_has_text text="--region-only" /> 135 <not_has_text text="--region-only" />
124 </assert_command> 136 </assert_command>
137 <output name="outfile" file="gemini_annotate_result.db" ftype="gemini.sqlite" compare="sim_size" delta="1000"/>
138 </test>
139 <test>
140 <!-- test with annotation source in vcf format -->
141 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" />
142 <param name="annotate_source" value="gemini_amend.vcf" ftype="vcf" />
143 <param name="region_only" value="false" />
144 <conditional name="a">
145 <param name="a_selector" value="count" />
146 <param name="column_name" value="anno5" />
147 </conditional>
148 <output name="outfile" file="gemini_annotate_result.db" ftype="gemini.sqlite" compare="sim_size" delta="1000"/>
149 </test>
150 <test>
151 <!-- test with annotation source in vcf_bgzip format -->
152 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" />
153 <param name="annotate_source" value="gemini_amend.vcf.gz" ftype="vcf_bgzip" />
154 <param name="region_only" value="false" />
155 <conditional name="a">
156 <param name="a_selector" value="count" />
157 <param name="column_name" value="anno5" />
158 </conditional>
125 <output name="outfile" file="gemini_annotate_result.db" ftype="gemini.sqlite" compare="sim_size" delta="1000"/> 159 <output name="outfile" file="gemini_annotate_result.db" ftype="gemini.sqlite" compare="sim_size" delta="1000"/>
126 </test> 160 </test>
127 <test> 161 <test>
128 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" /> 162 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" />
129 <param name="annotate_source" value="anno.bed" /> 163 <param name="annotate_source" value="anno.bed" />
136 <param name="operation" value="first" /> 170 <param name="operation" value="first" />
137 </repeat> 171 </repeat>
138 </conditional> 172 </conditional>
139 <assert_command> 173 <assert_command>
140 <has_text_matching expression="-a +extract" /> 174 <has_text_matching expression="-a +extract" />
141 <has_text_matching expression="-e +1" /> 175 <has_text_matching expression="-e +&apos;1&apos;" />
142 <has_text_matching expression="-c +anno5" /> 176 <has_text_matching expression="-c +&apos;anno5&apos;" />
143 <has_text_matching expression="-t +text" /> 177 <has_text_matching expression="-t +text" />
144 <has_text_matching expression="-o +first" /> 178 <has_text_matching expression="-o +first" />
145 </assert_command> 179 </assert_command>
146 </test> 180 </test>
147 <test> 181 <test>
162 <param name="operation" value="first" /> 196 <param name="operation" value="first" />
163 </repeat> 197 </repeat>
164 </conditional> 198 </conditional>
165 <assert_command> 199 <assert_command>
166 <has_text_matching expression="-a +extract" /> 200 <has_text_matching expression="-a +extract" />
167 <has_text_matching expression="-e +1,2" /> 201 <has_text_matching expression="-e +&apos;1,2&apos;" />
168 <has_text_matching expression="-c +anno5,anno6" /> 202 <has_text_matching expression="-c +&apos;anno5,anno6&apos;" />
169 <has_text_matching expression="-t +text,integer" /> 203 <has_text_matching expression="-t +text,integer" />
170 <has_text_matching expression="-o +first,first" /> 204 <has_text_matching expression="-o +first,first" />
171 </assert_command> 205 </assert_command>
172 </test> 206 </test>
173 </tests> 207 </tests>