diff chira_map.xml @ 0:6c398f64ad6a draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/chira commit e4f841daf49048d6c656d50cffb344b53eebeec2"
author iuc
date Sun, 19 Jan 2020 16:30:32 -0500
parents
children 39bb70c2764e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/chira_map.xml	Sun Jan 19 16:30:32 2020 -0500
@@ -0,0 +1,148 @@
+<tool id="chira_map" name="ChiRA map" version="@WRAPPER_VERSION@0">
+    <description>map reads to trascriptome</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="aggressive"><![CDATA[
+        chira_map.py -b
+        -a '$alignment.aligner'
+        -i '$query'
+        -b
+        #if str($alignment.aligner) == "bwa":
+            -s '$alignment.stranded'
+            -l1 '$alignment.seed_length1'
+            -l2 '$alignment.seed_length2'
+            -s1 '$alignment.align_score1'
+            -s2 '$alignment.align_score2'
+        #else if str($alignment.aligner) == "clan":
+            -s2 '$alignment.align_score'
+        #end if
+        #if str($reference.ref_type) == "single":
+            -f1 '$reference.ref_fasta'
+        #else if str($reference.ref_type) == "split":
+            -f1 '$reference.ref_fasta1'
+            -f2 '$reference.ref_fasta2'
+        #end if
+        -co '$chimeric_overlap'
+        -p "\${GALAXY_SLOTS:-4}"
+        -o ./
+
+    ]]></command>
+
+    <inputs>
+        <param format="fasta" name="query" type="data" label="Input FASTA file"
+               help="Input fasta file"/>
+        <conditional name="reference">
+            <param name="ref_type" type="select" label="Single or split reference?"
+                   help="Use single if you have all the transcripts in single fasta file. Use split, if you split the
+                   reference into two such that each chimeric read arm corresponds to one of them">
+                <option value="split">Split reference</option>
+                <option value="single">Single 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">
+                <param format="fasta" name="ref_fasta" type="data" label="Reference FASTA file"
+                       help="Reference fasta file"/>
+            </when>
+        </conditional>
+        <conditional name="alignment" label="Aligner to use">
+            <param name="aligner" type="select">
+                <option value="bwa">BWA-MEM</option>
+                <option value="clan">CLAN</option>
+            </param>
+            <when value="bwa">
+                <param name="stranded" type="select" label="Map reads to">
+                    <option value="fw">Transcript strand only</option>
+                    <option value="rc">Reverse compliment of transcript strand only</option>
+                    <option value="both">Try both strands</option>
+                </param>
+                <param name="seed_length1" type="integer" value="12" label="Seed length 1" min="1"
+                       help="Seed length for 1st mapping iteration. bwa-mem parameter -k"/>
+                <param name="seed_length2" type="integer" value="6" label="Seed length 2" min="1"
+                      help="Seed length for 2nd mapping iteration. bwa-mem parameter -k"/>
+                <param name="align_score1" type="integer" value="18" label="Minimum alignmnet score 1" min="1"
+                      help="Minimum alignment score in 1st mapping iteration. It
+                                must be smaller than --align_score1 parameter. bwa-mem parameter '-T'"/>
+                <param name="align_score2" type="integer" value="10" label="Minimum alignmnet score 2" min="1"
+                      help="Minimum alignment score in 2nd mapping iteration. bwa-mem parameter '-T'"/>
+            </when>
+            <when value="clan">
+                <param name="align_score" type="integer" value="10" label="Minimum length for each fragment" min="1"
+                      help="Minimu length of the read segment that needs to be mapped. clan_search parameter '-l'"/>
+            </when>
+        </conditional>
+        <param name="chimeric_overlap" type="integer" value="2" label=" Maximum number of bases allowed
+                    between the chimericsegments of a read"/>
+    </inputs>
+
+    <outputs>
+        <data format="bed" name="mapped_bed" from_work_dir="mapped.bed" label="ChiRA aligned BED on ${on_string}"/>
+        <data format="fasta" name="unmapped_fasta" from_work_dir="short.unmapped.fa"
+              label="ChiRA unmapped FASTA on ${on_string}">
+            <filter>alignment['aligner'] == "bwa"</filter>
+        </data>
+    </outputs>
+
+    <tests>
+        <!-- Test: Map with BWA-mem -->
+        <test expect_num_outputs="2">
+            <param name="aligner" value="bwa"/>
+            <param name="query" value="reads.fasta"/>
+            <param name="ref_type" value="split"/>
+            <param name="ref_fasta1" value="ref1.fasta"/>
+            <param name="ref_fasta2" value="ref2.fasta"/>
+            <param name="unmapped" value="True"/>
+            <output name="mapped_bed" >
+                <assert_contents>
+                    <has_text_matching expression="mmu-miR-6898-5p\t11\t21\t2|2,mmu-miR-6898-5p,11,21,+,10M39S\t0\t+" />
+                </assert_contents>
+            </output>
+            <output name="unmapped_fasta" >
+                <assert_contents>
+                    <has_text_matching expression="AAAAGACTCTGTAGACATGGCTGGTCTTGAACTCACAGAGATTTGTCTGCCTTTC" />
+                </assert_contents>
+            </output>
+        </test>
+        <!-- Test: Map with CLAN -->
+        <test expect_num_outputs="1">
+            <param name="aligner" value="clan"/>
+            <param name="query" value="reads.fasta"/>
+            <param name="ref_type" value="split"/>
+            <param name="ref_fasta1" value="ref1.fasta"/>
+            <param name="ref_fasta2" value="ref2.fasta"/>            
+            <param name="unmapped" value="True"/>
+            <output name="mapped_bed" >
+                <assert_contents>
+                    <has_text_matching expression="mmu-miR-20a-5p\t0\t23\t3|2,mmu-miR-20a-5p,0,23,+,5S23M27S\t0\t+" />
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help>
+
+.. class:: infomark
+
+**What it does**
+
+This tool handles the mapping of the reads to reference transcriptome. User can choose between the bwa-mem and CLAN alignment tools.
+
+**Inputs**
+
+* A fasta file containing reads
+* A reference fasta file containing transcript sequences
+* An optional second reference fasta file, incase if  you split your reference into two
+
+**Output**
+
+* BED file containing the alignments
+* Optional unmapped FASTA file
+
+    </help>
+    <expand macro="citations" />
+</tool>