diff QDNAseq.xml @ 78:81ba2f857fe2 draft

Uploaded
author stef
date Wed, 04 Mar 2015 08:42:14 -0500
parents acf62630e4b5
children 05e5358b8828
line wrap: on
line diff
--- a/QDNAseq.xml	Thu Nov 06 05:48:52 2014 -0500
+++ b/QDNAseq.xml	Wed Mar 04 08:42:14 2015 -0500
@@ -1,11 +1,11 @@
-<tool id="QDNAseq" name="QDNAseq" version="0.0.2" force_history_refresh="True">
+<tool id="QDNAseq" name="QDNAseq" version="1.0.0" force_history_refresh="True">
   
   <requirements>
     
     <requirement type="package" version="0.1.18">samtools</requirement>
     <!-- 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="1.2.2">qdnaseq</requirement> -->
     <requirement type="set_environment">QDNASEQ_PATH</requirement>
     
   </requirements>
@@ -22,7 +22,7 @@
   <stdio>
     <!-- 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" />
+    <exit_code range="1:" level="fatal" description="R script finished too early, check log" />
   </stdio>
   
   <inputs>
@@ -34,17 +34,17 @@
     <!-- 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>
+      <validator type="regex" message="No whitespace characters allowed">^[^\s\\]+$</validator>
     </param>
 
     <!-- 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" selected="true">100kb</option>
-      <option value="30">30kb</option>
-      <option value="15" selected="true">15kb</option>
-      <option value="5">5kb</option>
-      <option value="1">1kb</option>
+    <param name="binSizes" type="select" display="checkboxes" optional="false" multiple="true" label="Select bin-sizes to use (kb)" help="Larger bin sizes provide faster analysis but lower resolution. NOTE: BAM files are traversed again for each binsize, so selecting multiple bin-sizes takes extra analysis time!">
+      <option value="bin1000kb">1Mb</option>
+      <option value="bin100kb">100kb</option>
+      <option value="bin30kb">30kb</option>
+      <option value="bin15kb" selected="true">15kb</option>
+      <option value="bin5kb">5kb</option>
+      <option value="bin1kb">1kb</option>
     </param>
 
     <!-- Experiment type: only one type (SR50) supported now, maybe more in the future-->
@@ -59,16 +59,42 @@
     <param name="bams" type="data" multiple="true" optional="True" format="bam" label="Input BAMs" help="Select the BAM files to analyze" />
 
     <!-- ==================== -->
-    <!-- Optional segmenting -->
+    <!-- Optional segmenting step -->
     <!-- ==================== -->
     <param name="doSegment" type="select" label="Also perform segmentation" help="Segmentation collects bins with similar ratio into regions">
+      <option value="FALSE">no</option>
       <option value="TRUE">yes</option>
+    </param>
+
+    <!-- ==================== -->
+    <!-- Optional calling step -->
+    <!-- ==================== -->
+    <param name="doCall" type="select" label="Also perform calling" help="Calling tries to determine a state for each segment (GAIN, LOSS, etc)">
       <option value="FALSE">no</option>
+      <option value="TRUE">yes</option>
+    </param>
+
+    <!-- ==================== -->
+    <!-- Optional hisotry output: copynumber TXT file -->
+    <!-- ==================== -->
+    <param name="txt2history" type="select" label="Also output copynumber TXT file to history">
+      <option value="FALSE">no</option>
+      <option value="TRUE">yes</option>
+    </param>
+
+    <!-- ==================== -->
+    <!-- Optional history output: R object RDS file -->
+    <!-- ==================== -->
+    <param name="rds2history" type="select" label="Also output copynumber RDS files to history">
+      <option value="FALSE">no</option>
+      <option value="TRUE">yes</option>
     </param>
 
     <!-- ==================== -->
     <!-- Option to use your own bin annotations file -->
     <!-- ==================== -->
+    <!-- NOT IN USE YET -->
+    <!--
     <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>
@@ -82,6 +108,7 @@
       </when>
       
     </conditional> 
+    -->
 
     <!-- ==================== -->
     <!-- Optional advanced options -->
@@ -92,11 +119,6 @@
         <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>
@@ -137,7 +159,6 @@
 
       <!-- 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" />
@@ -162,7 +183,7 @@
   <!-- ==================== -->
   <configfiles>
     <configfile name="qdnaseq_cfg">
-## Desc: this file was sourced in QDNAseq R wrapper script
+## Desc: this file is sourced in QDNAseq R wrapper script
 ##  as means to pass all galaxy params to R
 
 ## -----
@@ -180,14 +201,34 @@
 "${htmlFile.id}" -> outputId
 "${__new_file_path__}" -> newFilePath
 
+list() -> historyOutputFiles
+
+"${txt_1}" -> historyOutputFiles[[ 'txt_1' ]]
+"${txt_5}" -> historyOutputFiles[[ 'txt_5' ]]
+"${txt_15}" -> historyOutputFiles[[ 'txt_15' ]]
+"${txt_30}" -> historyOutputFiles[[ 'txt_30' ]]
+"${txt_100}" -> historyOutputFiles[[ 'txt_100' ]]
+"${txt_1000}" -> historyOutputFiles[[ 'txt_1000' ]]
+
+"${rds_1}" -> historyOutputFiles[[ 'rds_1' ]]
+"${rds_5}" -> historyOutputFiles[[ 'rds_5' ]]
+"${rds_15}" -> historyOutputFiles[[ 'rds_15' ]]
+"${rds_30}" -> historyOutputFiles[[ 'rds_30' ]]
+"${rds_100}" -> historyOutputFiles[[ 'rds_100' ]]
+"${rds_1000}" -> historyOutputFiles[[ 'rds_1000' ]]
+
+
 "${htmlFile.files_path}" -> outputPath
 as.logical( "${doSegment}" ) -> doSegment
+as.logical( "${doCall}" ) -> doCall
 as.logical( "${debug}" ) -> debug
 
 ## -----
 ## own bin-annotations file options
 ## -----
+<!-- 
 "${binannotations_source.binannotation_file}" -> binAnnotations
+-->
 
 ## -----
 ## advanced options
@@ -196,11 +237,8 @@
 as.logical( "${advanced.blacklist}" ) -> filterBlacklistedBins
 as.integer( "${advanced.mappability}" ) -> mappabilityCutoff
 "${advanced.undo_splits}" -> undoSplits
-as.logical( "${advanced.copynumbers_igv}" ) -> doOutputCopynumbersIgv
-
-## #for binSize in $binSizes}.split(",")# 
-## "${binSize}kbp_${igvCopyNumbers}" -> copyNumbersIgvDatasetFile
-## #end for
+as.logical( "${txt2history}" ) -> txt2history
+as.logical( "${rds2history}" ) -> rds2history
 
 ## -----
 ## plot options
@@ -230,7 +268,49 @@
 
     <!-- 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}" />
+    
+    <data format="html" name="htmlFile" label="QDNAseq: ${jobName} report" />
+
+    <!-- WHY does there seem to be no way to use split() within this code in galaxy!!! -->
+    <!-- now have to fall back to using unique names within binSizes instead of just integers -->
+    <!-- Problem with integers is that both "1" and "5" are also present in eg "15,100" -->
+    <data format="tsv" name="txt_1000" label="QDNAseq: ${jobName} txt 1000kb">
+      <filter>( "bin1000kb" in binSizes and txt2history == 'TRUE')</filter>
+    </data>
+    <data format="tsv" name="txt_100" label="QDNAseq: ${jobName} txt 100kb">
+      <filter>("bin100kb" in binSizes and txt2history == 'TRUE')</filter>
+    </data>
+    <data format="tsv" name="txt_30" label="QDNAseq: ${jobName} txt 30kb">
+      <filter>("bin30kb" in binSizes and txt2history == 'TRUE')</filter>
+    </data>
+    <data format="tsv" name="txt_15" label="QDNAseq: ${jobName} txt 15kb">
+      <filter>("bin15kb" in binSizes and txt2history == 'TRUE')</filter>
+    </data>
+    <data format="tsv" name="txt_5" label="QDNAseq: ${jobName} txt 5kb">
+      <filter>("bin5kb" in binSizes and txt2history == 'TRUE')</filter>
+    </data>
+    <data format="tsv" name="txt_1" label="QDNAseq: ${jobName} txt 1kb">
+      <filter>("bin1kb" in binSizes and txt2history == 'TRUE')</filter>
+    </data>
+
+    <data format="rds" name="rds_1000" label="QDNAseq: ${jobName} rds 1000kb">
+      <filter>( "bin1000kb" in binSizes and rds2history == 'TRUE')</filter>
+    </data>
+    <data format="rds" name="rds_100" label="QDNAseq: ${jobName} rds 100kb">
+      <filter>( "bin100kb" in binSizes and rds2history == 'TRUE')</filter>
+    </data>
+    <data format="rds" name="rds_30" label="QDNAseq: ${jobName} rds 30kb">
+      <filter>( "bin30kb" in binSizes and rds2history == 'TRUE')</filter>
+    </data>
+    <data format="rds" name="rds_15" label="QDNAseq: ${jobName} rds 15kb">
+      <filter>( "bin15kb" in binSizes and rds2history == 'TRUE')</filter>
+    </data>
+    <data format="rds" name="rds_5" label="QDNAseq: ${jobName} rds 5kb">
+      <filter>( "bin5kb" in binSizes and rds2history == 'TRUE')</filter>
+    </data>
+    <data format="rds" name="rds_1" label="QDNAseq: ${jobName} rds 1kb">
+      <filter>( "bin1kb" in binSizes and rds2history == 'TRUE')</filter>
+    </data>
 
   </outputs>