changeset 4:f49f5a460c74

GSNAP - add and refine param options for gmap v 2011-10-16
author Jim Johnson <jj@umn.edu>
date Tue, 08 Nov 2011 13:02:32 -0600
parents 72ab00e732c3
children f4b4c1712e39
files gmap/gmap_indices.loc.sample gmap/gsnap.xml tool-data/gmap_indices.loc.sample
diffstat 3 files changed, 247 insertions(+), 71 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gmap/gmap_indices.loc.sample	Tue Nov 08 13:02:32 2011 -0600
@@ -0,0 +1,10 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of GMAPDB indexed sequences data files.  You will need
+#to create these data files using gmap_build and then create a gmap_indices.loc file 
+#similar to this one (store it in this directory) that points to 
+#the directories in which those files are stored. The gmap_indices.loc 
+#file has this format (white space characters are TAB characters):
+#
+#<unique_build_id>   <dbkey>   <display_name>   <kmers> <map,map>       <snp,snp>       <file_base_path>
+#hg18   hg18    hg18 (cmet atoi)        12,13,14,15     splicesites,introns     snps    /depot/data2/galaxy/gmap/hg18
+#hg19	hg19	hg19 (cmet atoi)	12,13,14,15	splicesites,introns,snps	snps,dbsnp	/depot/data2/galaxy/gmap/hg19
--- a/gmap/gsnap.xml	Fri Oct 21 12:11:45 2011 -0500
+++ b/gmap/gsnap.xml	Tue Nov 08 13:02:32 2011 -0600
@@ -40,8 +40,11 @@
          -V $refGenomeSource.use_snps.snpindex.extra_files_path -v $refGenomeSource.use_snps.snpindex.metadata.snps_name
        #end if
     #end if
-    #if $mode.__str__ != '':
-      --mode=$mode
+    #if $refGenomeSource.mode.__str__ != '':
+      --mode=$refGenomeSource.mode
+    #end if
+    #if $mapq_unique_score.__str__ != '':
+      --mapq-unique-score=$mapq_unique_score
     #end if
     #if $computation.options == "advanced":
       #if $computation.max_mismatches.__str__ != '':
@@ -76,6 +79,16 @@
       #if $computation.adapter_strip.__str__ != '':
         --adapter-strip=$computation.adapter_strip
       #end if
+      #if $computation.trim_mismatch_score.__str__ != '':
+        --trim-mismatch-score=$computation.trim_mismatch_score
+      #end if
+      ## TODO - do we need these options (Is it tally XOR runlength?):
+      ## --tallydir=  --use-tally=tally
+      ## --runlengthdir  --use-runlength=runlength
+      #if $computation.use_tally != None and len($computation.use_tally.__str__) > 0:
+        ##--tallydir $os.path.dirname($computation.use_tally) --use-tally $os.path.basename($computation.use_tally)
+        --use-tally=$computation.use_tally
+      #end if
       ## gmap options
       #if $computation.gmap_mode.__str__ != '' and  $computation.gmap_mode.__str__ != 'None':
         --gmap-mode='$computation.gmap_mode'
@@ -155,9 +168,22 @@
       #end if
       $result.creads_complement
     #end if
-    ## TODO - do we need these options (Is it tally XOR runlength?):
-    ## --tallydir=  --use-tally=tally
-    ## --runlengthdir  --use-runlength=runlength
+    #if $results.split_output == 'yes':
+      --split-output=gsnap_out
+      #if $results.fails.choice == 'nofails':
+        --nofails
+      #elif $results.fails.choice == 'failsonly':
+        --failsonly
+      #end if
+      $results.fails_as_input
+    #else
+      #if $results.fails.choice == 'nofails':
+        --nofails
+      #elif $results.fails.choice == 'failsonly':
+        --failsonly
+        $results.fails.fails_as_input
+      #end if
+    #end if
     #if $seq.format == "gsnap_fasta":
       $seq.circularinput $seq.gsnap
     #else if $seq.format == "fastq":
@@ -173,7 +199,7 @@
       #if $seq.filter_chastity.__str__ != 'off':
         --filter-chastity=$seq.filter_chastity
       #end if
-      #if $seq.paired.ispaired.__str__ == "yes":
+      #if $seq.paired.ispaired.__str__ == 'yes':
         #if $seq.paired.pairmax_dna.__str__ != '':
           --pairmax-dna=$seq.paired.pairmax_dna
         #end if
@@ -185,10 +211,14 @@
         $seq.fastq
       #end if
     #end if
-    #if $split_output == True
+    #if $results.split_output == 'yes':
       2> $gsnap_stderr
-    #else
-      2> $gsnap_stderr > $results
+    #else:
+      #if $results.fails.choice.__str__ == 'failsonly' and $results.fails.fails_as_input.__str__ != '':
+        2> $gsnap_stderr > $gsnap_fq
+      #else
+        2> $gsnap_stderr > $gsnap_out
+      #end if
     #end if
 
   </command>
@@ -197,12 +227,15 @@
     <conditional name="seq">
       <param name="format" type="select" label="&lt;H2&gt;Input Sequences&lt;/H2&gt;Select the input format" help="">
         <option value="fastq">Fastq</option>
+        <!--
+        <option value="goby">Goby compact-reads</option>
+        -->
         <option value="gsnap_fasta">GNSAP fasta</option>
       </param>
       <when value="fastq">
         <param name="fastq" type="data" format="fastq" label="Select a fastq dataset" />
         <conditional name="paired">
-          <param name="ispaired" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Paired Reads"/>
+          <param name="ispaired" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Use Paired Reads?"/>
           <when value="no"/>
           <when value="yes">
             <param name="fastq" type="data" format="fastq" label="Select the paired reads reverse dataset" />
@@ -216,8 +249,8 @@
           </when>
         </conditional>
         <param name="barcode_length" type="integer" value="" optional="true"  label="Amount of barcode to remove from start of read (default 0)" />
-        <param name="fastq_id_start" type="integer" value="" optional="true"  label="Starting field  of identifier in FASTQ header, space-delimited, starting from 1" />
-        <param name="fastq_id_end" type="integer" value="" optional="true"  label="Ending field  of identifier in FASTQ header, space-delimited, starting from 1" 
+        <param name="fastq_id_start" type="integer" value="" optional="true"  label="Starting field  of identifier in FASTQ header, whitespace-delimited, starting from 1" />
+        <param name="fastq_id_end" type="integer" value="" optional="true"  label="Ending field  of identifier in FASTQ header, whitespace-delimited, starting from 1" 
              help="Examples:
                   &lt;br&gt;@HWUSI-EAS100R:6:73:941:1973#0/1
                   &lt;br&gt; . start=1, end=1 (default)  => identifier is HWUSI-EAS100R:6:73:941:1973#0/1
@@ -238,19 +271,19 @@
           <option value="both">both - a 'Y' is required on both ends of a paired-end read or the only end of a single-end read</option>
         </param>
       </when>
+      <!--
+      <when value="goby">
+      </when>
+      -->
       <when value="gsnap_fasta">
         <param name="gsnap" type="data" format="fasta" label="Select a single-end dataset" help="GSNAP fasta must have the sequence entirely on one line, a second line is interpreted as the paired-end sequence"/>
         <param name="circularinput" type="boolean" checked="false" truevalue="--circular-input=true" falsevalue="" label="Circular-end data (paired reads are on same strand)"/>
       </when>
+      
     </conditional>
-
-    <param name="mode" type="select" label="Alignment mode" help="Assumes cmetindex and atoiindex were run on the gmap datatbase.">
-        <option value="">standard</option>
-        <option value="cmet-stranded">cmet-stranded   for bisulfite-treated DNA reads (tolerance to C-to-T changes)</option>
-        <option value="cmet-nonstranded">cmet-nonstranded   for bisulfite-treated DNA reads (tolerance to C-to-T changes)</option>
-        <option value="atoi-stranded">atoi-stranded   for RNA-editing tolerance (A-to-G changes)</option>
-        <option value="atoi-nonstranded">atoi-nonstranded   for RNA-editing tolerance (A-to-G changes)</option>
-    </param>
+    <param name="mapq_unique_score"  type="integer" value="" optional="true" label="MAPQ score threshold" 
+                help="For multiple results, consider as a unique result if only one of the results has a MAPQ score equal or greater than this
+                      (if not selected, then reports all multiple results, up to npaths)" />
 
     <!-- GMAPDB for alignment -->
     <conditional name="refGenomeSource">
@@ -282,8 +315,16 @@
           </options>
         </param>
 
+        <param name="mode" type="select" label="Alignment mode" help="Assumes cmetindex and atoiindex were run on the gmap datatbase.">
+            <option value="">standard</option>
+            <option value="cmet-stranded">cmet-stranded   for bisulfite-treated DNA reads (tolerance to C-to-T changes)</option>
+            <option value="cmet-nonstranded">cmet-nonstranded   for bisulfite-treated DNA reads (tolerance to C-to-T changes)</option>
+            <option value="atoi-stranded">atoi-stranded   for RNA-editing tolerance (A-to-G changes)</option>
+            <option value="atoi-nonstranded">atoi-nonstranded   for RNA-editing tolerance (A-to-G changes)</option>
+        </param>
+
         <conditional name="use_splicing">
-          <param name="src" type="select" label="Known Splicesite and Introns" 
+          <param name="src" type="select" label="&lt;HR&gt;Known Splicesite and Introns" 
                  help="Look for splicing involving known sites or known introns at short or long distances 
                   See README instructions for the distinction between known sites and known introns">
             <option value="none" selected="true">None</option>
@@ -310,7 +351,7 @@
         </conditional>
 
         <conditional name="use_snps">
-          <param name="src" type="select" label="Known SNPs" help="for SNP tolerant alignments">
+          <param name="src" type="select" label="&lt;HR&gt;Known SNPs" help="for SNP tolerant alignments">
             <option value="none" selected="true">None</option>
             <option value="gmapdb">From the GMAP Database</option>
             <option value="history">A SNP Index in your history</option>
@@ -344,8 +385,16 @@
           </options>
         </param>
 
+        <param name="mode" type="select" label="Alignment mode" help="Assumes cmetindex and atoiindex were run on the gmap datatbase.">
+            <option value="">standard</option>
+            <option value="cmet-stranded">cmet-stranded   for bisulfite-treated DNA reads (tolerance to C-to-T changes)</option>
+            <option value="cmet-nonstranded">cmet-nonstranded   for bisulfite-treated DNA reads (tolerance to C-to-T changes)</option>
+            <option value="atoi-stranded">atoi-stranded   for RNA-editing tolerance (A-to-G changes)</option>
+            <option value="atoi-nonstranded">atoi-nonstranded   for RNA-editing tolerance (A-to-G changes)</option>
+        </param>
+
         <conditional name="use_splicing">
-          <param name="src" type="select" label="Known Splicesite and Introns" 
+          <param name="src" type="select" label="&lt;HR&gt;Known Splicesite and Introns" 
                  help="Look for splicing involving known sites or known introns at short or long distances 
                   See README instructions for the distinction between known sites and known introns">
             <option value="none" selected="true">None</option>
@@ -367,7 +416,7 @@
         </conditional>
 
         <conditional name="use_snps">
-          <param name="src" type="select" label="Known SNPs" help="for SNP tolerant alignments">
+          <param name="src" type="select" label="&lt;HR&gt;Known SNPs" help="for SNP tolerant alignments">
             <option value="none" selected="true">None</option>
             <option value="gmapdb">From the GMAP Database</option>
             <option value="history">A SNP Index in your history</option>
@@ -426,12 +475,26 @@
          </param>
          <param name="trim_mismatch_score" type="integer" value="" optional="true" label="Score to use for mismatches when trimming at ends (default is -3)" 
                 help="to turn off trimming, specify 0"/>
+         <param name="use_tally" type="data" format="tally.iit" optional="true" metadata_name="dbkey" label="Select a tally IIT file to resolve concordant multiple results" 
+              help="generated by gsnap_tally and iit_store"/>
+
+         <!--
+           tallydir=STRING              Directory for tally IIT file to resolve concordant multiple results (default is
+                                              location of genome index files specified using -D and -d).  Note: can
+                                              just give full path name to use-tally instead.
+           use-tally=STRING             Use this tally IIT file to resolve concordant multiple results
+           runlengthdir=STRING          Directory for runlength IIT file to resolve concordant multiple results (default is
+                                              location of genome index files specified using -D and -d).  Note: can
+                                              just give full path name to use-runlength instead.
+           use-runlength=STRING         Use this runlength IIT file to resolve concordant multiple results
+         -->
          
          <!-- Options for GMAP alignment within GSNAP -->
-          <param name="gmap_mode" type="select" multiple="true" optional="true" label="Cases to use GMAP for complex alignments containing multiple splices or indels" help="">
-            <option value="pairsearch">pairsearch</option>
-            <option value="terminal">terminal</option>
-            <option value="improve">improve</option>
+          <param name="gmap_mode" type="select" multiple="true" optional="true" display="checkboxes" label="Cases to use GMAP for complex alignments containing multiple splices or indels" 
+                 help="Default: pairsearch,terminal,improve">
+            <option value="pairsearch" selected="true">pairsearch</option>
+            <option value="terminal" selected="true">terminal</option>
+            <option value="improve" selected="true">improve</option>
           </param>
           <param name="trigger_score_for_gmap" type="integer" value="" optional="true" label="GMAP pairsearch threshold (default 5)" 
                  help="Try GMAP pairsearch on nearby genomic regions if best score (the total of both ends if paired-end) exceeds this value (default 5)" />
@@ -456,16 +519,22 @@
       <when value="default"/>
       <when value="advanced">
          <!-- Splicing options for RNA-Seq -->
-         <!-- use-splices This should be either a select list from the gmapdb maps or a data type using splicesdir and use-splices --> 
+         <!-- use-splicing This should be either a select list from the gmapdb maps or a data type using splicesdir and use-splicing --> 
          <!-- Neither novel splicing (-N) nor known splicing (-s) turned on => assume reads are DNA-Seq (genomic) -->
          <param name="novelsplicing" type="boolean" checked="false" truevalue="--novelsplicing=1" falsevalue="" label="Look for novel splicing "/>
          <param name="localsplicedist"  type="integer" value="" optional="true" label="Definition of local novel splicing event (default 200000)"/>
          <param name="local_splice_penalty"  type="integer" value="" optional="true" label="Penalty for a local splice (default 0).  Counts against mismatches allowed"/>
-         <param name="distant_splice_penalty"  type="integer" value="" optional="true" label="Penalty for a distant splice (default 3).  Counts against mismatches allowed"/>
-         <param name="local_splice_endlength"  type="integer" value="" optional="true" label="Minimum length at end required for local spliced alignments (default 15, min is 14)"/>
-         <param name="distant_splice_endlength"  type="integer" value="" optional="true" label="Minimum length at end required for distant spliced alignments (default 16, min is 14)"/>
-         <param name="shortend_splice_endlength"  type="integer" value="" optional="true" label="Minimum length at end required for distant spliced alignments (default 16, min is 14)"/>
+         <param name="distant_splice_penalty"  type="integer" value="" optional="true" label="Penalty for a distant splice (default 3).  Counts against mismatches allowed"
+                help="A distant splice is one where the intron length exceeds the value of localsplicedist or is an
+                     inversion, scramble, or translocation between two different chromosomes. Counts against mismatches allowed"/>
+         <param name="distant_splice_endlength"  type="integer" value="" optional="true" label="Minimum length at end required for distant spliced alignments"
+                help="(default 16, min is the kmer length)"/>
+         <param name="shortend_splice_endlength"  type="integer" value="" optional="true" label="Minimum length at end required for short-end spliced alignments"
+                help="(default 2, but unless known splice sites are provided,  GSNAP may still need the end length to be the value of kmer size to find a given splice"/>
          <param name="distant_splice_identity"  type="float" value="" optional="true" label="Minimum identity at end required for distant spliced alignments (default 0.95)"/>
+         <param name="antistranded_penalty"  type="integer" value="" optional="true" label="Penalty for antistranded splicing when using stranded RNA-Seq protocols" 
+                help="A positive value, such as 1, expects antisense on the first read and sense on the second read.  
+                      Default is 0, which treats sense and antisense equally well"/>
       </when>
     </conditional>
 
@@ -489,10 +558,13 @@
     <conditional name="result">
       <param name="format" type="select" label="Select the output format" help="">
         <option value="sam">SAM</option>
+        <!--  goby should only be an option if the input is in goby format
         <option value="goby">Goby</option>
+        -->
         <option value="gsnap">GSNAP default output</option>
       </param>
-      <when value="gsnap"/>
+      <when value="gsnap">
+      </when>
       <when value="sam">
         <param name="no_sam_headers" type="boolean" truevalue="--no-sam-headers" falsevalue="" checked="false" label="Do not print headers beginning with '@'"/>
         <param name="read_group_id" type="text" value="" optional="true" label="Value to put into read-group id (RG-ID) field"/>
@@ -501,80 +573,184 @@
         <param name="read_group_platform" type="text" value="" optional="true" label="Value to put into read-group library platform (RG-PL) field"/>
         <param name="quality_shift"  type="integer" value="" optional="true" label="Shift FASTQ quality scores by this amount in SAM output (default -31)"/>
       </when>
+      <!--
       <when value="goby">
         <param name="goby_output" type="text" value="" label="Basename for Goby output files"/>
         <param name="creads_window_start"  type="integer" value="" optional="true" label="Compact reads window start (default: 0=start of file)"/>
         <param name="creads_window_end"  type="integer" value="" optional="true" label="Compact reads window end (default: 0=end of file)"/>
-        <param name="creads_complement" type="boolean" truevalue="--creads-complement" falsevalue="" checked="false" label="Complement read sequences (without reversing)"/>
+        <param name="creads_complement" type="boolean" truevalue="-\-creads-complement" falsevalue="" checked="false" label="Complement read sequences (without reversing)"/>
+      </when>
+      -->
+    </conditional>
+    <!-- TODO combine fails and split_output -->
+
+    <conditional name="results">
+      <param name="split_output" type="select" label="&lt;HR&gt;Split outputs" 
+       help="Separate outputs for: nomapping, halfmapping_uniq, halfmapping_mult, unpaired_uniq, unpaired_mult, paired_uniq, paired_mult, concordant_uniq, and concordant_mult results"> 
+        <option value="no">no</option>
+        <option value="yes">yes</option>
+      </param>
+      <when value="no">
+        <conditional name="fails">
+          <param name="choice" type="select" label="How to deal with fails" help="">
+            <option value="default">default - include them in results</option>
+            <option value="nofails">nofails - exclude fails from results</option>
+            <option value="failsonly">failsonly - only output failing results</option>
+          </param>
+          <when value="default"/>
+          <when value="nofails"/>
+          <when value="failsonly">
+            <param name="fails_as_input" type="boolean" truevalue="--fails-as-input" falsevalue="" checked="false" label="Print completely failed alignments as input FASTA or FASTQ format" 
+              help=""/> 
+          </when>
+        </conditional>
+      </when>
+      <when value="yes">
+        <conditional name="fails">
+          <param name="choice" type="select" label="How to deal with fails" help="">
+            <option value="default">default - include them in results</option>
+            <option value="nofails">nofails - exclude fails from results</option>
+            <option value="failsonly">failsonly - only output failing results</option>
+          </param>
+          <when value="default"/>
+          <when value="nofails"/>
+          <when value="failsonly"/>
+        </conditional>
+        <param name="fails_as_input" type="boolean" truevalue="--fails-as-input" falsevalue="" checked="false" label="Print completely failed alignments as input FASTA or FASTQ format" 
+              help=""/> 
       </when>
     </conditional>
-    <param name="split_output" type="boolean" truevalue="--split-output=gsnap_out" falsevalue="" checked="false" label="Separate outputs" 
-       help="Separate outputs for: nomapping, halfmapping_uniq, halfmapping_mult, unpaired_uniq, unpaired_mult, paired_uniq, paired_mult, concordant_uniq, and concordant_mult results"/> 
+
   </inputs>
   <outputs>
-    <data format="txt" name="gsnap_stderr" label="${tool.name} on ${on_string}: stderr"/>
-    <data format="txt" name="results" label="${tool.name} on ${on_string} ${result.format}" >
-      <filter>(split_output == False)</filter>
+    <data format="txt" name="gsnap_stderr" label="${tool.name} on ${on_string}: gsnap.log"/>
+
+    <data format="txt" name="gsnap_out" label="${tool.name} on ${on_string} ${result.format}" >
+      <filter>(results['split_output'] == 'no' and (results['fails']['choice'] != 'failsonly' or results['fails']['fails_as_input'] == False))</filter>
       <change_format>
         <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
       </change_format>
     </data>
+
+    <data format="fastq" name="gsnap_fq" label="${tool.name} on ${on_string} fails.fq" >
+      <filter>(results['split_output'] == 'no' and results['fails']['choice'] == 'failsonly' and results['fails']['fails_as_input'] == True)</filter>
+    </data>
+
     <!-- nomapping, halfmapping_uniq, halfmapping_mult, unpaired_uniq, unpaired_mult, paired_uniq, paired_mult, concordant_uniq, concordant_mult -->
-    <data format="txt" name="concordant_mult" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.concordant_mult">
-      <filter>(split_output == True)</filter>
+
+    <data format="txt" name="unpaired_mult" label="${tool.name} on ${on_string} unpaired_mult.${result.format}"  from_work_dir="gsnap_out.unpaired_mult">
+      <filter>(results['split_output'] == 'yes')</filter>
       <change_format>
         <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
       </change_format>
     </data>
-    <data format="txt" name="concordant_uniq" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.concordant_uniq">
-      <filter>(split_output == True)</filter>
+    <data format="txt" name="unpaired_uniq" label="${tool.name} on ${on_string} unpaired_uniq.${result.format}"  from_work_dir="gsnap_out.unpaired_uniq">
+      <filter>(results['split_output'] == 'yes')</filter>
       <change_format>
         <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
       </change_format>
     </data>
-    <data format="txt" name="paired_mult" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.paired_mult">
-      <filter>(split_output == True)</filter>
+    <data format="txt" name="unpaired_transloc" label="${tool.name} on ${on_string} unpaired_transloc.${result.format}"  from_work_dir="gsnap_out.unpaired_transloc">
+      <filter>(results['split_output'] == 'yes')</filter>
       <change_format>
         <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
       </change_format>
     </data>
-    <data format="txt" name="paired_uniq" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.paired_uniq">
-      <filter>(split_output == True)</filter>
+    <data format="txt" name="halfmapping_mult" label="${tool.name} on ${on_string} halfmapping_mult.${result.format}"  from_work_dir="gsnap_out.halfmapping_mult">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
       <change_format>
         <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
+      </change_format>
+    </data>
+    <data format="txt" name="halfmapping_uniq" label="${tool.name} on ${on_string} halfmapping_uniq.${result.format}"  from_work_dir="gsnap_out.halfmapping_uniq">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
+      <change_format>
+        <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
       </change_format>
     </data>
-    <data format="txt" name="unpaired_mult" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.unpaired_mult">
-      <filter>(split_output == True)</filter>
+    <data format="txt" name="halfmapping_transloc" label="${tool.name} on ${on_string} halfmapping_transloc.${result.format}"  from_work_dir="gsnap_out.halfmapping_transloc">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
+      <change_format>
+        <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
+      </change_format>
+    </data>
+    <data format="txt" name="paired_mult" label="${tool.name} on ${on_string} paired_mult.${result.format}"  from_work_dir="gsnap_out.paired_mult">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
       <change_format>
         <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
       </change_format>
     </data>
-    <data format="txt" name="unpaired_uniq" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.unpaired_uniq">
-      <filter>(split_output == True)</filter>
+    <data format="txt" name="paired_uniq" label="${tool.name} on ${on_string} paired_uniq.${result.format}"  from_work_dir="gsnap_out.paired_uniq">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
       <change_format>
         <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
+      </change_format>
+    </data>
+    <data format="txt" name="paired_transloc" label="${tool.name} on ${on_string} paired_transloc.${result.format}"  from_work_dir="gsnap_out.paired_transloc">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
+      <change_format>
+        <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
       </change_format>
     </data>
-    <data format="txt" name="halfmapping_mult" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.halfmapping_mult">
-      <filter>(split_output == True)</filter>
+
+    <data format="txt" name="concordant_mult" label="${tool.name} on ${on_string} concordant_mult.${result.format}"  from_work_dir="gsnap_out.concordant_mult">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
       <change_format>
         <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
+      </change_format>
+    </data>
+    <data format="txt" name="concordant_uniq" label="${tool.name} on ${on_string} concordant_uniq.${result.format}"  from_work_dir="gsnap_out.concordant_uniq">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
+      <change_format>
+        <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
+      </change_format>
+    </data>
+    <data format="txt" name="concordant_transloc" label="${tool.name} on ${on_string} concordant_transloc.${result.format}"  from_work_dir="gsnap_out.concordant_transloc">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
+      <change_format>
+        <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
       </change_format>
     </data>
-    <data format="txt" name="halfmapping_uniq" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.halfmapping_uniq">
-      <filter>(split_output == True)</filter>
+
+    <data format="txt" name="nomapping" label="${tool.name} on ${on_string} nomapping.${result.format}"  from_work_dir="gsnap_out.nomapping">
+      <filter>(results['split_output'] == 'yes' and results['fails_as_input'] == False)</filter>
       <change_format>
         <when input="result['format']" value="sam" format="sam"/>
+        <when input="result['format']" value="gsnap" format="gsnap"/>
       </change_format>
     </data>
-    <data format="txt" name="nomapping" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.nomapping">
-      <filter>(split_output == True)</filter>
-      <change_format>
-        <when input="result['format']" value="sam" format="sam"/>
-      </change_format>
+
+    <data format="fastq" name="nomapping_fq" label="${tool.name} on ${on_string} nomapping.fq"  from_work_dir="gsnap_out.nomapping.fq">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == False)</filter>
+    </data>
+
+    <data format="fastq" name="nomapping_1_fq" label="${tool.name} on ${on_string} nomapping.1.fq"  from_work_dir="gsnap_out.nomapping.1.fq">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
     </data>
 
+    <data format="fastq" name="nomapping_2_fq" label="${tool.name} on ${on_string} nomapping.2.fq"  from_work_dir="gsnap_out.nomapping.2.fq">
+      <filter>(results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True)</filter>
+    </data>
+
+    <!-- Will problay need wrapper code to generate composite datatype for goby alignment
+    <data format="gobyalignment" name="goby_alignment" label="${tool.name} on ${on_string} uniq.${result.format}"  from_work_dir="gsnap_out.nomapping">
+      <filter>result['format'] == 'goby'</filter>
+    </data>
+    -->
+
   </outputs>
   <tests>
   </tests> 
--- a/tool-data/gmap_indices.loc.sample	Fri Oct 21 12:11:45 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#This is a sample file distributed with Galaxy that enables tools
-#to use a directory of GMAPDB indexed sequences data files.  You will need
-#to create these data files using gmap_build and then create a gmap_indices.loc file 
-#similar to this one (store it in this directory) that points to 
-#the directories in which those files are stored. The gmap_indices.loc 
-#file has this format (white space characters are TAB characters):
-#
-#<unique_build_id>   <dbkey>   <display_name>   <kmers> <map,map>       <snp,snp>       <file_base_path>
-#hg18   hg18    hg18 (cmet atoi)        12,13,14,15     splicesites,introns     snps    /depot/data2/galaxy/gmap/hg18
-#hg19	hg19	hg19 (cmet atoi)	12,13,14,15	splicesites,introns,snps	snps,dbsnp	/depot/data2/galaxy/gmap/hg19