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

Changeset 3:e0734e88a104 (2022-01-27)
Previous changeset 2:d262577e04b0 (2021-11-16)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vardict commit 80e3742f499e8efabad1fe7627201466d0bdd190"
modified:
macros.xml
vardict.xml
added:
split.py
b
diff -r d262577e04b0 -r e0734e88a104 macros.xml
--- a/macros.xml Tue Nov 16 19:05:56 2021 +0000
+++ b/macros.xml Thu Jan 27 15:19:23 2022 +0000
b
@@ -1,5 +1,5 @@
 <macros>
-    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@VERSION_SUFFIX@">1</token>
     <token name="@TOOL_VERSION@">1.8.3</token>
     <xml name="ref_select">
         <conditional name="reference_source">
b
diff -r d262577e04b0 -r e0734e88a104 split.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/split.py Thu Jan 27 15:19:23 2022 +0000
[
@@ -0,0 +1,16 @@
+import sys
+
+
+fai = sys.argv[1]
+chunk_size = int(sys.argv[2])
+overlap = int(sys.argv[3])  # Base pairs
+with open(fai, 'r') as infile:
+    for line in infile:
+        name = line.split('\t')[0]
+        stop = int(line.split('\t')[1])
+        start = 1
+        while start < stop:
+            start = max(1, start - overlap)
+            print('\t'.join([name, str(start),
+                             str(min(start + chunk_size, stop))]))
+            start += chunk_size
b
diff -r d262577e04b0 -r e0734e88a104 vardict.xml
--- a/vardict.xml Tue Nov 16 19:05:56 2021 +0000
+++ b/vardict.xml Thu Jan 27 15:19:23 2022 +0000
b
@@ -4,6 +4,7 @@
         <import>macros.xml</import>
     </macros>
     <requirements>
+        <requirement type="package" version="3.10.2">python</requirement>
         <requirement type="package" version="@TOOL_VERSION@">vardict-java</requirement>
         <requirement type="package" version="5.1.0">gawk</requirement>
         <requirement type="package" version="1.14">samtools</requirement>
@@ -32,7 +33,7 @@
         #else
             ln -s ./ref.fa.fai ./chromosomes.fa.fai &&
         #end if
-        awk 'BEGIN {FS=OFS="\t"} {print $1, "1", $2}' ./chromosomes.fa.fai > ./regions.bed &&
+        python '$__tool_directory__/split.py' ./chromosomes.fa.fai "\${VARDICT_CHUNKSIZE:-1000000}" "\${VARDICT_OVERLAP:-150}" > ./regions.bed &&
 
         vardict-java
         #if $select_mode.mode == "paired"
@@ -128,6 +129,7 @@
                 <param name="reference_source_selector" value="history"/>
                 <param name="ref_file" ftype="fasta" value="genome.fasta" />
             </conditional>
+
             <output name="all_variants" compare="re_match_multiline" file="all_variants_paired.vcf" />
             <output name="passed_variants" compare="re_match_multiline" file="passed_variants_paired.vcf" />
         </test>
@@ -141,6 +143,7 @@
                 <param name="reference_source_selector" value="cached"/>
                 <param name="ref_file" value="test_buildid"/>
             </conditional>
+
             <output name="all_variants" compare="re_match_multiline" file="all_variants_paired.vcf" />
             <output name="passed_variants" compare="re_match_multiline" file="passed_variants_paired.vcf" />
         </test>