diff presto_maskprimers.xml @ 0:14e648d05cce draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/presto commit 5d4da3eb59439ce5b1eea211b4ad1d47807d7acb
author iuc
date Wed, 30 May 2018 15:34:53 -0400
parents
children 61c1ae41a6bd
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/presto_maskprimers.xml	Wed May 30 15:34:53 2018 -0400
@@ -0,0 +1,123 @@
+<tool id="presto_maskprimers" name="pRESTO MaskPrimers" version="@PRESTO_VERSION@">
+    <description>Removes primers and annotates sequences with primer and barcode identifiers.</description>
+    
+    <macros>
+        <import>presto_macros.xml</import>
+    </macros>
+    
+    <expand macro="requirements"/>
+    
+    <version_command>MaskPrimers.py --version</version_command>
+    <command detect_errors="exit_code"><![CDATA[
+        ln -s '$fastq_in' in.fastq &&
+        ln -s '$primers_in' primers.fasta && 
+        MaskPrimers.py '$cc.command'
+          --nproc "\${GALAXY_SLOTS:-1}"
+          -s in.fastq
+          -p primers.fasta
+          --mode '$mode'
+          --maxerror '$maxerror'
+          $revpr
+          $barcode
+          
+          #if $cc.command == "align"
+            --maxlen '$cc.maxlen'
+            --gap '$cc.gap_open' '$cc.gap_extend'
+            $cc.skiprc
+          #end if
+          
+          #if $cc.command == "score"
+            --start '$cc.start'
+          #end if
+
+          --outdir=.
+          --outname=tmp_mask 
+          #if $capture_log
+            --log '$log_out'
+          #end if
+    ]]></command>
+    <inputs>
+        <param argument="-s" name="fastq_in" type="data" format="fastq" label="Input FASTQ file"/>
+        <param argument="-p" name="primers_in" type="data" format="fasta" label="Primer FASTA file"/>
+        <param argument="--mode" type="select" value="mask" label="Mode" help="Specifies how identified primer sequences will be handled.">
+            <option value="cut">Remove primer and preceding sequence (cut)</option>
+            <option value="mask">Mask primer to Ns and remove preceding sequence (mask)</option>
+            <option value="trim">Leave primer intact and remove preceding sequence (trim)</option>
+            <option value="tag">Leave primer and preceding sequence intact (tag)</option>
+        </param>
+        <conditional name="cc">
+            <param name="command" type="select" label="Command">
+                <option value="align">Find primer matches using pairwise local alignment (align)</option>
+                <option value="score">Find primer matches by scoring primers at a fixed position (score)</option>
+            </param>
+            <when value="align">
+                <param argument="--maxlen" type="integer" value="50" label="Max Length" help="Maximum length of sequence window to search for primers."/>
+                <param argument="--skiprc" type="boolean" value="false" truevalue="--skiprc" falsevalue="" label="Skip Reverse Complement" help="Skip checking of reverse complement sequences."/>
+                <param name="gap_open" type="integer" value="1" label="Gap Open Penalty" help="Positive value of the gap open penalty."/>
+                <param name="gap_extend" type="integer" value="1" label="Gap Extension Penalty" help="Positive value of the gap extension penalty."/>
+            </when>
+            <when value="score">
+                <param argument="--start" type="integer" value="0" label="Start Position" help="The starting position of the primer."/>
+            </when>
+        </conditional>        
+        <param argument="--revpr" type="boolean" value="false" truevalue="--revpr" falsevalue="" label="Reverse Match" help="Match the reverse complement of primer sequences against the ends of reads."/>
+        <param argument="--barcode" type="boolean" value="false" truevalue="--barcode" falsevalue="" label="Extract Barcodes (UMIs)" help="Capture the sequence preceding the primer as a UMI."/>
+        <param argument="--maxerror" type="float" value="0.2" label="Max Error Rate" help="Maximum allowable rate between read and primer sequence."/>
+        <expand macro="presto-log-param"/>
+    </inputs>
+
+    <outputs>
+        <data name="fastq_out" format="fastq" from_work_dir="tmp_mask_primers-pass.fastq"/>
+        <expand macro="presto-log-output"/>
+    </outputs>
+    
+    <tests>
+        <test>
+            <param  name="command" value="score"/>
+            <param  name="fastq_in" value="presto_maskprimers_without_barcode_test_in.fastq"/>
+            <param  name="start" value="0"/>
+            <param  name="primers_in" value="read1_primers.fasta"/>
+            <param  name="mode" value="cut"/>
+            <param  name="maxerror" value="0.15"/>
+            <output name="fastq_out" file="presto_maskprimers_without_barcode_test_score_out.fastq" sort="true"/>
+        </test>
+        <test>
+            <param  name="command" value="score"/>
+            <param  name="fastq_in" value="presto_maskprimers_with_barcode_test_in.fastq"/>
+            <param  name="start" value="17"/>
+            <param  name="barcode" value="true"/>
+            <param  name="primers_in" value="read2_primers.fasta"/>
+            <param  name="mode" value="cut"/>
+            <param  name="maxerror" value="0.15"/>
+            <output name="fastq_out" file="presto_maskprimers_with_barcode_test_score_out.fastq" sort="true"/>
+        </test>
+        <test>
+            <param  name="command" value="align"/>
+            <param  name="fastq_in" value="presto_maskprimers_without_barcode_test_in.fastq"/>
+            <param  name="primers_in" value="read1_primers.fasta"/>
+            <param  name="mode" value="cut"/>
+            <param  name="maxerror" value="0.15"/>
+            <param  name="maxlen" value="25"/>
+            <output name="fastq_out" file="presto_maskprimers_without_barcode_test_align_out.fastq" sort="true"/>
+        </test>
+        <test>
+            <param  name="command" value="align"/>
+            <param  name="fastq_in" value="presto_maskprimers_with_barcode_test_in.fastq"/>
+            <param  name="barcode" value="true"/>
+            <param  name="primers_in" value="read2_primers.fasta"/>
+            <param  name="mode" value="cut"/>
+            <param  name="maxerror" value="0.15"/>
+            <param  name="maxlen" value="25"/>
+            <output name="fastq_out" file="presto_maskprimers_with_barcode_test_align_out.fastq" sort="true"/>
+        </test>
+    </tests>
+    
+    <help><![CDATA[
+Removes primers and annotates sequences with primer and barcode identifiers
+
+See the `pRESTO online help <@PRESTO_URL_BASE@/MaskPrimers.html>`_ for more information.
+
+@HELP_NOTE@
+    ]]></help>
+    <expand macro="citations" />
+</tool>
\ No newline at end of file