Mercurial > repos > iuc > bcftools_convert_from_vcf
diff bcftools_convert_from_vcf.xml @ 5:2c5a7bd98c81 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 9d03fe38504a35d11660dadb44cb1beee32fcf4e
author | iuc |
---|---|
date | Thu, 13 Apr 2017 17:44:12 -0400 |
parents | 8714c1caa3ee |
children | 09f37afb3621 |
line wrap: on
line diff
--- a/bcftools_convert_from_vcf.xml Sat Mar 11 17:58:33 2017 -0500 +++ b/bcftools_convert_from_vcf.xml Thu Apr 13 17:44:12 2017 -0400 @@ -12,6 +12,37 @@ <param name="haploid2diploid" type="boolean" truevalue="--haploid2diploid" falsevalue="" checked="false" label="convert haploid genotypes to diploid homozygotes" help="(\-\-haploid2diploid)"/> </xml> + <xml name="macro_sexinfo"> + <conditional name="sex_info"> + <param name="sex_info_src" type="select" label="sex column"> + <help><![CDATA[ +SampleName SexDesignation: +<br>MaleSample M +<br>FemaleSample F + ]]></help> + <option value="none">None</option> + <option value="history">designations from history dataset</option> + <option value="entry">designations from text input</option> + </param> + <when value="none"/> + <when value="history"> + <param name="sex_info_file" type="data" format="tabular" label="per sample sex designation file"/> + </when> + <when value="entry"> + <param name="sex_info_lines" type="text" area="True" label="per sample sex designation" > + <validator type="regex" message="sample M or F separated by TAB">^(\S+[ \t][MF](\n\S+[ \t][MF])*)$</validator> + <sanitizer sanitize="False"/> + </param> + </when> + </conditional> + </xml> + <token name="@SAMPLE_SEX@"> +#if $convert.sex_info.sex_info_src == 'entry': + --sex "$entered_sex_file" +#elif $convert.sex_info.sex_info_src == 'history': + --sex "$convert.sex_info.sex_info_file" +#end if + </token> </macros> <expand macro="requirements" /> <expand macro="version_command" /> @@ -20,6 +51,7 @@ @PREPARE_INPUT_FILE@ #set $section = $sec_restrict @PREPARE_TARGETS_FILE@ +@PREPARE_REGIONS_FILE@ bcftools @EXECUTABLE@ @@ -33,6 +65,7 @@ $convert.vcf_ids $convert.haploid2diploid --haplegendsample "$output_hap,$output_legend,$output_samples" #end if +@SAMPLE_SEX@ ## VCF input section #set $section = $sec_restrict @@ -46,6 +79,12 @@ "$input_file" . ]]> </command> + <configfiles> + <configfile name="entered_sex_file"><![CDATA[#slurp +#if $convert.sex_info.sex_info_src == 'entry': +$convert.sex_info.sex_info_lines.__str__.strip().replace(' ','\t')#slurp +#end if]]></configfile> + </configfiles> <inputs> <expand macro="macro_input" /> <section name="sec_restrict" expanded="false" title="Restrict to"> @@ -73,14 +112,17 @@ <param name="chrom" type="boolean" truevalue="--chrom" falsevalue="" checked="false" label="Output chromosome in first column instead of CHROM:POS_REF_ALT" help="(\-\-chrom)"/> <expand macro="macro_vcf_ids"/> + <expand macro="macro_sexinfo"/> </when> <when value="hap_sample"> <expand macro="macro_haploid2diploid"/> <expand macro="macro_vcf_ids"/> + <expand macro="macro_sexinfo"/> </when> <when value="hap_legend_sample"> <expand macro="macro_haploid2diploid"/> <expand macro="macro_vcf_ids"/> + <expand macro="macro_sexinfo"/> </when> </conditional> </inputs>