Previous changeset 6:0c8f7322f8fc (2019-01-18) Next changeset 8:f2f3bc622a16 (2020-03-10) |
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gemini commit 251c6024b4ff643a63e17fbfe2590998c2bae3a7" |
modified:
gemini_annotate.xml |
added:
test-data/gemini_amend.vcf.gz |
b |
diff -r 0c8f7322f8fc -r 567837ca5f33 gemini_annotate.xml --- a/gemini_annotate.xml Fri Jan 18 19:34:41 2019 -0500 +++ b/gemini_annotate.xml Fri Jan 24 17:35:20 2020 -0500 |
[ |
@@ -1,4 +1,4 @@ -<tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@+galaxy1"> +<tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@+galaxy2"> <description>the variants in an existing GEMINI database with additional information</description> <macros> <import>gemini_macros.xml</import> @@ -19,9 +19,19 @@ <![CDATA[ ## For GEMINI to work correctly, tabixed file must have form [name].[bed|vcf].gz - #set $tabixed_file = "tabixed.%s.gz" % $annotate_source.ext - bgzip -c '$annotate_source' > '$tabixed_file' && - tabix -p '$annotate_source.ext' '$tabixed_file' && + #if $annotate_source.ext == 'vcf_bgzip': + ## File is bgzipped and tabixed already -> just symlink data and index + #set $tabixed_file = 'tabixed.vcf.gz' + ln -s '$annotate_source' $tabixed_file && + ln -s '$annotate_source.metadata.tabix_index' ${tabixed_file}.tbi && + #else: + ## bgzip and index vcf or bed + #set $tabixed_file = "tabixed.%s.gz" % $annotate_source.ext + bgzip -c '$annotate_source' > '$tabixed_file' && + tabix -p '$annotate_source.ext' '$tabixed_file' && + #end if + ## gemini annotate modifies its input database in-place so, in Galaxy, + ## we need to create a copy first! cp '$infile' '$outfile' && gemini @BINARY@ @@ -46,7 +56,7 @@ #else: -c '${a.column_name}' #end if - #if str($annotate_source.ext) == "vcf": + #if str($annotate_source.ext) != "bed": $region_only #end if '$outfile' @@ -54,7 +64,7 @@ </command> <inputs> <expand macro="infile" /> - <param argument="-f" name="annotate_source" type="data" format="vcf,bed" + <param argument="-f" name="annotate_source" type="data" format="vcf,vcf_bgzip,bed" label="Dataset to use as the annotation source" help="The tool can use the information from a BED or VCF dataset to annotate the database variants."/> <param argument="--region-only" name="region_only" type="boolean" checked="true" truevalue="" falsevalue="--region-only" @@ -112,19 +122,43 @@ </outputs> <tests> <test> + <!-- test with annotation source in bed format --> <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" /> - <param name="annotate_source" value="anno.bed" /> + <param name="annotate_source" value="anno.bed" ftype="bed" /> <param name="region_only" value="false" /> <conditional name="a"> <param name="a_selector" value="count" /> <param name="column_name" value="anno5" /> </conditional> <assert_command> + <!-- confirm region_only gets ignored for bed input --> <not_has_text text="--region-only" /> </assert_command> <output name="outfile" file="gemini_annotate_result.db" ftype="gemini.sqlite" compare="sim_size" delta="1000"/> </test> <test> + <!-- test with annotation source in vcf format --> + <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" /> + <param name="annotate_source" value="gemini_amend.vcf" ftype="vcf" /> + <param name="region_only" value="false" /> + <conditional name="a"> + <param name="a_selector" value="count" /> + <param name="column_name" value="anno5" /> + </conditional> + <output name="outfile" file="gemini_annotate_result.db" ftype="gemini.sqlite" compare="sim_size" delta="1000"/> + </test> + <test> + <!-- test with annotation source in vcf_bgzip format --> + <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" /> + <param name="annotate_source" value="gemini_amend.vcf.gz" ftype="vcf_bgzip" /> + <param name="region_only" value="false" /> + <conditional name="a"> + <param name="a_selector" value="count" /> + <param name="column_name" value="anno5" /> + </conditional> + <output name="outfile" file="gemini_annotate_result.db" ftype="gemini.sqlite" compare="sim_size" delta="1000"/> + </test> + <test> <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" /> <param name="annotate_source" value="anno.bed" /> <conditional name="a"> @@ -138,8 +172,8 @@ </conditional> <assert_command> <has_text_matching expression="-a +extract" /> - <has_text_matching expression="-e +1" /> - <has_text_matching expression="-c +anno5" /> + <has_text_matching expression="-e +'1'" /> + <has_text_matching expression="-c +'anno5'" /> <has_text_matching expression="-t +text" /> <has_text_matching expression="-o +first" /> </assert_command> @@ -164,8 +198,8 @@ </conditional> <assert_command> <has_text_matching expression="-a +extract" /> - <has_text_matching expression="-e +1,2" /> - <has_text_matching expression="-c +anno5,anno6" /> + <has_text_matching expression="-e +'1,2'" /> + <has_text_matching expression="-c +'anno5,anno6'" /> <has_text_matching expression="-t +text,integer" /> <has_text_matching expression="-o +first,first" /> </assert_command> |
b |
diff -r 0c8f7322f8fc -r 567837ca5f33 test-data/gemini_amend.vcf.gz |
b |
Binary file test-data/gemini_amend.vcf.gz has changed |