diff mageck_count.xml @ 3:d8f26ae1e909 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mageck commit 95daf3f97e89989bae687e64cae8b129b3e2b7af
author iuc
date Thu, 19 Apr 2018 05:34:34 -0400
parents 9527a3d6ebd2
children bb6b6af01920
line wrap: on
line diff
--- a/mageck_count.xml	Wed Apr 04 11:03:29 2018 -0400
+++ b/mageck_count.xml	Thu Apr 19 05:34:34 2018 -0400
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<tool id="mageck_count" name="MAGeCK count" version="@VERSION@.2" >
+<tool id="mageck_count" name="MAGeCK count" version="@VERSION@.3" >
     <description>- collect sgRNA read counts from read mapping files</description>
     <macros>
         <import>mageck_macros.xml</import>
@@ -13,36 +13,40 @@
 #if str($reads.format_select) == "files":
     #import re
     #set $names = []
-    #for $i, $sample in enumerate($reads.sample):
+    #set $files = []
+
+    #for $sample in $reads.sample:
+
+        #set name = re.sub('[^\w\-\s]', '_', str($sample.element_identifier))
 
         #if $sample.is_of_type('fastq.gz', 'fastqsanger.gz'):
-            ln -s '${sample}' input_${i}.gz &&
-            #set $infile = 'input' + str($i) + '.gz'
+            #set infile = $name + ".fq.gz"
         #elif $sample.is_of_type('fastq'):
-            ln -s '${sample}' input_${i}.fastq &&
-            #set $infile = 'input' + str($i) + 'fastq'
+            #set infile = $name + ".fq"
         #elif $sample.is_of_type('bam'):
-            ln -s '${sample}' input_${i}.bam &&
-            #set $infile = 'input' + str($i) + 'bam'
+            #set infile = $name + ".bam"
         #end if
-        #silent $names.append(re.sub('[^\w\-\s]', '_', str($sample.element_identifier)))
-    #end for
+
+        ln -s '${sample}' $infile &&
 
+        #silent $files.append($infile)
+        #silent $names.append($name)
+
+    #end for
 #end if
 
-
 mageck count
 
 #if str($reads.format_select) == "files":
 
     -l '$reads.sgrna_library_file'
 
-    --fastq input_*
+    --fastq ${ ' '.join( ["'%s'" % $x for $x in $files] )  }
 
     #if $reads.sample_label:
         --sample-label '$reads.sample_label'
     #else:
-        --sample-label ${ ','.join( $names ) }
+        --sample-label ${ ','.join( ["'%s'" % $x for $x in $names] )  }
     #end if
 
 #elif str($reads.format_select) == "table":
@@ -206,13 +210,21 @@
             <param name="rfilesOpt" value="True" />
             <param name="logOpt" value="True" />
             <output name="counts" file="out.count.fastq.txt"/>
-            <output name="countsummary" file="out.countsummary.txt" compare="sim_size"/>
+            <output name="countsummary" file="out.countsummary.txt" compare="contains"/>
             <output name="normcounts" file="output.count_normalized.txt"/>
-            <output name="log" file="out.count.log.txt" compare="sim_size"/>
+            <output name="log">
+                <assert_contents>
+                    <has_text_matching expression="Welcome to MAGeCK"/>
+                </assert_contents>
+            </output>
             <output name="unmapped" file="out.count.unmapped.txt" />
             <output name="pdfreport" file="out.countsummary.pdf" compare="sim_size" />
             <output name="rscript" file="out.count.R" />
-            <output name="rnwfile" file="output_countsummary.Rnw" />
+            <output name="rnwfile">
+                <assert_contents>
+                    <has_text_matching expression="This is a template file for Sweave"/>
+                </assert_contents>
+            </output>
         </test>
     </tests>