Mercurial > repos > iuc > vsnp_get_snps
diff vsnp_get_snps.xml @ 1:9ac0b1d5560d draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vsnp commit 2a94c64d6c7236550bf483d2ffc4e86248c63aab"
author | iuc |
---|---|
date | Tue, 16 Nov 2021 20:11:30 +0000 |
parents | ec6e02f4eab7 |
children | ae7b1b97a2a0 |
line wrap: on
line diff
--- a/vsnp_get_snps.xml Tue Nov 16 08:26:58 2021 +0000 +++ b/vsnp_get_snps.xml Tue Nov 16 20:11:30 2021 +0000 @@ -1,13 +1,13 @@ -<tool id="vsnp_get_snps" name="vSNP: get SNPs" version="@WRAPPER_VERSION@.0" profile="@PROFILE@"> +<tool id="vsnp_get_snps" name="vSNP: get SNPs" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> <description></description> <macros> <import>macros.xml</import> </macros> <requirements> - <requirement type="package" version="3.0.9">openpyxl</requirement> - <requirement type="package" version="1.3.4">pandas</requirement> - <requirement type="package" version="0.6.8">pyvcf</requirement> - <requirement type="package" version="2.0.1">xlrd</requirement> + <expand macro="openpyxl_requirement"/> + <expand macro="pandas_requirement"/> + <expand macro="pyvcf_requirement"/> + <expand macro="xlrd_requirement"/> </requirements> <command detect_errors="exit_code"><![CDATA[ #import re @@ -22,19 +22,20 @@ mkdir -p $output_json_snps_dir && mkdir -p $output_snps_dir && -#set dbkey = '?' -#for $i in $input_vcf_collection: +#if str($input_additional_zc_vcf_collection_cond.input_additional_zc_vcf_collection) =='yes': + #set dbkey = '?' + #for $i in $input_additional_zc_vcf_collection_cond.input_vcf_collection: + #if str($dbkey) == '?': + #set dbkey = $i.metadata.dbkey + #else if str($dbkey) != $i.metadata.dbkey: + >&2 echo "The dbkeys associated with the zero coverage VCF files with SNPs found in closely related isolate groups are not unique, check ${i.name}" && exit 1 + #end if + #set vcf_identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) + ln -s '${i}' '$input_vcf_dir/${vcf_identifier}' && + #end for #if str($dbkey) == '?': - #set dbkey = $i.metadata.dbkey - #else if str($dbkey) != $i.metadata.dbkey: - >&2 echo "The dbkeys associated with the zero coverage VCF files with SNPs found in closely related isolate groups are not unique" && -exit 1 + >&2 echo "The dbkey must be set for the zero coverage VCF files with SNPs found in closely related isolate groups" && exit 1 #end if - #set vcf_identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) - ln -s '${i}' '$input_vcf_dir/${vcf_identifier}' && -#end for -#if str($dbkey) == '?': - >&2 echo "The dbkey must be set for the zero coverage VCF files with SNPs found in closely related isolate groups" && exit 1 #end if #if str($input_zc_vcf_type_cond.input_zc_vcf_type) == "single": #set zc_vcf_identifier = re.sub('[^\s\w\-]', '_', str($input_zc_vcf.element_identifier)) @@ -49,7 +50,7 @@ #if str($input_excel_cond.excel_source_cond.excel_source) == 'cached': #set excel_file = 'No genome specified for input VCF (database) file(s)' #set excel_fields = $__app__.tool_data_tables['vsnp_excel'].get_fields() - ## The value of excel_fields is a nested list that looks like this. + ## The value of excel_fields is a nested list that looks like this. ## [['AF2122', 'Mbovis_define_filter.xlsx', '~/tool-data/vsnp/AF2122/excel/Mbovis_define_filter.xlsx', 'Excel file for AF2122'],...] #for $i in $excel_fields: #if str($i[0]) == $dbkey: @@ -91,7 +92,16 @@ <param name="input_zc_vcf_collection" format="vcf" type="data_collection" collection_type="list" label="Collection of zero coverage VCF files"/> </when> </conditional> - <param name="input_vcf_collection" format="vcf" type="data_collection" collection_type="list" label="Collection of zero coverage VCF files with SNPs found in closely related isolate groups"/> + <conditional name="input_additional_zc_vcf_collection_cond"> + <param name="input_additional_zc_vcf_collection" type="select" label="Include an additional collection of curated zero-coverage VCF files?"> + <option value="no" selected="true">No</option> + <option value="yes">Yes</option> + </param> + <when value="no"/> + <when value="yes"> + <param name="input_vcf_collection" format="vcf" type="data_collection" collection_type="list" label="Collection of zero coverage VCF files with SNPs found in closely related isolate groups"/> + </when> + </conditional> <param name="ac" type="integer" min="0" value="2" label="Allele count threshold" help="At least 1 position must have this value for a SNP to be added to a group"/> <param name="min_mq" type="integer" min="0" value="56" label="Map quality threshold" help="At least 1 position must have a higher MQ value for a SNP to be added to a group"/> <param name="min_quality_score" type="integer" min="0" value="150" label="Quality score threshold" help="At least 1 position must have a higher quality score for a SNP to be added to a group"/> @@ -110,7 +120,6 @@ <when value="cached"> <param name="input_excel" type="select" label="Excel file"> <options from_data_table="vsnp_excel"> - <filter type="data_meta" column="0" key="dbkey" ref="input_vcf_collection"/> <validator type="no_options" message="No built-in Excel grouping and filtering datasets are available"/> </options> </param> @@ -122,7 +131,7 @@ </when> <when value="no"/> </conditional> - <param name="all_isolates" type="boolean" truevalue="--all_isolates" falsevalue="" checked="false" label="Create a group containing all isolates?"/> + <param name="all_isolates" type="boolean" truevalue="--all_isolates" falsevalue="" checked="true" label="Create a group containing all isolates?"/> </inputs> <outputs> <collection name="snps" type="list" label="${tool.name} on ${on_string} (SNPs)"> @@ -147,6 +156,7 @@ <test expect_num_outputs="4"> <param name="input_zc_vcf_type" value="single"/> <param name="input_zc_vcf" value="input_zc_vcf.vcf" ftype="vcf" dbkey="89"/> + <param name="input_additional_zc_vcf_collection" value="yes"/> <param name="input_vcf_collection"> <collection type="list"> <element name="SRR8073662_zc.vcf" value="SRR8073662_zc.vcf" dbkey="89"/> @@ -154,6 +164,7 @@ </collection> </param> <param name="input_excel_param" value="no"/> + <param name="all_isolates" value=""/> <output_collection name="snps" type="list" count="1"> <element name="all_vcf" ftype="fasta"> <assert_contents> @@ -190,6 +201,7 @@ <element name="BCG_Tokyo_Unknown_JP_DRR029468.vcf" value="BCG_Tokyo_Unknown_JP_DRR029468.vcf" dbkey="89"/> </collection> </param> + <param name="input_additional_zc_vcf_collection" value="yes"/> <param name="input_vcf_collection"> <collection type="list"> <element name="01_1787_FL_Zoo_Jaguar.vcf" value="01_1787_FL_Zoo_Jaguar.vcf" dbkey="89"/> @@ -198,6 +210,7 @@ </collection> </param> <param name="input_excel_param" value="no"/> + <param name="all_isolates" value=""/> <output_collection name="snps" type="list" count="1"> <element name="all_vcf" ftype="fasta"> <assert_contents> @@ -234,6 +247,7 @@ <element name="BCG_Tokyo_Unknown_JP_DRR029468.vcf" value="BCG_Tokyo_Unknown_JP_DRR029468.vcf" dbkey="89"/> </collection> </param> + <param name="input_additional_zc_vcf_collection" value="yes"/> <param name="input_vcf_collection"> <collection type="list"> <element name="01_1787_FL_Zoo_Jaguar.vcf" value="01_1787_FL_Zoo_Jaguar.vcf" dbkey="89"/> @@ -243,6 +257,7 @@ </param> <param name="input_excel_param" value="yes"/> <param name="input_excel" value="89"/> + <param name="all_isolates" value=""/> <output_collection name="snps" type="list" count="1"> <element name="Mbovis-17" ftype="fasta"> <assert_contents> @@ -279,6 +294,7 @@ <element name="BCG_Tokyo_Unknown_JP_DRR029468.vcf" value="BCG_Tokyo_Unknown_JP_DRR029468.vcf" dbkey="89"/> </collection> </param> + <param name="input_additional_zc_vcf_collection" value="yes"/> <param name="input_vcf_collection"> <collection type="list"> <element name="01_1787_FL_Zoo_Jaguar.vcf" value="01_1787_FL_Zoo_Jaguar.vcf" dbkey="89"/>