Repository 'bcftools_convert_from_vcf'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_from_vcf

Changeset 23:a20d6492132d (2025-12-02)
Previous changeset 22:012656fd329f (2024-08-18)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/bcftools commit f6efda26965eb73c9107d367fd5ffdf246ed0dbc
modified:
bcftools_convert_from_vcf.xml
macros.xml
b
diff -r 012656fd329f -r a20d6492132d bcftools_convert_from_vcf.xml
--- a/bcftools_convert_from_vcf.xml Sun Aug 18 10:13:32 2024 +0000
+++ b/bcftools_convert_from_vcf.xml Tue Dec 02 08:07:03 2025 +0000
[
b'@@ -4,12 +4,10 @@\n         <token name="@EXECUTABLE@">convert</token>\n         <import>macros.xml</import>\n         <xml name="macro_vcf_ids">\n-            <param name="vcf_ids" type="boolean" truevalue="--vcf-ids" falsevalue="" checked="false" \n-                   label="Output VCF IDs instead of CHROM:POS_REF_ALT" help="(\\-\\-vcf_ids)"/>\n+            <param name="vcf_ids" type="boolean" truevalue="--vcf-ids" falsevalue="" checked="false" label="Output VCF IDs instead of CHROM:POS_REF_ALT" help="(\\-\\-vcf_ids)"/>\n         </xml>\n         <xml name="macro_haploid2diploid">\n-            <param name="haploid2diploid" type="boolean" truevalue="--haploid2diploid" falsevalue="" checked="false" \n-                   label="convert haploid genotypes to diploid homozygotes"  help="(\\-\\-haploid2diploid)"/>\n+            <param name="haploid2diploid" type="boolean" truevalue="--haploid2diploid" falsevalue="" checked="false" label="convert haploid genotypes to diploid homozygotes" help="(\\-\\-haploid2diploid)"/>\n         </xml>\n         <xml name="macro_sexinfo">\n             <conditional name="sex_info">\n@@ -28,7 +26,7 @@\n                     <param name="sex_info_file" type="data" format="tabular" label="per sample sex designation file"/>\n                 </when>\n                 <when value="entry">\n-                    <param name="sex_info_lines" type="text" area="True" label="per sample sex designation" >\n+                    <param name="sex_info_lines" type="text" area="True" label="per sample sex designation">\n                         <validator type="regex" message="sample M or F separated by TAB">^(\\S+[ \\t][MF](\\n\\S+[ \\t][MF])*)$</validator>\n                         <sanitizer sanitize="False"/>\n                     </param>\n@@ -43,11 +41,10 @@\n #end if\n         </token>\n     </macros>\n-    <expand macro="bio_tools" />\n-    <expand macro="requirements" />\n-    <expand macro="version_command" />\n+    <expand macro="bio_tools"/>\n+    <expand macro="requirements"/>\n+    <expand macro="version_command"/>\n     <command detect_errors="aggressive"><![CDATA[\n-@PREPARE_ENV@\n @PREPARE_INPUT_FILE@\n #set $section = $sec_restrict\n @PREPARE_TARGETS_FILE@\n@@ -81,7 +78,7 @@\n \n \n ## Primary Input/Outputs\n-"$input_file" .\n+@INPUT_FILE@ .\n ]]>\n     </command>\n     <configfiles>\n@@ -91,15 +88,15 @@\n #end if]]></configfile>\n     </configfiles>\n     <inputs>\n-        <expand macro="macro_input" />\n+        <expand macro="macro_input"/>\n         <section name="sec_restrict" expanded="false" title="Restrict to">\n-            <expand macro="macro_restrict" />\n-            <expand macro="macro_restrict" type="target" label_type="Target" />\n-            <expand macro="macro_samples" />\n-            <expand macro="macro_include" />\n-            <expand macro="macro_exclude" />\n+            <expand macro="macro_region_restrict"/>\n+            <expand macro="macro_target_restrict"/>\n+            <expand macro="macro_samples"/>\n+            <expand macro="macro_include"/>\n+            <expand macro="macro_exclude"/>\n         </section>\n-        <param argument="--keep-duplicates" type="boolean" truevalue="--keep-duplicates" falsevalue="" checked="false" label="Keep duplicates" help="Keep all multiallelic variants" />\n+        <param argument="--keep-duplicates" type="boolean" truevalue="--keep-duplicates" falsevalue="" checked="false" label="Keep duplicates" help="Keep all multiallelic variants"/>\n         <conditional name="convert">\n             <param name="convert_to" type="select" label="convert to">\n                 <option value="gen_sample">gen sample - IMPUTE2 or SHAPEIT</option>\n@@ -115,7 +112,7 @@\n                     <option value="GL">GL</option>\n                     -->\n                 </param>\n-                <param name="convert_3N6" argument="--3N6" type="boolean" truevalue="--3N6" falsevalue="" checked="false" label="3N6 format" help="Use 3N+6 column format instead of the old 3N+5 column format" />\n+                <param name="convert_3N6" '..b'onvert">\n+                <param name="convert_to" value="gen_sample"/>\n+                <param name="tag" value="GT"/>\n+                <param name="convert_3N6" value="True"/>\n+                <param name="vcf_ids" value="True"/>\n+            </conditional>\n             <output name="output_gen">\n                 <assert_contents>\n                     <has_text text="1:3062915_GTTT_G id3D 3062915 GTTT G 0 1 0 0 1 0"/>\n@@ -182,8 +185,10 @@\n             </output>\n         </test>\n         <test expect_num_outputs="2">\n-            <param name="input_file" ftype="vcf" value="convert.vcf" />\n-            <param name="convert_to"  value="hap_sample" />\n+            <param name="input_file" ftype="vcf" value="convert.vcf"/>\n+            <conditional name="convert">\n+                <param name="convert_to" value="hap_sample"/>\n+            </conditional>\n             <output name="output_hap">\n                 <assert_contents>\n                     <has_text text="X X:2698769_AAG_A 2698769 AAG A 1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0"/>\n@@ -191,8 +196,10 @@\n             </output>\n         </test>\n         <test expect_num_outputs="3">\n-            <param name="input_file" ftype="vcf" value="convert.vcf" />\n-            <param name="convert_to"  value="hap_legend_sample" />\n+            <param name="input_file" ftype="vcf" value="convert.vcf"/>\n+            <conditional name="convert">\n+                <param name="convert_to" value="hap_legend_sample"/>\n+            </conditional>\n             <output name="output_hap">\n                 <assert_contents>\n                     <has_text text="1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0"/>\n@@ -212,8 +219,10 @@\n         </test>\n         <!-- Test keep-duplicates option -->\n         <test expect_num_outputs="3">\n-            <param name="input_file" ftype="vcf" value="convert.vcf" />\n-            <param name="convert_to"  value="hap_legend_sample" />\n+            <param name="input_file" ftype="vcf" value="convert.vcf"/>\n+            <conditional name="convert">\n+                <param name="convert_to" value="hap_legend_sample"/>\n+            </conditional>\n             <param name="keep_duplicates" value="true"/>\n             <output name="output_hap">\n                 <assert_contents>\n@@ -232,15 +241,22 @@\n                 </assert_contents>\n             </output>\n             <assert_command>\n-                <has_text text="--keep-duplicates" />\n+                <has_text text="--keep-duplicates"/>\n             </assert_command>\n         </test>\n         <!-- Test region overlap -->\n         <test expect_num_outputs="2">\n-            <param name="input_file" ftype="vcf" value="convert.vcf" />\n-            <param name="convert_to"  value="gen_sample" />\n+            <param name="input_file" ftype="vcf" value="convert.vcf"/>\n+            <conditional name="convert">\n+                <param name="convert_to" value="gen_sample"/>\n+            </conditional>\n             <section name="sec_restrict">\n-                <param name="regions_overlap" value="1"/>\n+                <conditional name="regions">\n+                    <param name="regions_src" value="regions" />\n+                    <repeat name="region_specs">\n+                        <param name="chrom" value="X" />\n+                    </repeat>\n+                </conditional>\n             </section>\n             <output name="output_gen">\n                 <assert_contents>\n@@ -253,11 +269,10 @@\n                 </assert_contents>\n             </output>\n             <assert_command>\n-                <has_text text="--regions-overlap" />\n+                <has_text text="--regions-overlap"/>\n             </assert_command>\n         </test>\n     </tests>\n-\n     <help><![CDATA[\n =====================================\n  bcftools @EXECUTABLE@ from vcf\n@@ -271,8 +286,8 @@\n \n @BCFTOOLS_MANPAGE@#@EXECUTABLE@\n \n-@BCFTOOLS_WIKI@\n+@BCFTOOLS_HOWTOS@\n ]]>\n     </help>\n-    <expand macro="citations" />\n+    <expand macro="citations"/>\n </tool>\n'
b
diff -r 012656fd329f -r a20d6492132d macros.xml
--- a/macros.xml Sun Aug 18 10:13:32 2024 +0000
+++ b/macros.xml Tue Dec 02 08:07:03 2025 +0000
[
b'@@ -1,7 +1,7 @@\n <macros>\n-  <token name="@TOOL_VERSION@">1.15.1</token>\n-  <token name="@VERSION_SUFFIX@">4</token>\n-  <token name="@PROFILE@">20.01</token>\n+  <token name="@TOOL_VERSION@">1.22</token>\n+  <token name="@VERSION_SUFFIX@">0</token>\n+  <token name="@PROFILE@">24.1</token>\n   <xml name="bio_tools">\n       <xrefs>\n           <xref type="bio.tools">bcftools</xref>\n@@ -10,15 +10,15 @@\n   <xml name="requirements">\n     <requirements>\n       <requirement type="package" version="@TOOL_VERSION@">bcftools</requirement>\n-      <requirement type="package" version="1.15.1">htslib</requirement>\n+      <requirement type="package" version="1.22.1">htslib</requirement>\n       <yield />\n     </requirements>\n   </xml>\n   <xml name="samtools_requirement">\n-      <requirement type="package" version="1.15.1">samtools</requirement>\n+      <requirement type="package" version="1.22.1">samtools</requirement>\n   </xml>\n   <xml name="matplotlib_requirement">\n-      <requirement type="package" version="3.5.3">matplotlib</requirement>\n+      <requirement type="package" version="3.10.7">matplotlib</requirement>\n   </xml>\n   <xml name="version_command">\n     <version_command>bcftools 2&gt;&amp;1 | grep \'Version:\'</version_command>\n@@ -30,16 +30,11 @@\n       <yield />\n     </citations>\n   </xml>\n-  <token name="@BCFTOOLS_WIKI@">https://github.com/samtools/bcftools/wiki</token>\n-  <token name="@BCFTOOLS_MANPAGE@">http://samtools.github.io/bcftools/bcftools.html</token>\n+  <token name="@BCFTOOLS_HOWTOS@">https://samtools.github.io/bcftools/howtos/index.html</token>\n+  <token name="@BCFTOOLS_MANPAGE@">https://www.htslib.org/doc/bcftools.html</token>\n   <token name="@THREADS@">\n   --threads \\${GALAXY_SLOTS:-4}\n   </token>\n-  <token name="@PREPARE_ENV@">\n-<![CDATA[\n-export BCFTOOLS_PLUGINS=`which bcftools | sed \'s,bin/bcftools,libexec/bcftools,\'`;\n-]]>\n-  </token>\n   <xml name="macro_input">\n     <!-- \n     REQUIRES https://github.com/galaxyproject/galaxy/pull/14605/files\n@@ -294,8 +289,8 @@\n     help="inverts the query/filtering applied by the targets" />\n   </xml>\n \n-  <xml name="macro_restriction_spec" token_type="region" token_label_type="Region">\n-    <repeat name="@TYPE@s" title="@LABEL_TYPE@ Filter" default="1" min="1">\n+  <xml name="macro_restriction_spec" tokens="type,label_type">\n+    <repeat name="@TYPE@_specs" title="@LABEL_TYPE@ Filter" default="1" min="1">\n         <param name="chrom" type="text" label="@LABEL_TYPE@ chromosome">\n             <validator type="expression" message="A chromosome identifier is required when specifying a @LABEL_TYPE@ filter">value.strip()</validator>\n         </param>\n@@ -305,36 +300,85 @@\n         <param name="stop" type="text" label="@LABEL_TYPE@ end position">\n             <validator type="expression" message="an integer number is required">not value or value.isdigit()</validator>\n         </param>\n-        <yield />\n     </repeat>\n   </xml>\n \n-  <xml name="macro_restrictions_file" token_type="region" token_label_type="Region">\n+  <xml name="macro_restrictions_file" tokens="type,label_type">\n     <param name="@TYPE@s_file" type="data" format="tabular" label="@LABEL_TYPE@s File" help="restrict to @LABEL_TYPE@s listed in a file" />\n   </xml>\n \n-  <xml name="macro_restrict" token_type="region" token_label_type="Region" >\n+  <xml name="__macro_restrict__" tokens="type,label_select,label_type,pos_is_default,rec_is_default">\n     <conditional name="@TYPE@s">\n-        <param name="@TYPE@s_src" type="select" label="@LABEL_TYPE@s">\n-            <option value="__none__">Do not restrict to @LABEL_TYPE@s</option>\n-            <option value="@TYPE@s">Specify one or more @LABEL_TYPE@(s) directly</option>\n-            <option value="@TYPE@s_file">Operate on @LABEL_TYPE@s specified in a history dataset</option>\n+      <param name="@TYPE@s_src" type="select" label="@LABEL_SELECT@">\n+        <option value="__none__">Do not restrict to @LABEL_TYPE@s</option>\n+        <option value="@TYPE@s">Specify one or more @LABEL_TYPE@'..b'intervals = $section.targets.target_specs\n+    @PARSE_INTERVALS@\n+    --targets \'${section.targets.invert_targets_file}$intervals_spec\'\n+  #elif $section.targets.targets_src == \'targets_file\':\n+    #if $targets_path:\n+      --targets-file \'${section.targets.invert_targets_file}${targets_path}\'\n+    #else:\n+      --targets-file \'${section.targets.invert_targets_file}${section.targets.targets_file}\'\n+    #end if\n+  #end if\n+  #if \'targets_overlap\' in $section.targets:\n+    --targets-overlap $section.targets.targets_overlap\n+  #end if\n #end if\n ]]>\n   </token>\n@@ -417,7 +462,7 @@\n <![CDATA[\n #set $regions_path = None\n #if \'regions\' in $section\n-  #if $section.regions.regions_src == \'regions_file\' and $section.regions.regions_file:\n+  #if $section.regions.regions_src == \'regions_file\':\n     #if $section.regions.regions_file.ext.startswith(\'bed\'):\n       #set $regions_path = \'regions_file.bed\'\n       ln -s \'$section.regions.regions_file\' $regions_path &&\n@@ -461,11 +506,31 @@\n       </param>\n       <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples"\n              help="Inverts the query/filtering applied by Samples (adds &quot;^&quot; prefix to exclude)" />\n-      <param argument="--samples_file" type="data" format="tabular" optional="true" label="Samples file"\n-             help="File of samples to include" />\n+      <param argument="--samples_file" type="data" format="tabular" optional="true" label="Samples file" help="File of samples to include" />\n       <param name="invert_samples_file" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples file"\n              help="inverts the query/filtering applied by Samples file" />\n   </xml>\n+\n+  <xml name="macro_samples_enhanced" token_all_samples="" token_file_help="File listing samples to include one per line.">\n+      <conditional name="specify_samples">\n+          <param name="how" type="select" label="How do you want to select samples?">\n+              <option value="-s">Specify samples manually</option>\n+              <option value="-S">Provide sample file</option>\n+              <option value="@ALL_SAMPLES@" selected="true">No selection; just use all samples found in input</option>\n+          </param>\n+          <when value="-s">\n+              <param argument="--samples" name="samples_spec" type="text" optional="false" label="Sample(s)" help="Specify a single sample by name or a comma-separated list of sample names.">\n+                <validator type="expression" message="Please specify a single sample by name or a comma-separated list of sample names">value.strip() and value[0] not in "^," and ",," not in value</validator>\n+              </param>\n+              <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" label="Exclude these samples instead of including them?" help="Equivalent to prefixing the list of samples with &quot;^&quot; on the command line."/>\n+          </when>\n+          <when value="-S">\n+              <param argument="--samples_file" type="data" format="tabular" optional="@IS_OPTIONAL@" label="Samples file" help="@FILE_HELP@" />\n+              <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" label="Exclude the samples listed in the file instead of including them?" help="Equivalent to prefixing the file with &quot;^&quot; on the command line."/>\n+          </when>\n+          <when value="@ALL_SAMPLES@" />\n+      </conditional>\n+  </xml>\n   <token name="@SAMPLES@">\n #set $samples_defined = False\n #if str($section.samples) != \'\':\n@@ -478,8 +543,8 @@\n #end if\n   </token>\n \n-  <xml name="macro_sample">\n-      <param name="sample" type="text" optional="true" label="Sample" help="Apply variants of the given sample" />\n+  <xml name="macro_sample" token_help="Apply variants of the given sample">\n+      <param name="sample" type="text" optional="true" label="Sample" help="@HELP@" />\n   </xml>\n   <token name="@SAMPLE@">\n #if $section.sample:\n'