changeset 44:e7cac7790476

planemo upload commit 0399c6bd696435a7a99d8d8b4c237e5a78ee5856-dirty
author jpayne
date Wed, 25 Apr 2018 16:35:27 -0400
parents 62531f7399dc
children f58616a4b2f3
files 1_map_reads.xml test-data/samples/sample1/sample1_1.fastq.gz test-data/samples/sample1/sample1_2.fastq.gz
diffstat 3 files changed, 30 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/1_map_reads.xml	Wed Apr 25 15:54:10 2018 -0400
+++ b/1_map_reads.xml	Wed Apr 25 16:35:27 2018 -0400
@@ -9,20 +9,32 @@
     <command detect_errors="exit_code"><![CDATA[
         export LD_LIBRARY_PATH="\$CONDA_DEFAULT_ENV/lib" &&
         #if $reads.reads_select == 'collection'
-            export files="$reads.coll.forward $reads.coll.reverse"          &&
-            export params="-1 $reads.coll.forward -2 $reads.coll.reverse"   &&
-        #else
-            export files="$forward $reverse"                    &&
-            export params="-1 $forward -2 $reverse"             &&
+            #set forward=$reads.coll.forward
+            #set reverse=$reads.coll.reverse
         #end if
         python ${__tool_directory__}/snp-cache.py snp_mapped_reads 
             "\$(md5sum  $reference
-                        \$files 
+                        $forward
+                        $reverse 
                         | cut -c -32 | md5sum | cut -c -32)"
             -c "
                 cp $reference ./reference.fasta
+                #if $forward.is_of_type("fastq.gz","fastqsanger.gz")
+                    && cp $forward ./forward.gz
+                    #set $forward="./forward.gz"
+                #else if $forward.is_of_type("fastq.bz2", "fastqsanger.bz2")
+                    && cp $forward ./forward.bz2
+                    #set $forward="./forward.bz2"
+                #end if
+                #if $reverse.is_of_type("fastq.gz","fastqsanger.gz")
+                    && cp $reverse ./reverse.gz
+                    #set $reverse="./reverse.gz"
+                #else if $reverse.is_of_type("fastq.bz2", "fastqsanger.bz2")
+                    && cp $reverse ./reverse.bz2
+                    #set $reverse="./reverse.bz2"
+                #end if
                 && bowtie2-build ./reference.fasta --quiet --threads \${GALAXY_SLOTS:-4} ./reference
-                && bowtie2 -q -x ./reference \$params  -p \${GALAXY_SLOTS:-4} --reorder -X 1000
+                && bowtie2 -q -x ./reference -1 $forward -2 $reverse  -p \${GALAXY_SLOTS:-4} --reorder -X 1000
                 "
         #if $reads.reads_select == 'collection'
             -o ${align_from_collection}
@@ -80,11 +92,11 @@
                 <option value="history">Two FASTQ datasets from your history</option>
             </param>
             <when value="collection">
-                <param label="Paired reads" name="coll" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" collection_type="paired" />
+                <param label="Paired reads" name="coll" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" collection_type="paired" />
             </when>
             <when value="history">
-                <param label="Forward reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" />
-                <param label="Reverse reads" type="data" name="reverse" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" />
+                <param label="Forward reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
+                <param label="Reverse reads" type="data" name="reverse" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
             </when>
         </conditional>
     </inputs>
@@ -121,6 +133,14 @@
             </param>
             <output name="align_from_collection" value="samples/sample1/reads.sam" lines_diff="3" />
         </test>
+        <test>
+            <param name="source_select" value="history" />
+            <param name="reference" value="reference/lambda_virus.fasta" ftype="fasta" />
+            <param name="reads_select" value="history" />
+            <param name="forward" value="samples/sample1/sample1_1.fastq.gz" ftype="fastqsanger.gz" />
+            <param name="reverse" value="samples/sample1/sample1_2.fastq.gz" ftype="fastqsanger.gz" />
+            <output name="align_from_history" value="samples/sample1/reads.sam" lines_diff="3" />
+        </test>
     </tests>
     <help><![CDATA[
        <a href="http://snp-pipeline.readthedocs.io/en/latest/index.html">http://snp-pipeline.readthedocs.io/en/latest/index.html</a>
Binary file test-data/samples/sample1/sample1_1.fastq.gz has changed
Binary file test-data/samples/sample1/sample1_2.fastq.gz has changed