diff chira_merge.xml @ 7:35f433d0bd7f draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/chira commit ac10509d952583cefd7bf63910cd6976a0124440"
author iuc
date Thu, 07 May 2020 03:35:27 -0400
parents 0170de5072d4
children c836a05bd6a3
line wrap: on
line diff
--- a/chira_merge.xml	Thu Apr 16 13:23:11 2020 -0400
+++ b/chira_merge.xml	Thu May 07 03:35:27 2020 -0400
@@ -20,6 +20,11 @@
         #else:
             -ao '$merge.alignment_overlap'
         #end if
+        #if str($reference.ref_type) == "split":
+            -f1 '$reference.ref_fasta1'
+            -f2 '$reference.ref_fasta2'
+        #end if
+        $chimeric_only
         -o ./
     ]]></command>
 
@@ -59,6 +64,22 @@
                     help="scale stddev for a single read"/>
             </when>
         </conditional>
+        <conditional name="reference">
+            <param name="ref_type" type="select" label="Did you use single or split reference for alignment?">
+                <option value="single">Single reference</option>
+                <option value="split">Split reference</option>
+            </param>
+            <when value="split">
+                <param format="fasta" name="ref_fasta1" type="data" label="Reference FASTA file"
+                       help="Reference fasta file"/>
+                <param format="fasta" name="ref_fasta2" type="data" label="Second reference FASTA file"
+                       help="Second reference fasta file."/>
+            </when>
+            <when value="single">
+                <!-- no need to provide a fasta file -->
+            </when>
+        </conditional>
+        <param name="chimeric_only" type="boolean" truevalue="-c" falsevalue="" checked="false" />
     </inputs>
     <outputs>
         <data format="bed" name="segments_bed" from_work_dir="segments.bed" label="ChiRA aligned read segments on ${on_string}"/>
@@ -70,15 +91,18 @@
         <test expect_num_outputs="2">
             <param name="alignments" value="alignments.bed"/>
             <param name="choice" value="no" />
+            <param name="ref_type" value="split"/>
+            <param name="ref_fasta1" value="ref1.fasta"/>
+            <param name="ref_fasta2" value="ref2.fasta"/>
             <output name="segments_bed" >
                 <assert_contents>
-                    <has_text_matching expression="ENSMUST00000160533\t69\t82\t34\|1\|2,ENSMUST00000160533,69,82,\+,42S13M\t1\t\+" />
+                    <has_text_matching expression="ENSMUST00000146006\t6703\t6718\t10\|2\|3,ENSMUST00000146006,6703,6718,\+,24S15M16S\t1\t\+" />
                 </assert_contents>
             </output>
             <output name="merged_bed" >
                 <assert_contents>
                     <has_text_matching expression="ENSMUST00000182010\t408\t477\t\+" />
-                    <has_text_matching expression="mmu-miR-106a-3p\t4\t15\t\+" />
+                    <has_text_matching expression="mmu-miR-9-5p\t0\t23\t\+" />
                 </assert_contents>
             </output>
         </test>
@@ -87,15 +111,19 @@
             <param name="alignments" value="alignments.bed" />
             <param name="choice" value="yes" />
             <param name="gtf" value="annotation.gtf" />
+            <param name="ref_type" value="split"/>
+            <param name="ref_fasta1" value="ref1.fasta"/>
+            <param name="ref_fasta2" value="ref2.fasta"/>
             <output name="segments_bed" >
                 <assert_contents>
-                    <has_text_matching expression="5\t137142331\t137142344\t34\|1\|2,ENSMUST00000160533,69,82,\+,42S13M\t1\t-" />
+                    <has_text_matching expression="2\t31033086\t31033109\t38\|2\|2,ENSMUST00000113555,1676,1699,\+,32S23M\t1\t-" />
+                    <has_text_matching expression="7\t83738820\t83738843\t38\|2\|1,mmu-miR-9-5p,0,23,\+,5S23M27S\t1\t\+" />
                 </assert_contents>
             </output>
             <output name="merged_bed" >
                 <assert_contents>
-                    <has_text_matching expression="17\t39846957\t39847016\t\+" />
-                    <has_text_matching expression="5\t137142331\t137142344\t-" />
+                    <has_text_matching expression="2\t31033086\t31033109\t-" />
+                    <has_text_matching expression="7\t83738820\t83738843\t\+" />
                 </assert_contents>
             </output>
         </test>
@@ -106,14 +134,39 @@
             <param name="gtf" value="annotation.gtf" />
             <param name="mode" value="blockbuster" />
             <param name="min_cluster_height" value="5" />
+            <param name="ref_type" value="split"/>
+            <param name="ref_fasta1" value="ref1.fasta"/>
+            <param name="ref_fasta2" value="ref2.fasta"/>
             <output name="segments_bed" >
                 <assert_contents>
-                    <has_text_matching expression="5\t137142331\t137142344\t34\|1\|2,ENSMUST00000160533,69,82,\+,42S13M\t1\t-" />
+                    <has_text_matching expression="2\t31033086\t31033109\t38\|2\|2,ENSMUST00000113555,1676,1699,\+,32S23M\t1\t-" />
+                    <has_text_matching expression="7\t83738820\t83738843\t38\|2\|1,mmu-miR-9-5p,0,23,\+,5S23M27S\t1\t\+" />
                 </assert_contents>
             </output>
             <output name="merged_bed" >
                 <assert_contents>
-                    <has_text_matching expression="17\t39846957\t39847016\t\+" />
+                    <has_text_matching expression="7\t83738820\t83738843\t\+" />
+                </assert_contents>
+            </output>
+        </test>
+        <!-- Test: Chimeric only without annotation -->
+        <test expect_num_outputs="2">
+            <param name="alignments" value="alignments.bed"/>
+            <param name="choice" value="no" />
+            <param name="ref_type" value="split"/>
+            <param name="ref_fasta1" value="ref1.fasta"/>
+            <param name="ref_fasta2" value="ref2.fasta"/>
+            <param name="chimeric_only" value="true"/>
+            <output name="segments_bed" >
+                <assert_contents>
+                    <has_text_matching expression="mmu-miR-9-5p\t0\t23\t38\|2\|1,mmu-miR-9-5p,0,23,\+,5S23M27S\t1\t\+" />
+                    <has_text_matching expression="ENSMUST00000113555\t1676\t1699\t38\|2\|2,ENSMUST00000113555,1676,1699,\+,32S23M\t1\t\+" />
+                </assert_contents>
+            </output>
+            <output name="merged_bed" >
+                <assert_contents>
+                    <has_text_matching expression="ENSMUST00000113555\t1676\t1699\t\+" />
+                    <has_text_matching expression="mmu-miR-9-5p\t0\t23\t\+" />
                 </assert_contents>
             </output>
         </test>