diff bismark_bowtie_wrapper.xml @ 18:862fb59a9a25 draft

Uploaded
author bgruening
date Mon, 14 Apr 2014 16:42:38 -0400
parents 73508c5b4273
children 30caca800c9b
line wrap: on
line diff
--- a/bismark_bowtie_wrapper.xml	Sun Feb 24 14:49:36 2013 -0500
+++ b/bismark_bowtie_wrapper.xml	Mon Apr 14 16:42:38 2014 -0400
@@ -1,18 +1,15 @@
-<tool id="bismark_bowtie" name="Bismark" version="0.7.7.3">
-    <!-- Wrapper compatible with Bismark version 0.7.7 -->
+<tool id="bismark_bowtie" name="Bismark" version="0.10.0">
+    <!-- Wrapper compatible with Bismark version 0.10 -->
     <description>bisulfite mapper (bowtie)</description>
     <!--<version_command>bismark version</version_command>-->
     <requirements>
         <requirement type="set_environment">SCRIPT_PATH</requirement>
+        <requirement type="package" version="0.1.19">samtools</requirement>
         <requirement type="package" version="0.12.8">bowtie</requirement>
-        <requirement type="package" version="2.0.0-beta7">bowtie2</requirement>
     </requirements>
     <parallelism method="basic"></parallelism>
     <command interpreter="python">
         bismark_wrapper.py
-        
-        ## Change this to accommodate the number of threads you have available.
-        --num-threads 4
 
         --bismark_path \$SCRIPT_PATH
 
@@ -45,16 +42,23 @@
                 --fasta
             #end if
         #else:
-            --mate-paired 
-            --mate1 $singlePaired.input_mate1
-            --mate2 $singlePaired.input_mate2
+            --mate-paired
+            #set $mate1 = list()
+            #set $mate2 = list()
+            #for $mate_pair in $singlePaired.mate_list
+                $mate1.append( str($mate_pair.input_mate1) )
+                $mate2.append( str($mate_pair.input_mate2) )
+            #end for
 
-            #if $singlePaired.input_mate1.ext == "fastqillumina":
+            --mate1 #echo ','.join($mate1)
+            --mate2 #echo ','.join($mate2)
+
+            #if $singlePaired.mate_list[0].input_mate1.ext == "fastqillumina":
                 --phred64-quals
                 --fastq
-            #elif $singlePaired.input_mate1.ext == "fastqsanger":
+            #elif $singlePaired.mate_list[0].input_mate1.ext == "fastqsanger":
                 --fastq
-            #elif $singlePaired.input_mate1.ext == "fasta":
+            #elif $singlePaired.mate_list[0].input_mate1.ext == "fasta":
                 --fasta
             #end if
 
@@ -85,9 +89,13 @@
                 --skip-reads $params.skip_reads
             #end if
 
-            ###if str($params.isReportOutput) == "yes":
-            ##    --output-report-file $report_file
-            ###end if
+            #if $params.bismark_stdout:
+                --stdout $output_stdout
+            #end if
+
+            #if $params.isReportOutput:
+                --output-report-file $report_file
+            #end if
 
         #end if
 
@@ -95,7 +103,7 @@
         ## Output parameters.
         ##
         --output $output
-        $suppress_header
+        ##$suppress_header
 
       #if str( $singlePaired.sPaired ) == "single"
         #if $output_unmapped_reads_l
@@ -123,7 +131,7 @@
             <option value="history">Use one from the history</option>
           </param>
           <when value="indexed">
-            <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact your Galaxy admin">
+            <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact your Galaxy admin.">
               <options from_data_table="bowtie_indexes">
                 <filter type="sort_by" column="2"/>
                 <validator type="no_options" message="No indexes are available for the selected input dataset"/>
@@ -145,10 +153,12 @@
                 <param name="input_singles" type="data" format="fastqsanger,fastqillumina,fastq,fasta" label="FASTQ/FASTA file" help="FASTQ or FASTA files." />
             </when>
             <when value="paired">
-                <param name="input_mate1" type="data" format="fastqsanger,fastqillumina,fastq,fasta" label="FASTQ/FASTA file" help="FASTQ or FASTA files." />
-                <param name="input_mate2" type="data" format="fastqsanger,fastqillumina,fastq,fasta" label="FASTQ/FASTA file" help="FASTQ or FASTA files." />
+                <repeat name="mate_list" title="Paired End Pairs" min="1">
+                    <param name="input_mate1" type="data" format="fastqsanger,fastqillumina,fastq,fasta" label="Mate pair 1" help="FASTQ or FASTA files." />
+                    <param name="input_mate2" type="data" format="fastqsanger,fastqillumina,fastq,fasta" label="Mate pair 2" help="FASTQ or FASTA files." />
+                </repeat>
                 <param name="minInsert" type="integer" value="0" label="Minimum insert size for valid paired-end alignments" />
-                <param name="maxInsert" type="integer" value="250" label="Maximum insert size for valid paired-end alignments" />
+                <param name="maxInsert" type="integer" value="500" label="Maximum insert size for valid paired-end alignments" />
             </when>
         </conditional>
 
@@ -162,41 +172,51 @@
             <!-- Full/advanced params. -->
             <when value="custom">
                 <!-- -n -->
-                <param name="seed_mismatches" type="select" label="The maximum number of mismatches permitted in the 'seed'.">
+                <param name="seed_mismatches" type="select" label="The maximum number of mismatches permitted in the 'seed'">
                     <option value="0">0</option>
                     <option value="1">1</option>
                     <option value="2" selected="true">2</option>
                     <option value="3">3</option>
                 </param>
                 <!-- -l -->
-                <param name="seed_len" type="integer" value="28" label="The 'seed length'; The number of bases of the high quality end of the read to which the maximum number of mismatches applies." />
+                <param name="seed_len" type="integer" value="28" label="The 'seed length'; The number of bases of the high quality end of the read to which the maximum number of mismatches applies" />
                 <!--
                 <param name="maqerr" type="integer" value="70" label="Maximum permitted total of quality values at all mismatched read positions throughout the entire alignment, not just in the 'seed'." />
                 -->
                 <param name="qupto" type="integer" value="0" label="Only aligns the first N reads or read pairs from the input" help="Default is 0 and means 'no-limit'." />
                 <param name="skip_reads" type="integer" value="0" label="Skip (i.e. do not align) the first N reads or read pairs from the input" />
 
-                <param name="suppressed_read_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write ambiguous reads to an extra output file." help="Write all reads which produce more than one valid alignment with the same number of lowest mismatches or other reads that fail to align uniquely." />
-                <param name="unmapped_read_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write all reads that could not be aligned to a file" />
+                <param name="suppressed_read_file" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Write ambiguous reads to an extra output file" help="Write all reads which produce more than one valid alignment with the same number of lowest mismatches or other reads that fail to align uniquely." />
+                <param name="unmapped_read_file" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Write all reads that could not be aligned to a file" />
                 <!-- output Options -->
-                <!-- 
-                <param name="isReportOutput" type="select" label="Offer all report files concatenated in one file.">
-                    <option value="yes">yes</option>
-                    <option value="no">no</option>
-                </param>
-                -->
+                <param name="bismark_stdout" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Write the bismark output and summary information to an extra file" />
+                <param name="isReportOutput" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Offer all report files concatenated in one file" />
                 <!--end output options --> 
             </when>  <!-- full -->
       </conditional>  <!-- params -->
-      <param name="suppress_header" type="boolean" truevalue="--suppress-header" falsevalue="" checked="False" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default" />
+      <!--
+      <param name="suppress_header" type="boolean" truevalue="..suppress-header" falsevalue="" checked="false" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default." />
+     -->
     </inputs>
     <outputs>
-        <!-- that does not work
         <data format="txt" name="report_file" label="${tool.name} on ${on_string}: Report">
-            <filter>str($params.isReportOutput) == "yes"</filter>
+            <filter>
+            ((
+                params['settingsType'] == "custom" and
+                params['isReportOutput'] is True
+            ))
+            </filter>
         </data>
-        -->
-        <data format="sam" name="output" label="${tool.name} on ${on_string}: mapped reads">
+        <data format="txt" name="output_stdout" label="${tool.name} on ${on_string}: Summary">
+            <filter>
+            ((
+                params['settingsType'] == "custom" and
+                params['bismark_stdout'] is True
+            ))
+            </filter>
+        </data>
+
+        <data format="bam" name="output" label="${tool.name} on ${on_string}: mapped reads">
           <actions>
             <conditional name="refGenomeSource.genomeSource">
               <when value="indexed">
@@ -232,7 +252,7 @@
           </when>
           <when value="paired">
             <action type="format">
-              <option type="from_param" name="singlePaired.input_mate1" param_attribute="ext" />
+              <option type="from_param" name="singlePaired.mate_list[0].input_mate1" param_attribute="ext" />
             </action>
           </when>
         </conditional>
@@ -252,7 +272,7 @@
           </when>
           <when value="paired">
             <action type="format">
-              <option type="from_param" name="singlePaired.input_mate1" param_attribute="ext" />
+              <option type="from_param" name="singlePaired.mate_list[0].input_mate1" param_attribute="ext" />
             </action>
           </when>
         </conditional>
@@ -276,7 +296,7 @@
           </when>
           <when value="paired">
             <action type="format">
-              <option type="from_param" name="singlePaired.input_mate1" param_attribute="ext" />
+              <option type="from_param" name="singlePaired.mate_list[0].input_mate1" param_attribute="ext" />
             </action>
           </when>
         </conditional>
@@ -295,7 +315,7 @@
           </when>
           <when value="paired">
             <action type="format">
-              <option type="from_param" name="singlePaired.input_mate1" param_attribute="ext" />
+              <option type="from_param" name="singlePaired.mate_list[0].input_mate1" param_attribute="ext" />
             </action>
           </when>
         </conditional>
@@ -338,6 +358,11 @@
 
  .. __: http://www.bioinformatics.babraham.ac.uk/projects/bismark/
 
+
+.. class:: warningmark
+
+Make sure all your input reads are in the correct and same format. If thats not the case please adjust/convert the filetype with galaxy's build-in converters.
+
 ------
 
 **Input formats**
@@ -400,12 +425,7 @@
 
 **Bismark parameter list**
 
-This is an exhaustive list of Bismark options:
-
-------
-
-**OPTIONS**
-
+This is an exhaustive list of Bismark options.
 
 Input::
 
@@ -526,76 +546,5 @@
                          the specified folder does not exist, Bismark will attempt to create it first. The path to the
                          temporary folder can be either relative or absolute.
 
-------
-
-Bowtie 2 alignment options::
-
-  -N INT                 Sets the number of mismatches to allowed in a seed alignment during multiseed alignment.
-                         Can be set to 0 or 1. Setting this higher makes alignment slower (often much slower)
-                         but increases sensitivity. Default: 0. This option is only available for Bowtie 2 (for
-                         Bowtie 1 see -n).
-
-  -L INT                   Sets the length of the seed substrings to align during multiseed alignment. Smaller values
-                         make alignment slower but more senstive. Default: the --sensitive preset of Bowtie 2 is
-                         used by default, which sets -L to 20. This option is only available for Bowtie 2 (for
-                         Bowtie 1 see -l).
-
-  --ignore-quals         When calculating a mismatch penalty, always consider the quality value at the mismatched
-                         position to be the highest possible, regardless of the actual value. I.e. input is treated
-                         as though all quality values are high. This is also the default behavior when the input
-                         doesn't specify quality values (e.g. in -f mode). This option is invariable and on by default.
-
-
-Bowtie 2 paired-end options::
-
-  --no-mixed             This option disables Bowtie 2's behavior to try to find alignments for the individual mates if
-                         it cannot find a concordant or discordant alignment for a pair. This option is invariable and
-                         and on by default.
-
-  --no-discordant        Normally, Bowtie 2 looks for discordant alignments if it cannot find any concordant alignments.
-                         A discordant alignment is an alignment where both mates align uniquely, but that does not
-                         satisfy the paired-end constraints (--fr/--rf/--ff, -I, -X). This option disables that behavior
-                         and it is on by default.
-
-
-Bowtie 2 effort options::
-
-  -D INT                 Up to INT consecutive seed extension attempts can "fail" before Bowtie 2 moves on, using
-                         the alignments found so far. A seed extension "fails" if it does not yield a new best or a
-                         new second-best alignment. Default: 15.
-
-  -R INT                 INT is the maximum number of times Bowtie 2 will "re-seed" reads with repetitive seeds.
-                         When "re-seeding," Bowtie 2 simply chooses a new set of reads (same length, same number of
-                         mismatches allowed) at different offsets and searches for more alignments. A read is considered
-                         to have repetitive seeds if the total number of seed hits divided by the number of seeds
-                         that aligned at least once is greater than 300. Default: 2.
-
-
-Bowtie 2 Scoring options::
-
-  --score_min "func"     Sets a function governing the minimum alignment score needed for an alignment to be considered
-                         "valid" (i.e. good enough to report). This is a function of read length. For instance, specifying
-                         L,0,-0.2 sets the minimum-score function f to f(x) = 0 + -0.2 * x, where x is the read length.
-                         See also: setting function options at http://bowtie-bio.sourceforge.net/bowtie2. The default is
-                         L,0,-0.2.
-
-
-Bowtie 2 Reporting options::
-
- --most_valid_alignments INT This used to be the Bowtie 2 parameter -M. As of Bowtie 2 version 2.0.0 beta7 the option -M is
-                         deprecated. It will be removed in subsequent versions. What used to be called -M mode is still the
-                         default mode, but adjusting the -M setting is deprecated.  Use the -D and -R options to adjust the
-                         effort expended to find valid alignments.
-
-                         For reference, this used to be the old (now deprecated) description of -M:
-                         Bowtie 2 searches for at most INT+1 distinct, valid alignments for each read. The search terminates when it
-                         can't find more distinct valid alignments, or when it finds INT+1 distinct alignments, whichever
-                         happens first. Only the best alignment is reported. Information from the other alignments is used to
-                         estimate mapping quality and to set SAM optional fields, such as AS:i and XS:i. Increasing -M makes 
-                         Bowtie 2 slower, but increases the likelihood that it will pick the correct alignment for a read that
-                         aligns many places. For reads that have more than INT+1 distinct, valid alignments, Bowtie 2 does not
-                         guarantee that the alignment reported is the best possible in terms of alignment score. -M is
-                         always used and its default value is set to 10.
-
   </help>
 </tool>