comparison sr_bowtie_dataset_annotation.xml @ 0:e7e7785e41d0 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sr_bowtie_dataset_annotation commit 80b49bd722e8ea8d7dba6dcfe538537cd710d2a2
author artbio
date Mon, 11 Sep 2017 18:27:40 -0400
parents
children faf1b3b933f5
comparison
equal deleted inserted replaced
-1:000000000000 0:e7e7785e41d0
1 <tool id="sr_bowtie_dataset_annotation" name="Annotate smRNA dataset" version="2.0.0">
2 <description>by iterative alignments with sRbowtie</description>
3 <requirements>
4 <requirement type="package" version="1.1.2">bowtie</requirement>
5 </requirements>
6 <command detect_errors="exit_code"><![CDATA[
7 #if $refGenomeSource1.genomeSource == "history":
8 bowtie-build -f $refGenomeSource1.ownFile genome 1>/dev/null &&
9 ln -s -f '$refGenomeSource1.ownFile' genome.fa &&
10 #set index_path = 'genome'
11 #else:
12 #set index_path = $refGenomeSource1.index.fields.path
13 #end if
14 #if $input.extension == "fasta":
15 #set format = "-f"
16 #elif $input.extension == "fastq":
17 #set format = "-q"
18 #end if
19 #if $format == '-f':
20 input_nbr_read=\$(( \$(wc -l < $input)/2)) &&
21 #elif $format == '-q':
22 input_nbr_read=\$(( \$(wc -l < $input)/4)) &&
23 #end if
24 #set method_prefix = "-v %s -k 1 --best" % str($mismatches)
25 bowtie -p \${GALAXY_SLOTS:-4}
26 $method_prefix
27 --al matched.fa
28 --un unmatched.fa
29 --suppress 6,7,8
30 $index_path $format '$input' > tabular_bowtie_output.tab &&
31 genome_aligned=\$(wc -l < matched.fa) &&
32 genome_aligned=\$(( \$genome_aligned/2)) &&
33 echo -e "$refGenomeSource1.ownFile.name Matched\t\${genome_aligned}\n" > $output &&
34 #set counter = 0
35 #for $i in $AdditionalQueries:
36 rm genome.fa &&
37 #set $counter += 1
38 #if $counter != 1:
39 #set input = "class_unmatched.fa"
40 #else:
41 #set input = "matched.fa"
42 #end if
43 touch temp_class_matched.fa temp_class_unmatched.fa &&
44 bowtie-build -f $i.ownFile genome 1>/dev/null &&
45 ln -s -f '$i.ownFile' genome.fa &&
46 #set index_path = 'genome'
47 bowtie -p \${GALAXY_SLOTS:-4}
48 $method_prefix
49 --al temp_class_matched.fa
50 --un temp_class_unmatched.fa
51 --suppress 6,7,8
52 $index_path $format '$input' > tabular_bowtie_output.tab &&
53 class_aligned=\$(( \$(wc -l < temp_class_matched.fa)/2)) &&
54 class_unaligned=\$(( \$(wc -l < temp_class_unmatched.fa)/2)) &&
55 mv temp_class_unmatched.fa class_unmatched.fa &&
56 echo -e "$i.ownFile.name Matched\t\${class_aligned}\n" >> $output &&
57 #end for
58 remaining=\$(( \$(wc -l < class_unmatched.fa)/2)) &&
59 echo -e "Unmatched to previous indexes\t\${remaining}\n" >> $output
60 ]]></command>
61 <inputs>
62 <param name="input" type="data" format="fasta,fastq" label="Input file: reads clipped from their adapter" help="Only with clipped, raw fasta or fastq files"/>
63 <param name="mismatches" type="select" label="Number of mismatches allowed" help="specify the number of mismatches allowed during alignments">
64 <option value="0">0</option>
65 <option value="1" selected="true">1</option>
66 <option value="2">2</option>
67 <option value="3">3</option>
68 </param>
69 <!-- First bowtie index selection -->
70 <conditional name="refGenomeSource1">
71 <param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Bowtie Built-ins were indexed using default options">
72 <option value="indexed">Use a built-in index</option>
73 <option value="history">Use one from the history</option>
74 </param>
75 <when value="indexed">
76 <param name="index" type="select" label="Select a DNA reference index" help="if your genome of interest is not listed - contact instance administrator">
77 <options from_data_table="bowtie_indexes"/>
78 </param>
79 </when>
80 <when value="history">
81 <param name="ownFile" type="data" format="fasta" label="Select a fasta file, to serve as index reference" />
82 </when>
83 </conditional>
84 <!-- End of first bowtie index selection -->
85 <!-- other bowtie index selections from fasta in history (mandatory) -->
86 <repeat name="AdditionalQueries" title="Additional Alignment Step">
87 <param name="ownFile" type="data" format="fasta" label="Select a fasta file, to serve as index reference" />
88 </repeat>
89 <!-- End of other bowtie index selections -->
90 </inputs>
91 <outputs>
92 <data format="tabular" name="output" label="Cascade Annotation Analysis">
93 <actions>
94 <action name="column_names" type="metadata" default="Reference Index,Number of reads" />
95 </actions>
96 </data>
97 </outputs>
98 <tests>
99 <test>
100 <param name="input" value ="sample1.fa" ftype="fasta" />
101 <param name="genomeSource" value="history" />
102 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" />
103 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" />
104 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" />
105 <output name="output" ftype="tabular" file="sample1_output.tab" />
106 </test>
107 <test>
108 <param name="input" value ="sample.fastq" ftype="fastq" />
109 <param name="genomeSource" value="history" />
110 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" />
111 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" />
112 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" />
113 <output name="output" ftype="tabular" file="sample_output.tab" />
114 </test>
115 </tests>
116 <help>
117
118 **Introduction**
119
120 Bowtie_ is a short read aligner designed to be ultrafast and memory-efficient.
121 A generic "Map with Bowtie for Illumina" Galaxy tool is available in the main Galaxy distribution.
122
123 Here The sRbowtie wrapper specifically works with short reads FASTA or FASTQ inputs
124 (-v bowtie mode, with -k 1) which has to be clipped from adapter before alignment.
125
126 .. _Bowtie: http://bowtie-bio.sourceforge.net/index.shtml
127
128
129 ------
130
131 **What it does**
132
133 .. class:: infomark
134
135 This script uses the sRbowtie wrapper to iteratively match reads on a reference indexes.
136 Read that aligned to the first reference are realigned to the second reference.
137 From this point, unaligned reads are taken as input for alignment to the third reference, etc.
138
139
140 Reads are Matched on DNA references (both strands) as fast as possible, without taking care of mapping issues
141
142 *-v [0,1,2,3] -k 1 --best -p 12 --suppress 6,7,8*
143
144 unaligned reads at step N are used as input for sRbowtie at step N+1
145
146 -----
147
148 **Input formats**
149
150 .. class:: warningmark
151
152 *Reads must be clipped from their adapter and provided in a FASTA or FASTQ format*
153
154 -----
155
156 **OUTPUTS**
157
158 **Annotation table in a tabular format**
159
160 </help>
161 </tool>