changeset 10:be5875f29ea4 draft

Uploaded
author greg
date Tue, 03 Aug 2021 19:24:50 +0000
parents 0fe292b20b9d
children fa304dc06f12
files .shed.yml macros.xml vsnp_get_snps.py vsnp_get_snps.xml
diffstat 4 files changed, 51 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.shed.yml	Tue Aug 03 19:24:50 2021 +0000
@@ -0,0 +1,11 @@
+name: vsnp_get_snps
+owner: greg
+description: |
+  Contains a tool that collects quality parsimonious SNPs from vcf files and outputs alignment files in fasta format.
+homepage_url: https://github.com/USDA-VS/vSNP
+long_description: |
+  Contains a tool that collects quality parsimonious SNPs from vcf files and outputs alignment files in fasta format.
+remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_get_snps
+type: unrestricted
+categories:
+  - Sequence Analysis
--- a/macros.xml	Thu Jul 29 13:16:03 2021 +0000
+++ b/macros.xml	Tue Aug 03 19:24:50 2021 +0000
@@ -1,7 +1,34 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <macros>
     <token name="@WRAPPER_VERSION@">1.0</token>
-    <token name="@PROFILE@">19.09</token>
+    <token name="@PROFILE@">20.09</token>
+    <xml name="biopython_requirement">
+        <requirement type="package" version="1.79">biopython</requirement>
+    </xml>
+    <xml name="numpy_requirement">
+        <requirement type="package" version="1.21.1">numpy</requirement>
+    </xml>
+    <xml name="openpyxl_requirement">
+        <requirement type="package" version="3.0.7">openpyxl</requirement>
+    </xml>
+    <xml name="pandas_requirement">
+        <requirement type="package" version="1.3.0">pandas</requirement>
+    </xml>
+    <xml name="pysam_requirement">
+        <requirement type="package" version="0.15.4">pysam</requirement>
+    </xml>
+    <xml name="pyvcf_requirement">
+        <requirement type="package" version="0.6.8">pyvcf</requirement>
+    </xml>
+    <xml name="pyyaml_requirement">
+        <requirement type="package" version="5.4.1">pyyaml</requirement>
+    </xml>
+    <xml name="xlrd_requirement">
+        <requirement type="package" version="2.0.1">xlrd</requirement>
+    </xml>
+    <xml name="xlsxwriter_requirement">
+        <requirement type="package" version="1.4.4">xlsxwriter</requirement>
+    </xml>
     <xml name="param_reference_source">
         <param name="reference_source" type="select" label="Choose the source for the reference genome">
             <option value="cached" selected="true">locally cached</option>
--- a/vsnp_get_snps.py	Thu Jul 29 13:16:03 2021 +0000
+++ b/vsnp_get_snps.py	Tue Aug 03 19:24:50 2021 +0000
@@ -440,7 +440,7 @@
     parser = argparse.ArgumentParser()
 
     parser.add_argument('--ac', action='store', dest='ac', type=int, help='Allele count value'),
-    parser.add_argument('--all_isolates', action='store_true', dest='all_isolates', required=False, default=False, help='Create table with all isolates'),
+    parser.add_argument('--all_isolates', action='store_true', dest='all_isolates', help='Create table with all isolates'),
     parser.add_argument('--input_excel', action='store', dest='input_excel', required=False, default=None, help='Optional Excel filter file'),
     parser.add_argument('--input_vcf_dir', action='store', dest='input_vcf_dir', help='Input vcf directory'),
     parser.add_argument('--min_mq', action='store', dest='min_mq', type=int, help='Minimum map quality value'),
--- a/vsnp_get_snps.xml	Thu Jul 29 13:16:03 2021 +0000
+++ b/vsnp_get_snps.xml	Tue Aug 03 19:24:50 2021 +0000
@@ -1,13 +1,13 @@
-<tool id="vsnp_get_snps" name="vSNP: get SNPs" version="@WRAPPER_VERSION@.0+galaxy0" profile="@PROFILE@">
+<tool id="vsnp_get_snps" name="vSNP: get SNPs" version="@WRAPPER_VERSION@.1+galaxy0" profile="@PROFILE@">
     <description></description>
     <macros>
         <import>macros.xml</import>
     </macros>
     <requirements>
-        <requirement type="package" version="3.0.7">openpyxl</requirement>
-        <requirement type="package" version="1.3.0">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
@@ -27,8 +27,7 @@
     #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 dbkeys associated with the zero coverage VCF files with SNPs found in closely related isolate groups are not unique" && exit 1
     #end if
     #set vcf_identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier))
     ln -s '${i}' '$input_vcf_dir/${vcf_identifier}' &&
@@ -49,7 +48,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:
@@ -110,7 +109,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 +120,7 @@
             </when>
             <when value="no"/>
         </conditional>
-        <param argument="all_isolates" type="boolean" truevalue="--all_isolates" falsevalue="" checked="false" label="Create a group containing all isolates?"/>
+        <param argument="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)">
@@ -154,6 +152,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" file="all_vcf.fasta" ftype="fasta" compare="contains"/>
             </output_collection>
@@ -182,6 +181,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" file="all_vcf2.fasta" ftype="fasta" compare="contains"/>
             </output_collection>
@@ -211,6 +211,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" file="Mbovis-17_snps.fasta" ftype="fasta" compare="contains"/>
             </output_collection>