changeset 0:afe9a515d145 draft

planemo upload for repository https://github.com/quadram-institute-bioscience/galaxy-tools/tree/master/tools/biotradis commit 2e1b1f737f3a3d7cfc6350c6936fbb0bd84a5dad-dirty
author thanhlv
date Thu, 25 Jul 2019 06:03:12 -0400
parents
children eb1e9759c24e
files biotradis_add_tags.xml biotradis_bacteria_tradis.xml biotradis_check_tags.xml biotradis_filter_tags.xml biotradis_plot.xml biotradis_remove_tags.xml macros.xml
diffstat 7 files changed, 280 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/biotradis_add_tags.xml	Thu Jul 25 06:03:12 2019 -0400
@@ -0,0 +1,34 @@
+<tool id="add_tradis_tags" name="add tradis tags" version="@VERSION@">
+    <description>Generates a BAM file with tags added to read strings.</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+    
+    add_tradis_tags -b $input_bam -o added -v > $log
+
+    ]]></command>
+    <inputs>
+         <param name="input_bam" type="data" format="bam" label="BAM file" help="" />
+    </inputs>
+
+    <outputs>
+       <data name="log" format="txt" label="${tool.name} on ${on_string} Log" />
+       <data name="output_bam" format="bam" label="${tool.name} on ${on_string}" from_work_dir="added.tr.bam" />
+    </outputs>
+
+    <tests>
+    </tests>
+    <help><![CDATA[
+        Adds transposon sequence and quality tags to the read strings and
+        outputs a BAM.
+
+        Usage: add_tags -b file.bam [options]
+
+        Options:
+        -b  : bam file with tradis tags
+        -v  : verbose debugging output
+    ]]></help>
+
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/biotradis_bacteria_tradis.xml	Thu Jul 25 06:03:12 2019 -0400
@@ -0,0 +1,93 @@
+<tool id="add_tradis_tags" name="add tradis tags" version="@VERSION@">
+    <description>Generates a BAM file with tags added to read strings.</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+        #import re
+
+        ## Creates symlinks for each input file based on the Galaxy 'element_identifier'
+        ## Used so that a human-readable name appears in the output table (instead of 'dataset_xyz.dat')
+        #set $named_input_files = ''
+        #for $input_file in $input_files
+            ## Add single quotes around each input file identifier
+            #set $_input_file = "'{}'".format($input_file.element_identifier)
+            ln -s '${input_file}' ${_input_file} &&
+            echo ${_input_file} >> fq.list &&
+        #end for
+
+        bacteria_tradis -f fq.list
+                        -t $tag
+                        -r $ref
+                        -td $tag_dir
+                        -mm $mm
+                        -m $m
+                    #if str($smalt_k)!=""
+                        --smalt_k $smalt_k
+                    #end if
+                    #if str($smalt_s)!=""
+                        --smalt_s $smalt_s
+                    #end if
+                        --smalt_y $smalt_y
+                        --smalt_r $smalt_r
+                        -n "\${GALAXY_SLOTS:-2}"
+                    #if $verbose
+                        --verbose
+                    #end if
+                    && tar cvzf insert_site_plot.tar.gz *insert_site_plot.gz
+                    && tar cvzf mapped.tar.gz *mapped.bam*
+    ]]></command>
+    <inputs>
+        <param name="input_files" type="data" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2" multiple="true" />
+        <param name="tag" type="text" label="Tag" help="Tag to search for" />
+        <param name="ref" type="data" format="fasta" label="Reference geome" help="Fasta format" />
+        <param name="tag_dir" type="select" label="Tag direction" help="3 or 5(optional. default = 3)" >
+            <option value="3" selected="true">3</option>
+            <option value="5">5</option>
+        </param>
+        <param name="mm" type="integer" value="0" label="Number of mismatches allowed when matching tag" help="(optional. default = 0)" />
+        <param name="m" type="integer" value="30" label="Mapping quality cutoff score" help="(optional. default = 30)" />
+        <param argument="--smalt_k" type="integer" value="" optional="True" label="Custom k-mer value for SMALT mapping" help="(optional)" />
+        <param argument="--smalt_s" type="integer" value="" optional="True" label="Custom step size for SMALT mapping" help="(optional)" />
+        <param argument="--smalt_y" type="integer" value="0.96" label="Custom y parameter for SMALT" help="(optional. default = 0.96)" />
+        <param argument="--smalt_r" type="integer" value="-1" label="custom r parameter for SMALT" help="(optional. default = -1)" />
+        <param argument="--verbose" type="boolean" truevalue="-v" falsevalue="" checked="false" label="verbose debugging output" help="(Default:No)" />
+    </inputs>
+
+    <outputs>
+        <data name="insert_size_plots" format="tar.gz" label="${tool.name} on ${on_string}: Insert size plot" from_work_dir="insert_site_plot.tar.gz"/>
+        <data name="mapped_bam" format="tar.gz" label="${tool.name} on ${on_string}: Insert size plot" from_work_dir="mapped.tar.gz"/>   
+        <data name="fastq_stats" format="txt" label="${tool.name} on ${on_string}: Fastq Stats" from_work_dir="fastqs.stats"/> 
+    </outputs>
+  
+    <help>
+    <![CDATA[
+        Run a TraDIS analysis. This involves:
+        1: filtering the data with tags matching that passed via -t option
+        2: removing the tags from the sequences
+        3: mapping
+        4: creating an insertion site plot
+        5: creating a stats summary
+
+        Usage: bacteria_tradis [options]
+
+        Options:
+        -f        : text file listing fastq files with tradis tags attached
+        -t        : tag to search for
+        -r        : reference genome in fasta format (.fa)
+        -td       : tag direction - 3 or 5 (optional. default = 3)
+        -mm       : number of mismatches allowed when matching tag (optional. default = 0)
+        -m        : mapping quality cutoff score (optional. default = 30)
+        --smalt_k : custom k-mer value for SMALT mapping (optional)
+        --smalt_s : custom step size for SMALT mapping (optional)
+        --smalt_y : custom y parameter for SMALT (optional. default = 0.96)
+        --smalt_r : custom r parameter for SMALT (optional. default = -1)
+        -n        : number of threads to use for SMALT and samtools sort (optional. default = 1)
+        -e        : set defaults for essentiality experiment (smalt_r = 0, -m = 0)
+        -v        : verbose debugging output
+
+        Documentation can be found at `site <https://github.com/sanger-pathogens/Bio-Tradis>`_.
+    ]]></help>
+
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/biotradis_check_tags.xml	Thu Jul 25 06:03:12 2019 -0400
@@ -0,0 +1,33 @@
+<tool id="check_tradis_tags" name="check tradis tags" version="@VERSION@">
+    <description>Check for the existence of tradis tags in a bam</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+    
+    check_tradis_tags -b $input_bam > $output
+
+    ]]></command>
+    <inputs>
+         <param name="input_bam" type="data" format="bam" label="BAM file" help="" />
+     </inputs>
+
+    <outputs>
+       <data name="output" format="tabular" label="${tool.name} on ${on_string}" from_work_dir="$output" />
+    </outputs>
+
+    <!-- <tests>
+    </tests> -->
+    <help><![CDATA[
+        Adds transposon sequence and quality tags to the read strings and
+        outputs a BAM.
+
+        Usage: add_tags -b file.bam [options]
+
+        Options:
+        -b  : bam file with tradis tags
+        -v  : verbose debugging output
+    ]]></help>
+
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/biotradis_filter_tags.xml	Thu Jul 25 06:03:12 2019 -0400
@@ -0,0 +1,36 @@
+<tool id="filter_tradis_tags" name="filter tradis tags" version="@VERSION@">
+    <description>Filters a BAM file and outputs reads with tag matching -t option.</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+    
+    filter_tradis_tags -b $input_bam -t $tag -m $mismatches -o filtered
+
+    ]]></command>
+    <inputs>
+         <param name="input_bam" type="data" format="bam" label="BAM file" help="" />
+         <param name="tag" type="text" label="Tags to filter" help="" />
+         <param name="mismatches" type="integer" value ="0" label="Number of mismatches to allow when matching tag" help="(optional. default = 0)" />
+         <param argument="--verbose" type="boolean" truevalue="-v" falsevalue="" checked="false" label="verbose debugging output" help="(Default:No)" />
+    </inputs>
+
+    <outputs>
+       <data name="filtered_tags" format="fastq" label="${tool.name} on ${on_string}" from_work_dir="filtered.tag.fatsq" />
+    </outputs>
+
+    <!-- <tests>
+    </tests> -->
+    <help><![CDATA[
+        Adds transposon sequence and quality tags to the read strings and
+        outputs a BAM.
+
+        Usage: add_tags -b file.bam [options]
+
+        Options:
+        -b  : bam file with tradis tags
+        -v  : verbose debugging output
+    ]]></help>
+
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/biotradis_plot.xml	Thu Jul 25 06:03:12 2019 -0400
@@ -0,0 +1,34 @@
+<tool id="add_tradis_tags" name="add tradis tags" version="@VERSION@">
+    <description>Create insertion site plot for Artemis</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+    
+    tradis_plot -b $input_bam -m $mapping_quality
+
+    ]]></command>
+    <inputs>
+         <param name="input_bam" type="data" format="bam" label="BAM file" help="" />
+         <param name="mapping_quality" type="integer" value="30" label="mapping quality must be greater than X " help="(optional. default: 30)" />
+    </inputs>
+
+    <outputs>
+       <data name="output_bam" format="bam" label="${tool.name} on ${on_string}" from_work_dir="added.tr.bam" />
+    </outputs>
+
+    <tests>
+    </tests>
+    <help><![CDATA[
+        Adds transposon sequence and quality tags to the read strings and
+        outputs a BAM.
+
+        Usage: add_tags -b file.bam [options]
+
+        Options:
+        -b  : bam file with tradis tags
+        -v  : verbose debugging output
+    ]]></help>
+
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/biotradis_remove_tags.xml	Thu Jul 25 06:03:12 2019 -0400
@@ -0,0 +1,36 @@
+<tool id="remove_tradis_tags" name="remove tradis tags" version="@VERSION@">
+    <description>Removes transposon sequence and quality tags from the read strings</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+    
+    remove_tags -f $input_bam -t $tag -m $mismatches -o removed -v > $log
+
+    ]]></command>
+    <inputs>
+         <param name="input_fastq" type="data" format="fastq" label="Fastq file" help="" />
+         <param name="tag" type="text" label="Tags to remove" help="" />
+         <param name="mismatches" type="integer" value ="0" label="Number of mismatches to allow when matching tag" help="(optional. default = 0)" />
+    </inputs>
+
+    <outputs>
+       <data name="log" format="txt" label="${tool.name} on ${on_string}: Log"/>
+       <data name="filtered_tags" format="fastqsanger" label="${tool.name} on ${on_string}" from_work_dir="removed.rmtag.fatsq" />
+    </outputs>
+
+    <tests>
+    </tests>
+    <help><![CDATA[
+        Adds transposon sequence and quality tags to the read strings and
+        outputs a BAM.
+
+        Usage: add_tags -b file.bam [options]
+
+        Options:
+        -b  : bam file with tradis tags
+        -v  : verbose debugging output
+    ]]></help>
+
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Thu Jul 25 06:03:12 2019 -0400
@@ -0,0 +1,14 @@
+<macros>
+    <token name="@VERSION@">1.4.1.dev</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@VERSION@">biotradis</requirement>
+        </requirements>
+    </xml>
+
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1093/bioinformatics/btw022</citation>
+        </citations>
+    </xml>
+</macros>
\ No newline at end of file