comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:6c398f64ad6a
1 <tool id="chira_map" name="ChiRA map" version="@WRAPPER_VERSION@0">
2 <description>map reads to trascriptome</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements" />
7 <command detect_errors="aggressive"><![CDATA[
8 chira_map.py -b
9 -a '$alignment.aligner'
10 -i '$query'
11 -b
12 #if str($alignment.aligner) == "bwa":
13 -s '$alignment.stranded'
14 -l1 '$alignment.seed_length1'
15 -l2 '$alignment.seed_length2'
16 -s1 '$alignment.align_score1'
17 -s2 '$alignment.align_score2'
18 #else if str($alignment.aligner) == "clan":
19 -s2 '$alignment.align_score'
20 #end if
21 #if str($reference.ref_type) == "single":
22 -f1 '$reference.ref_fasta'
23 #else if str($reference.ref_type) == "split":
24 -f1 '$reference.ref_fasta1'
25 -f2 '$reference.ref_fasta2'
26 #end if
27 -co '$chimeric_overlap'
28 -p "\${GALAXY_SLOTS:-4}"
29 -o ./
30
31 ]]></command>
32
33 <inputs>
34 <param format="fasta" name="query" type="data" label="Input FASTA file"
35 help="Input fasta file"/>
36 <conditional name="reference">
37 <param name="ref_type" type="select" label="Single or split reference?"
38 help="Use single if you have all the transcripts in single fasta file. Use split, if you split the
39 reference into two such that each chimeric read arm corresponds to one of them">
40 <option value="split">Split reference</option>
41 <option value="single">Single reference</option>
42 </param>
43 <when value="split">
44 <param format="fasta" name="ref_fasta1" type="data" label="Reference FASTA file"
45 help="Reference fasta file"/>
46 <param format="fasta" name="ref_fasta2" type="data" label="Second reference FASTA file"
47 help="Second reference fasta file."/>
48 </when>
49 <when value="single">
50 <param format="fasta" name="ref_fasta" type="data" label="Reference FASTA file"
51 help="Reference fasta file"/>
52 </when>
53 </conditional>
54 <conditional name="alignment" label="Aligner to use">
55 <param name="aligner" type="select">
56 <option value="bwa">BWA-MEM</option>
57 <option value="clan">CLAN</option>
58 </param>
59 <when value="bwa">
60 <param name="stranded" type="select" label="Map reads to">
61 <option value="fw">Transcript strand only</option>
62 <option value="rc">Reverse compliment of transcript strand only</option>
63 <option value="both">Try both strands</option>
64 </param>
65 <param name="seed_length1" type="integer" value="12" label="Seed length 1" min="1"
66 help="Seed length for 1st mapping iteration. bwa-mem parameter -k"/>
67 <param name="seed_length2" type="integer" value="6" label="Seed length 2" min="1"
68 help="Seed length for 2nd mapping iteration. bwa-mem parameter -k"/>
69 <param name="align_score1" type="integer" value="18" label="Minimum alignmnet score 1" min="1"
70 help="Minimum alignment score in 1st mapping iteration. It
71 must be smaller than --align_score1 parameter. bwa-mem parameter '-T'"/>
72 <param name="align_score2" type="integer" value="10" label="Minimum alignmnet score 2" min="1"
73 help="Minimum alignment score in 2nd mapping iteration. bwa-mem parameter '-T'"/>
74 </when>
75 <when value="clan">
76 <param name="align_score" type="integer" value="10" label="Minimum length for each fragment" min="1"
77 help="Minimu length of the read segment that needs to be mapped. clan_search parameter '-l'"/>
78 </when>
79 </conditional>
80 <param name="chimeric_overlap" type="integer" value="2" label=" Maximum number of bases allowed
81 between the chimericsegments of a read"/>
82 </inputs>
83
84 <outputs>
85 <data format="bed" name="mapped_bed" from_work_dir="mapped.bed" label="ChiRA aligned BED on ${on_string}"/>
86 <data format="fasta" name="unmapped_fasta" from_work_dir="short.unmapped.fa"
87 label="ChiRA unmapped FASTA on ${on_string}">
88 <filter>alignment['aligner'] == "bwa"</filter>
89 </data>
90 </outputs>
91
92 <tests>
93 <!-- Test: Map with BWA-mem -->
94 <test expect_num_outputs="2">
95 <param name="aligner" value="bwa"/>
96 <param name="query" value="reads.fasta"/>
97 <param name="ref_type" value="split"/>
98 <param name="ref_fasta1" value="ref1.fasta"/>
99 <param name="ref_fasta2" value="ref2.fasta"/>
100 <param name="unmapped" value="True"/>
101 <output name="mapped_bed" >
102 <assert_contents>
103 <has_text_matching expression="mmu-miR-6898-5p\t11\t21\t2|2,mmu-miR-6898-5p,11,21,+,10M39S\t0\t+" />
104 </assert_contents>
105 </output>
106 <output name="unmapped_fasta" >
107 <assert_contents>
108 <has_text_matching expression="AAAAGACTCTGTAGACATGGCTGGTCTTGAACTCACAGAGATTTGTCTGCCTTTC" />
109 </assert_contents>
110 </output>
111 </test>
112 <!-- Test: Map with CLAN -->
113 <test expect_num_outputs="1">
114 <param name="aligner" value="clan"/>
115 <param name="query" value="reads.fasta"/>
116 <param name="ref_type" value="split"/>
117 <param name="ref_fasta1" value="ref1.fasta"/>
118 <param name="ref_fasta2" value="ref2.fasta"/>
119 <param name="unmapped" value="True"/>
120 <output name="mapped_bed" >
121 <assert_contents>
122 <has_text_matching expression="mmu-miR-20a-5p\t0\t23\t3|2,mmu-miR-20a-5p,0,23,+,5S23M27S\t0\t+" />
123 </assert_contents>
124 </output>
125 </test>
126 </tests>
127 <help>
128
129 .. class:: infomark
130
131 **What it does**
132
133 This tool handles the mapping of the reads to reference transcriptome. User can choose between the bwa-mem and CLAN alignment tools.
134
135 **Inputs**
136
137 * A fasta file containing reads
138 * A reference fasta file containing transcript sequences
139 * An optional second reference fasta file, incase if you split your reference into two
140
141 **Output**
142
143 * BED file containing the alignments
144 * Optional unmapped FASTA file
145
146 </help>
147 <expand macro="citations" />
148 </tool>