comparison mircounts.xml @ 0:da29af78a960 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mircounts commit d4d8106d66b65679a1a685ab94bfcf99cdb7b959
author artbio
date Mon, 24 Jul 2017 06:27:50 -0400
parents
children cadc0f2c6b29
comparison
equal deleted inserted replaced
-1:000000000000 0:da29af78a960
1 <tool id="mircounts" name="miRcounts" version="0.9">
2 <description> Counts miRNA alignments from small RNA sequence data</description>
3 <requirements>
4 <requirement type="package" version="1.2">bowtie</requirement>
5 <requirement type="package" version="1.4.1">samtools</requirement>
6 <requirement type="package" version="0.11.2.1">pysam</requirement>
7 <requirement type="package" version="1.3.2=r3.3.2_0">r-optparse</requirement>
8 <requirement type="package" version="0.20_34=r3.3.2_0">r-lattice</requirement>
9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[
11 ## To be refactored with guidelines in https://github.com/ARTbio/tools-artbio/issues/140
12 wget ftp://mirbase.org/pub/mirbase/CURRENT/genomes/${genomeKey}.gff3 && ## download gff3 specified by the variable genomeKey
13 python '$__tool_directory__'/mature_mir_gff_translation.py --input ${genomeKey}.gff3 --output $gff3 && ## transcode the mature miR genome coordinates into coordinates relative to the corresponding "miRNA_primary_transcript".
14 wget ftp://mirbase.org/pub/mirbase/CURRENT/hairpin.fa.gz &&
15 sh '$__tool_directory__'/format_fasta_hairpins.sh $genomeKey &&
16 #if $cutadapt.cutoption == "yes":
17 python '$__tool_directory__'/yac.py --input $cutadapt.input
18 --output clipped_input.fastq
19 --output_format fastq
20 --adapter_to_clip $cutadapt.clip_source.clip_sequence
21 --min $cutadapt.min
22 --max $cutadapt.max
23 --Nmode $cutadapt.Nmode &&
24 #else
25 ln -f -s '$cutadapt.clipped_input' clipped_input.fastq &&
26 #end if
27 bowtie-build hairpin.fa hairpin &&
28 bowtie -v $v -M 1 --best --strata --norc -p \${GALAXY_SLOTS:-4} --sam hairpin -q clipped_input.fastq 2>/dev/null | samtools sort -O bam -o '$output' &&
29 samtools index $output &&
30 python '$__tool_directory__'/mircounts.py -pm --alignment $output --gff $gff3 --quality_threshold 10 --pre_mirs $pre_mir_count_file --mirs $mir_count_file --lattice $coverage_dataframe;
31 #if $plotting.plottingOption == 'yes':
32 Rscript '$__tool_directory__'/coverage_plotting.R --dataframe $coverage_dataframe --type $plotting.display --output $latticePDF
33 #end if
34 ]]></command>
35 <inputs>
36 <conditional name="cutadapt">
37 <param label="Remove adapter sequence before aligning" name="cutoption" type="select">
38 <option value="no">no</option>
39 <option selected="True" value="yes">yes</option>
40 </param>
41 <when value="yes">
42 <param format="fastq,fastqsanger" label="Source file" name="input" type="data" />
43 <param label="min size" name="min" size="4" type="integer" value="15" help="Minimum size of accepted clipped reads" />
44 <param label="max size" name="max" size="4" type="integer" value="36" help="Maximum size of accepted clipped reads"/>
45 <param label="Accept reads containing N?" name="Nmode" type="select">
46 <option selected="True" value="accept">accept</option>
47 <option value="reject">reject</option>
48 </param>
49 <conditional name="clip_source">
50 <param help="Built-in adapters or User-provided" label="Source" name="clip_source_list" type="select">
51 <option selected="True" value="prebuilt">Use a built-in adapter (select from the list below)</option>
52 <option value="user">Use custom sequence</option>
53 </param>
54 <when value="prebuilt">
55 <param help="if your adapter is not listed, input your own sequence" label="Select Adapter to clip" name="clip_sequence" type="select">
56 <option value="TCGTATGCCGTCTTCTGCTTG">Solexa TCGTATGCCGTCTTCTGCTTG</option>
57 <option value="ATCTCGTATGCCGTCTTCTGCTT">Illumina ATCTCGTATGCCGTCTTCTGCTT</option>
58 <option selected="True" value="TGGAATTCTCGGGTGCCAAG">Illumina TruSeq TGGAATTCTCGGGTGCCAAG</option>
59 <option value="CTGTAGGCACCATCAATCGT">IdT CTGTAGGCACCATCAATCGT</option>
60 </param>
61 </when>
62 <when value="user">
63 <param label="Enter your Sequence" name="clip_sequence" size="35" type="text" value="GAATCC" />
64 </when>
65 </conditional>
66 </when>
67 <when value="no">
68 <param label="Select fastq files to align" name="clipped_input" type="data" format="fastq,fastqsanger" help="Note that sequences reads must be clipped from their adapter" />
69 </when>
70 </conditional>
71 <param name="genomeKey" type="select" label="Choose Organism">
72 <options from_data_table="miRbase_GenomeKeys">
73 <column name="name" index="1"/>
74 <column name="value" index="0"/>
75 </options>
76 </param>
77 <param help="command [ bowtie -v 0,1,2,3 -M 1 --best --strata --norc ] will be used. Specify a value for -v (number of mismatches allowed)" label="Number of mismatches allowed" name="v" type="select">
78 <option value="0">0</option>
79 <option selected="true" value="1">1</option>
80 <option value="2">2</option>
81 <option value="3">3</option>
82 </param>
83 <conditional name="plotting">
84 <param label="Additional miRNA charts" name="plottingOption" type="select">
85 <option value="no">no</option>
86 <option value="yes" selected="True">yes</option>
87 </param>
88 <when value="yes">
89 <param label="Display Coverage with absolute number of reads or relatively to the total number of read matching the gene or mir" name="display" type="select">
90 <option selected="True" value="relative">Relative Coverage</option>
91 <option value="absolute">Absolute Coverage</option>
92 </param>
93 </when>
94 <when value="no">
95 </when>
96 </conditional>
97 </inputs>
98 <outputs>
99 <data format="bam" label="BAM alignment" name="output" />
100 <data format="gff3" label="GFF3 generated by miRCounts" name="gff3"/>
101 <data format="tabular" label="Pre-mir Counts" name="pre_mir_count_file" />
102 <data format="tabular" label="Mir Counts" name="mir_count_file" />
103 <data format="tabular" label="Coverage Table" name="coverage_dataframe">
104 <filter>plotting['plottingOption'] == "yes"</filter>
105 </data>
106 <data format="pdf" label="Pre-mir coverage (${plotting.display})" name="latticePDF">
107 <filter>plotting['plottingOption'] == "yes"</filter>
108 </data>
109 </outputs>
110 <tests>
111 <test>
112 <param name="cutoption" value="yes" />
113 <param name="min" value="15"/>
114 <param name="max" value="25"/>
115 <param name="Nmode" value="reject"/>
116 <param name="clip_sequence" value="TCGTATGCCGTCTTCTGCTTG"/>
117 <param name="v" value="0"/>
118 <param name="genomeKey" value="dme"/>
119 <param name="input" value="input.unclipped.fastqsanger" ftype="fastqsanger"/>
120 <param name="plottingOption" value="no"/>
121 <output name="output" file="unclipped.out.bam" ftype="bam"/>
122 <output name="gff3" file="translated_dme.gff3" ftype="gff3"/>
123 <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.tab"/>
124 <output name="mir_count_file" file="mirs_unclipped_count.tab"/>
125 </test>
126 <test>
127 <param name="cutoption" value="yes" />
128 <param name="min" value="15"/>
129 <param name="max" value="25"/>
130 <param name="Nmode" value="reject"/>
131 <param name="clip_sequence" value="TCGTATGCCGTCTTCTGCTTG"/>
132 <param name="v" value="0"/>
133 <param name="genomeKey" value="dme"/>
134 <param name="input" value="input.unclipped.fastqsanger" ftype="fastqsanger"/>
135 <param name="plottingOption" value="yes"/>
136 <param name="display" value="relative"/>
137 <output name="output" file="unclipped.out.bam" ftype="bam"/>
138 <output name="gff3" file="translated_dme.gff3" ftype="gff3"/>
139 <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.tab"/>
140 <output name="mir_count_file" file="mirs_unclipped_count.tab"/>
141 <output name="latticePDF" file="mir_unclipped_coverage.pdf" ftype="pdf"/>
142 <output name="coverage_dataframe" file="lattice_unclipped_dataframe.tab"/>
143 </test>
144 <test>
145 <param name="cutoption" value="no" />
146 <param name="v" value="1"/>
147 <param name="genomeKey" value="dme"/>
148 <param name="clipped_input" value="input.clipped.fastqsanger" ftype="fastqsanger"/>
149 <param name="plottingOption" value="yes"/>
150 <param name="display" value="absolute"/>
151 <output name="output" file="clipped.out.bam" ftype="bam"/>
152 <output name="gff3" file="translated_dme.gff3" ftype="gff3"/>
153 <output name="pre_mir_count_file" file="pre_mirs_clipped_count.tab"/>
154 <output name="mir_count_file" file="mirs_clipped_count.tab"/>
155 <output name="latticePDF" file="mir_clipped_coverage.pdf" ftype="pdf"/>
156 <output name="coverage_dataframe" file="lattice_clipped_dataframe.tab"/>
157 </test>
158 </tests>
159 <help>
160
161 **What it does**
162 Clip adapter (optional), align small RNA read to miRNA mirBase_ reference using bowtie and compute pre-mir and mir counts using the pysam python package.
163 Optionally, pre-mir read coverages can be plotted using the R lattice package.
164 This tool uses a species-specific GFF3 file generated from mirBase_ to guide the parsing of a bam file of small RNA alignments.
165
166 .. _mirBase: ftp://mirbase.org/pub/mirbase/CURRENT/genomes/
167
168 ------
169
170
171 **Inputs**
172
173 1. a fastq file of reads that may or may not clipped from their adapter sequence. The tool includes a clipping option if needed.
174
175 2. select the appropriate organism from which reads originate
176
177 3. Choose whether you wish or not to plot the pre-mir coverages
178 Coverage can be expressed in absolute number of reads covering the real coordinates of the pre-mir sequences,
179 or, in fraction of reads relative to the maximum coverage (set to 1) covering the coordinates of pre-mirs
180 expressed as a fraction of the length of the pre-mirs.
181
182 ------
183
184 **Outputs**
185
186 1. a BAM alignment of input reads
187 2. a gff3 file generated by the tool to compute mature mir counts
188 3 a table of pre-mir Counts
189 4 a table of mature mir Counts
190
191 Optional:
192 5. A table of pre-mir coverage
193 6. A pdf file with covererage plots
194
195 </help>
196 <citations>
197 <citation type="doi">10.1093/bioinformatics/btp352</citation>
198 <citation type="doi">10.1186/gb-2009-10-3-r25</citation>
199 <citation type="bibtex">@Book{,
200 title = {Lattice: Multivariate Data Visualization with R},
201 author = {Deepayan Sarkar},
202 publisher = {Springer},
203 address = {New York},
204 year = {2008},
205 note = {ISBN 978-0-387-75968-5},
206 url = {http://lmdvr.r-forge.r-project.org},
207 }</citation>
208 </citations>
209 </tool>