changeset 63:19e91eb3d06b draft

Uploaded
author stef
date Wed, 20 Aug 2014 11:16:26 -0400
parents bd81b2559c10
children 2f0af8970aea
files QDNAseq.xml
diffstat 1 files changed, 119 insertions(+), 153 deletions(-) [+]
line wrap: on
line diff
--- a/QDNAseq.xml	Thu Aug 07 11:25:23 2014 -0400
+++ b/QDNAseq.xml	Wed Aug 20 11:16:26 2014 -0400
@@ -1,37 +1,44 @@
-<tool id="QDNAseq" name="QDNAseq" version="0.0.1">
+<tool id="QDNAseq" name="QDNAseq" version="0.0.2" force_history_refresh="True">
   
   <requirements>
-    <!-- <requirement type="set_environment">QDNASEQ_SCRIPT_PATH</requirement> -->
-    <!-- R 3.1.0 dependency will be used instead when available, now default R see command -->
+    
+    <!-- R 3.1.0 dependency will be used instead when available, now default R is used, see command -->
     <!-- <requirement type="package" version="3.1.0">R</requirement> -->
+    <!-- <requirement type="package" version="1.0.5">qdnaseq</requirement> -->
     <requirement type="package" version="0.1.18">samtools</requirement>
+    <requirement type="set_environment">TOOL_DIR</requirement>
   </requirements>
 
   <description>Quantitative copy number abberation detection</description>
 
-  <!-- command block to call script with default R environment -->
-  <!-- change interpreter to /full/path/to/Rscript if required -->
+  <!-- command block to call script with default R installation -->
+  <!-- change to /full/path/to/Rscript if required (eg /ccagc/lib/R/R-3.1.0/bin/Rscript) -->
   <command interpreter="Rscript"> 
     QDNAseq.R 
     $qdnaseq_cfg
   </command>
 
   <stdio>
-    <!-- Anything higher than 0 means the R script didnt finish -->
+    <!-- Anything higher than 0 means the R script didnt finish (correctly) -->
     <!-- Because different R packages deal with err/warn differently unable to waterproof this -->
     <exit_code range="1:" level="fatal" description="R script didnt finish correctly, check log" />
   </stdio>
   
   <inputs>
+    
     <!-- ==================== -->
     <!-- General inputs -->
     <!-- ==================== -->
+    
+    <!-- Job name: must contain non-whitespace chars -->
     <param name="jobName" type="text" optional="false" label="Analysis/ouput name" help="Supply a name for the outputs to remind you what they contain" value="TEST">
       <validator type="empty_field" />
       <validator type="regex" message="This field should contain some non-whitespace character">.*\S</validator>
     </param>
-    <param name="binSize" type="select" label="Select bin-size to use (kb)" help="Larger bin sizes provide faster analysis but lower resolution">
-      <option value="1000">1Mb</option>
+
+    <!-- Bin Size: only certain sizes are supported by QDNAseq package -->
+    <param name="binSizes" type="select" optional="false" multiple="true" label="Select bin-sizes to use (kb)" help="Larger bin sizes provide faster analysis but lower resolution">
+      <option value="1000" selected="true">1Mb</option>
       <option value="100">100kb</option>
       <option value="30">30kb</option>
       <option value="15">15kb</option>
@@ -39,11 +46,7 @@
       <option value="1">1kb</option>
     </param>
 
-    <param name="doCall" type="select" label="Also segment and call with CGHcall" help="Segmenting and calling can take significant computational time">
-      <option value="TRUE">yes</option>
-      <option value="FALSE">no</option>
-    </param>
-
+    <!-- Experiment type: only one type (SR50) supported now, maybe more in the future-->
     <param name="experimentType" type="select" label="Type of sequencing data" help="Currently only single end reads of lenght 50 are supported within galaxy">
       <option value="SR50">Single Reads of 50bp</option>
       <!-- <option value="PE1000">PairedEnd1000</option> -->
@@ -55,65 +58,45 @@
     <param name="bams" type="data" multiple="true" optional="false" format="bam" label="Input BAMs" help="Select the BAM files to analyze" />
 
     <!-- ==================== -->
-    <!-- This section contains galaxy history output settings -->
+    <!-- Optional segmenting -->
     <!-- ==================== -->
-    <conditional name="extra_history_outputs">
-      <param name="show" type="select" label="Optional history outputs">
-        <option value="NO">Only output Report to history</option>
-        <option value="YES">Select additional history outputs</option>
+    <param name="doSegment" type="select" label="Also perform segmentation" help="Segmentation collects bins with similar ratio into regions">
+      <option value="TRUE">yes</option>
+      <option value="FALSE">no</option>
+    </param>
+
+    <!-- ==================== -->
+    <!-- Option to use your own bin annotations file -->
+    <!-- ==================== -->
+    <conditional name="binannotations_source">
+      <param name="show" type="select" label="Bin annotations to use" help="Default bin-annotations are for GRCh37/hg19 and tuned for 50bp reads (single end)">
+        <option value="default">Default</option>
+        <option value="history">From history</option>
       </param>
-      <when value="YES">
-        <param name="readcounts_rds" type="select" label="Also output readcounts RDS (R object) to history">
-          <option value="FALSE">no</option>
-          <option value="TRUE">yes</option>
-        </param>
-        <param name="copynumbers_rds" type="select" label="Also output copynumbers RDS (R object) to history">
-          <option value="FALSE">no</option>
-          <option value="TRUE">yes</option>
-        </param>
-        <param name="calls_rds" type="select" label="Also output called segments RDS (R object) to history">
-          <option value="FALSE">no</option>
-          <option value="TRUE">yes</option>
-        </param>
-        <param name="copynumbers_igv" type="select" label="Also output copynumbers IGV file to history">
-          <option value="FALSE">no</option>
-          <option value="TRUE">yes</option>
-        </param>
+      <when value="history">
+        <param name="binannotation_file" type="data" multiple="false" label="R data structure file (*.rds) with bin-annotations" help="If you made your own bin-annotations with the QDNAseq bioconductor package you can upload them to your history and select here" />
+      </when>
+      <when value="default">
+        <param name="binannotation_file" type="hidden" value="" />
       </when>
       
-      <when value="NO">
-        <param name="readcounts_rds" type="hidden" value="FALSE" />
-        <param name="copynumbers_rds" type="hidden" value="FALSE" />
-        <param name="calls_rds" type="hidden" value="FALSE" />
-        <param name="copynumbers_igv" type="hidden" value="FALSE" />
-      </when>
-    </conditional>
+    </conditional> 
 
     <!-- ==================== -->
-    <!-- Option to use your own bin annotations -->
-    <!-- ==================== -->
-    <conditional name="use_own_binannotation">
-      <param name="show" type="select" label="Use your own bin annotations from history">
-        <option value="no">no</option>
-        <option value="yes">yes</option>
-      </param>
-      <when value="yes">
-        <param name="binannotation_file" type="data" multiple="false" format="rds" label="R data structure file with bin-annotations" help="If you made your own bin-annotations with the QDNAseq bioconductor package you can upload them to your history and select here" />
-      </when>
-      <when value="no">
-        <param name="binannotation_file" type="hidden" value="" />
-      </when>
-    </conditional> 
-    <!-- ==================== -->
     <!-- Optional advanced options -->
     <!-- ==================== -->
     <conditional name="advanced">
-      <param name="show" type="select" label="Show advanced options">
+      <param name="show" type="select" label="Use advanced options" help="Select yes to show and use filter and output options">
         <option value="no">no</option>
         <option value="yes">yes</option>
       </param>
       <when value="yes">
         
+        <param name="copynumbers_igv" type="select" label="Also output copynumber IGV file to history">
+          <option value="FALSE">no</option>
+          <option value="TRUE">yes</option>
+        </param>
+
         <param name="undo_splits" type="select" label="undoSplits" help="If set to sdundo, see undoSD below">
           <option value="sdundo">sdundo</option>
           <option value="prune">prune</option>
@@ -128,109 +111,105 @@
         </param>
 
         <param name="mappability" type="integer" value="0" min="0" max="100" label="Filter bins with lower mappability" help="Will exclude all bins will lower mappability than this number (0-100)" />
-
-        <param name="debug" type="select" label="DEBUG / TEST" help="Use inbuilt LGG data instead of input BAMs">
-          <option value="FALSE">no</option>
-          <option value="TRUE">yes</option>
+      
+        <!-- ==================== -->
+        <!-- Optional graphical/plotting options -->
+        <!-- ==================== -->
+        <param name="plot_width" size="3" type="integer" value="1440" label="Width of the png image produced" />
+        <param name="plot_height" size="3" type="integer" value="720" label="Height of the png image produced" />
+        <param name="exclude_chrs" type="select" multiple="true" label="Hide these chromosomes in plots" help="Currently only standard human chromosomes supported. NOTE: other filters might also exclude chromosomes">
+          <option value="1">1</option><option value="2">2</option>
+          <option value="3">3</option><option value="4">4</option>
+          <option value="5">5</option><option value="6">6</option>
+          <option value="7">7</option><option value="8">8</option>
+          <option value="9">9</option><option value="10">10</option>
+          <option value="11">11</option><option value="12">12</option>
+          <option value="13">13</option><option value="14">14</option>
+          <option value="15">15</option><option value="16">16</option>
+          <option value="17">17</option><option value="18">18</option>
+          <option value="19">19</option><option value="20">20</option>
+          <option value="21">21</option><option value="22">22</option>
+          <option value="X" selected="true">X</option>
+          <option value="Y" selected="true">Y</option>
         </param>
       </when>
-      <!-- need to set defaults because params are passed to R anyway -->
+
+      <!-- need to set defaults because params are passed to R regardless of conditional opened/closed -->
       <when value="no">
+        <param name="copynumbers_igv" type="hidden" value="FALSE" />
         <param name="undoSD" type="hidden" value="1" />
         <param name="undo_splits" type="hidden" value="sdundo" />
         <param name="blacklist" type="hidden" value="TRUE" />
         <param name="mappability" type="hidden" value="0" />
-        <param name="debug" type="hidden" value="FALSE" />
-      </when>
-    </conditional> 
-
-    <!-- ==================== -->
-    <!-- Optional graphical/plotting options -->
-    <!-- ==================== -->
-    <conditional name="plot_options">
-      <param name="show" type="select" label="Show graphical options">
-        <option value="no">no</option>
-        <option value="yes">yes</option>
-      </param>
-      <when value="yes">
-        <param name="plot_width" size="3" type="integer" value="960" label="Plot width" />
-        <param name="plot_height" size="3" type="integer" value="480" label="Plot height" />
-        <param name="exclude_chrs" type="select" multiple="true" label="Hide these chromosomes in plots" help="Currently only standard human chromosomes supported. NOTE: other filters might also exclude chromosomes">
-          <option value="1">1</option>
-          <option value="2">2</option>
-          <option value="3">3</option>
-          <option value="4">4</option>
-          <option value="5">5</option>
-          <option value="6">6</option>
-          <option value="7">7</option>
-          <option value="8">8</option>
-          <option value="9">9</option>
-          <option value="10">10</option>
-          <option value="11">11</option>
-          <option value="12">12</option>
-          <option value="13">13</option>
-          <option value="14">14</option>
-          <option value="15">15</option>
-          <option value="16">16</option>
-          <option value="17">17</option>
-          <option value="18">18</option>
-          <option value="19">19</option>
-          <option value="20">20</option>
-          <option value="21">21</option>
-          <option value="22">22</option>
-          <option value="X" selected="true">X</option>
-          <option value="Y" selected="true">Y</option>
-        </param>
-      </when>
-      <when value="no">
-        <param name="plot_width" type="hidden" value="960" />
-        <param name="plot_height" type="hidden" value="480" />
+        <param name="plot_width" type="hidden" value="1440" />
+        <param name="plot_height" type="hidden" value="720" />
         <param name="exclude_chrs" type="hidden" value="X,Y" />
       </when>
     </conditional>
+
+    <!-- ==================== -->
+    <!-- Option to perform a test run with built in data -->
+    <!-- ==================== -->
+    <param name="debug" type="select" label="Run with test data" help="Use inbuilt LGG150 data instead of input BAMs">
+      <option value="FALSE">no</option>
+      <option value="TRUE">yes</option>
+    </param>
+    
   </inputs>
   <!-- ==================== -->
-  <!-- This config is sourced in R code -->
+  <!-- Config file to pass params to R script -->
   <!-- ==================== -->
   <configfiles>
     <configfile name="qdnaseq_cfg">
-## this file was sourced in QDNAseq R wrapper script
-## in this way all galaxy params are passes to R
+## Desc: this file was sourced in QDNAseq R wrapper script
+##  as means to pass all galaxy params to R
 
+## -----
 ## required params
-as.integer( "${binSize}" ) -> binSize
+## -----
+"${binSizes}" -> binSizesString
 "${experimentType}" -> experimentType
 "${jobName}" -> outputName
 
-## extra params
+## -----
+## extra main params
+## -----
 "${htmlFile}" -> outputHtml
+"${htmlFile.id}" -> outputId
+"${__new_file_path__}" -> newFilePath
+
 "${htmlFile.files_path}" -> outputPath
-"${use_own_binannotation.binannotation_file}" -> binAnnotations
-as.logical( "${doCall}" ) -> doCall
+as.logical( "${doSegment}" ) -> doSegment
+as.logical( "${debug}" ) -> debug
 
+## -----
+## own bin-annotations file options
+## -----
+"${binannotations_source.binannotation_file}" -> binAnnotations
+
+## -----
 ## advanced options
+## -----
 as.double( "${advanced.undoSD}" ) -> undoSD
-as.logical( "${advanced.debug}" ) -> debug
 as.logical( "${advanced.blacklist}" ) -> filterBlacklistedBins
 as.integer( "${advanced.mappability}" ) -> mappabilityCutoff
 "${advanced.undo_splits}" -> undoSplits
+as.logical( "${advanced.copynumbers_igv}" ) -> doOutputCopynumbersIgv
 
-## history output params
-as.logical( "${extra_history_outputs.readcounts_rds}" ) -> doOutputReadcountsRds
-as.logical( "${extra_history_outputs.copynumbers_rds}" ) -> doOutputCopynumbersRds
-as.logical( "${extra_history_outputs.calls_rds}" ) -> doOutputCallsRds
-as.logical( "${extra_history_outputs.copynumbers_igv}" ) -> doOutputCopynumbersIgv
-"${rdsReadCounts}" -> readCountsDatasetFile
-"${rdsCopyNumbers}" -> copyNumbersDatasetFile
-"${rdsCalls}" -> calledSegmentsDatasetFile
-"${igvCopyNumbers}" -> copyNumbersIgvDatasetFile
+## #for binSize in $binSizes}.split(",")# 
+## "${binSize}kbp_${igvCopyNumbers}" -> copyNumbersIgvDatasetFile
+## #end for
 
-## plotting params
-as.integer( "${plot_options.plot_width}" ) -> PLOT_WIDTH
-as.integer( "${plot_options.plot_height}" ) -> PLOT_HEIGHT
-"${plot_options.exclude_chrs}" -> excludeChrsString
-
+## -----
+## plot options
+## -----
+as.integer( "${advanced.plot_width}" ) -> PLOT_WIDTH
+as.integer( "${advanced.plot_height}" ) -> PLOT_HEIGHT
+"${advanced.exclude_chrs}" -> excludeChrsString
+  
+## -----
 ## input BAMs init
+## -----
 c() -> bamsPaths
 c() -> bamsNames
 
@@ -243,27 +222,13 @@
   </configfiles>
 
   <!-- ==================== -->
-  <!-- Main output is an html based report, additional on request -->
+  <!-- Main output is an html based report -->
   <!-- ==================== -->
   <outputs>
 
-    <data format="html" name="htmlFile" label="QDNAseq Report ${binSize}kb (${jobName})" />
-    
-    <data format="rds" name="rdsReadCounts" label="${jobName}_readCounts_${binSize}kb.rds">
-      <filter> extra_history_outputs['readcounts_rds'] == "TRUE" </filter><!-- <filter>("readcounts_rds" in outputs)</filter> -->
-    </data>
-
-    <data format="rds" name="rdsCopyNumbers" label="${jobName}_copyNumbers_${binSize}kb.rds">
-      <filter> extra_history_outputs['copynumbers_rds'] == "TRUE" </filter>
-    </data>
-
-    <data format="rds" name="rdsCalls" label="${jobName}_calls_${binSize}kb.rds">
-      <filter> extra_history_outputs['calls_rds'] == "TRUE" </filter>
-    </data>
-
-    <data format="txt" name="igvCopyNumbers" label="${jobName}_copyNumbers_${binSize}kb.igv">
-      <filter> extra_history_outputs['copynumbers_igv'] == "TRUE" </filter>
-    </data>
+    <!-- main output is a html report -->
+    <!-- ...but there can be more outputs using the id of the htmlFile output -->
+    <data format="html" name="htmlFile" label="QDNAseq: ${jobName}" />
 
   </outputs>
 
@@ -295,15 +260,17 @@
 
 .. _here: http://www.stefs.nl/wp/contact
 
+You can **test this tool** with built-in data by selecting the option "Run with test data" and press execute.
+
 -----
 
 .. class:: warningmark
 
-As there is no R 3.1.0 package yet (which is required), the **dependencies** need to be installed by hand and available to the user under which galaxy runs: R (3.1.0) and bioconductor package QDNAseq (>= 1.0.5)
+As there is no R 3.1.0 galaxy-package yet (a requirement for QDNAseq), the **dependencies** need to be installed by hand and available to the user under which galaxy runs: R (3.1.0) and bioconductor package QDNAseq (>= 1.0.5). In case the default R is not 3.1.0, also the wrapper xml must be updated to include the correct path during installation of this tool.
 
 .. class:: warningmark
 
-The input BAMs are expected to be **single end reads of 50bp length** mapped to GRCh37/hg19 genome build. Other experiment setups are currently not supported within galaxy. See the documentation of QDNAseq at bioconductor on how to deal with different setups.
+The input BAMs are expected to be **single end reads of 50bp length** mapped to GRCh37/hg19 genome build. Other experiment setups are currently not tested or supported within galaxy. See the documentation of QDNAseq at bioconductor on how to deal with different setups (or keep fingers crossed ;) )
 
 .. class:: warningmark
 
@@ -313,13 +280,12 @@
 
 **Citation**
 
-For the underlying tool please cite: llari Scheinin, Daoud Sie et al. DNA copy number analysis of fresh and formalin-fixed specimens by whole-genome sequencing: improved correction of systematic biases and exclusion of problematic regions, (submitted). See also the bioconductor package_ documentation.
+For the underlying QDNAseq R package please cite: llari Scheinin, Daoud Sie et al. DNA copy number analysis of fresh and formalin-fixed specimens by whole-genome sequencing: improved correction of systematic biases and exclusion of problematic regions, (submitted). See also the bioconductor package_ documentation.
 
 .. _package: http://www.bioconductor.org/packages/release/bioc/html/QDNAseq.html
 
+.. image:: ./LGG150_copynumber_example.png :height: 240 :width: 480
 
-.. image:: LGG150_copynumber_example.png
-.. image:: LGG150_calls_example.png
   </help>
 
 </tool>