comparison mircounts.xml @ 15:ffcd42f85b61 draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mircounts commit 5eb8570dce4e22fb2759cc16c8e1ce9d304508fe
author artbio
date Sat, 10 Feb 2024 17:15:04 +0000
parents c163574c246f
children
comparison
equal deleted inserted replaced
14:c163574c246f 15:ffcd42f85b61
1 <tool id="mircounts" name="miRcounts" version="1.5.1"> 1 <tool id="mircounts" name="miRcounts" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description> Counts miRNA alignments from small RNA sequence data</description> 2 <description> Counts miRNA alignments from small RNA sequence data</description>
3 <macros>
4 <token name="@TOOL_VERSION@">1.6</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 <token name="@PROFILE@">23.0</token>
7 </macros>
3 <requirements> 8 <requirements>
4 <requirement type="package" version="1.34=ha1f6473_0">tar</requirement> 9 <requirement type="package" version="1.34">tar</requirement>
5 <requirement type="package" version="1.3.0=py39h176da8b_2">bowtie</requirement> 10 <requirement type="package" version="1.3.1">bowtie</requirement>
6 <requirement type="package" version="1.12=h9aed4be_1">samtools</requirement> 11 <requirement type="package" version="1.19.2">samtools</requirement>
7 <requirement type="package" version="0.16.0.1=py39h051187c_3">pysam</requirement> 12 <requirement type="package" version="0.22.0">pysam</requirement>
8 <requirement type="package" version="1.6.6=r40h6115d3f_1">r-optparse</requirement> 13 <requirement type="package" version="1.7.4">r-optparse</requirement>
9 <requirement type="package" version="0.20_44=r40hcfec24a_0">r-lattice</requirement> 14 <requirement type="package" version="0.22_5">r-lattice</requirement>
10 </requirements> 15 </requirements>
11 <stdio> 16 <stdio>
12 <exit_code range="1:" level="warning" description="Tool exception" /> 17 <exit_code range="1:" level="warning" description="Tool exception" />
13 </stdio> 18 </stdio>
14 <command detect_errors="exit_code"><![CDATA[ 19 <command detect_errors="exit_code"><![CDATA[
15 tar -xf '$__tool_directory__'/mirbase.tar.gz && 20 tar -xf '$__tool_directory__'/mirbase.tar.gz &&
16 python '$__tool_directory__'/mature_mir_gff_translation.py 21 python '$__tool_directory__'/mature_mir_gff_translation.py
17 --gff_path mirbase/${mirbase_version}/genomes/${genomeKey}.gff3 22 --gff_path mirbase/'${mirbase_version}'/genomes/'${genomeKey}'.gff3
18 --output $gff3 && ## transcode the mature miR genome coordinates into coordinates relative to the corresponding "miRNA_primary_transcript". 23 --output '$gff3' && ## transcode mature miR genome coordinates relative to "miRNA_primary_transcript"
19 python '$__tool_directory__'/format_fasta_hairpins.py 24 python '$__tool_directory__'/format_fasta_hairpins.py
20 --hairpins_path mirbase/${mirbase_version}/hairpin.fa.gz 25 --hairpins_path mirbase/'${mirbase_version}'/hairpin.fa.gz
21 --basename ${genomeKey} 26 --basename '${genomeKey}'
22 --output hairpin.fa && 27 --output hairpin.fa &&
23 #if $cutadapt.cutoption == "yes": 28 #if $cutadapt.cutoption == "yes":
24 python '$__tool_directory__'/yac.py --input $cutadapt.input 29 python '$__tool_directory__'/yac.py --input '$cutadapt.input'
25 --output clipped_input.fastq 30 --output clipped_input.fastq
26 --output_format fastq 31 --output_format fastq
27 --adapter_to_clip $cutadapt.clip_source.clip_sequence 32 --adapter_to_clip '$cutadapt.clip_source.clip_sequence'
28 --min $cutadapt.min 33 --min '$cutadapt.min'
29 --max $cutadapt.max 34 --max '$cutadapt.max'
30 --Nmode $cutadapt.Nmode && 35 --Nmode '$cutadapt.Nmode' &&
31 #else: 36 #else:
32 ln -f -s '$cutadapt.clipped_input' clipped_input.fastq && 37 ln -f -s '$cutadapt.clipped_input' clipped_input.fastq &&
33 #end if 38 #end if
34 bowtie-build hairpin.fa hairpin && 39 bowtie-build hairpin.fa hairpin &&
35 bowtie -v $v -M 1 --best --strata --norc -p \${GALAXY_SLOTS:-4} --sam hairpin -q clipped_input.fastq | samtools sort -@ \${GALAXY_SLOTS:-4} -O bam -o '$output' && 40 bowtie -v '$v' -M 1 --best --strata --norc -p \${GALAXY_SLOTS:-4} --sam hairpin -q clipped_input.fastq | samtools sort -@ \${GALAXY_SLOTS:-4} -O bam -o '$output' &&
36 samtools index $output && 41 samtools index $output &&
37 python '$__tool_directory__'/mircounts.py --alignment $output --gff $gff3 --quality_threshold 10 --pre_mirs $pre_mir_count_file --mirs $mir_count_file --lattice $coverage_dataframe 42 python '$__tool_directory__'/mircounts.py --alignment '$output' --gff '$gff3' --quality_threshold 10 --pre_mirs '$pre_mir_count_file' --mirs '$mir_count_file' --lattice '$coverage_dataframe'
38 #if $plotting.plottingOption == 'yes': 43 #if $plotting.plottingOption == 'yes':
39 && Rscript '$__tool_directory__'/coverage_plotting.R --dataframe $coverage_dataframe --type $plotting.display --output $latticePDF 44 && Rscript '$__tool_directory__'/coverage_plotting.R --dataframe '$coverage_dataframe' --type '$plotting.display' --output '$latticePDF'
40 #end if 45 #end if
41 ]]></command> 46 ]]></command>
42 <inputs> 47 <inputs>
43 <conditional name="cutadapt"> 48 <conditional name="cutadapt">
44 <param label="Remove adapter sequence before aligning" name="cutoption" type="select"> 49 <param label="Remove adapter sequence before aligning" name="cutoption" type="select">
133 <data format="pdf" label="Pre-mir coverage (${plotting.display})" name="latticePDF"> 138 <data format="pdf" label="Pre-mir coverage (${plotting.display})" name="latticePDF">
134 <filter>plotting['plottingOption'] == "yes"</filter> 139 <filter>plotting['plottingOption'] == "yes"</filter>
135 </data> 140 </data>
136 </outputs> 141 </outputs>
137 <tests> 142 <tests>
138 <test> 143 <test expect_num_outputs="6">
139 <param name="cutoption" value="no" /> 144 <param name="cutoption" value="no"/>
140 <param name="v" value="1"/> 145 <param name="v" value="1"/>
141 <param name="genomeKey" value="aga"/> 146 <param name="genomeKey" value="aga"/>
142 <param name="mirbase_version" value="22"/> 147 <param name="mirbase_version" value="22"/>
143 <param name="clipped_input" value="aga.fastqsanger" ftype="fastqsanger"/> 148 <param name="clipped_input" value="aga.fastqsanger.gz" ftype="fastqsanger.gz"/>
144 <param name="plottingOption" value="yes"/> 149 <param name="plottingOption" value="yes"/>
145 <param name="display" value="relative"/> 150 <param name="display" value="relative"/>
146 <param name="output_premir_counts" value="True"/> 151 <param name="output_premir_counts" value="True"/>
147 <param name="output_mir_counts" value="True"/> 152 <param name="output_mir_counts" value="True"/>
148 <output name="output" file="aga.bam" compare="sim_size" /> 153 <output name="output" file="aga.bam" compare="sim_size" />
150 <output name="pre_mir_count_file" file="aga_pre_mirs_count.22.tab" ftype="tabular" /> 155 <output name="pre_mir_count_file" file="aga_pre_mirs_count.22.tab" ftype="tabular" />
151 <output name="mir_count_file" file="aga_mirs_count.22.tab" ftype="tabular" /> 156 <output name="mir_count_file" file="aga_mirs_count.22.tab" ftype="tabular" />
152 <output name="latticePDF" file="aga_mir_coverage.pdf" ftype="pdf" /> 157 <output name="latticePDF" file="aga_mir_coverage.pdf" ftype="pdf" />
153 <output name="coverage_dataframe" file="aga_lattice_dataframe.tab" ftype="tabular" /> 158 <output name="coverage_dataframe" file="aga_lattice_dataframe.tab" ftype="tabular" />
154 </test> 159 </test>
155 <test> 160 <test expect_num_outputs="6">
156 <param name="cutoption" value="yes" /> 161 <param name="cutoption" value="yes"/>
157 <param name="min" value="18"/> 162 <param name="min" value="18"/>
158 <param name="max" value="32"/> 163 <param name="max" value="32"/>
159 <param name="Nmode" value="reject"/> 164 <param name="Nmode" value="reject"/>
160 <param name="clip_sequence" value="TGGAATTCTCGGGTGCCAAG"/> 165 <param name="clip_sequence" value="TGGAATTCTCGGGTGCCAAG"/>
161 <param name="v" value="1"/> 166 <param name="v" value="1"/>
171 <output name="pre_mir_count_file" file="mouse_pre_mirs_count.29.tab" ftype="tabular" /> 176 <output name="pre_mir_count_file" file="mouse_pre_mirs_count.29.tab" ftype="tabular" />
172 <output name="mir_count_file" file="mouse_mirs_count.29.tab" ftype="tabular" /> 177 <output name="mir_count_file" file="mouse_mirs_count.29.tab" ftype="tabular" />
173 <output name="latticePDF" file="mouse_mir_coverage.pdf" ftype="pdf" /> 178 <output name="latticePDF" file="mouse_mir_coverage.pdf" ftype="pdf" />
174 <output name="coverage_dataframe" file="mouse_lattice_dataframe.tab" ftype="tabular" /> 179 <output name="coverage_dataframe" file="mouse_lattice_dataframe.tab" ftype="tabular" />
175 </test> 180 </test>
176 <test> 181 <test expect_num_outputs="4">
177 <param name="cutoption" value="yes" /> 182 <param name="cutoption" value="yes"/>
178 <param name="min" value="15"/> 183 <param name="min" value="15"/>
179 <param name="max" value="25"/> 184 <param name="max" value="25"/>
180 <param name="Nmode" value="reject"/> 185 <param name="Nmode" value="reject"/>
181 <param name="clip_sequence" value="TCGTATGCCGTCTTCTGCTTG"/> 186 <param name="clip_sequence" value="TCGTATGCCGTCTTCTGCTTG"/>
182 <param name="v" value="0"/> 187 <param name="v" value="0"/>
189 <output name="output" file="unclipped.out.22.bam" compare="sim_size" /> 194 <output name="output" file="unclipped.out.22.bam" compare="sim_size" />
190 <output name="gff3" file="translated_dme.22.gff3" lines_diff="22" ftype="gff3" /> 195 <output name="gff3" file="translated_dme.22.gff3" lines_diff="22" ftype="gff3" />
191 <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.22.tab" ftype="tabular" /> 196 <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.22.tab" ftype="tabular" />
192 <output name="mir_count_file" file="mirs_unclipped_count.22.tab" ftype="tabular" /> 197 <output name="mir_count_file" file="mirs_unclipped_count.22.tab" ftype="tabular" />
193 </test> 198 </test>
194 <test> 199 <test expect_num_outputs="4">
195 <param name="cutoption" value="yes" /> 200 <param name="cutoption" value="yes"/>
196 <param name="min" value="15"/> 201 <param name="min" value="15"/>
197 <param name="max" value="25"/> 202 <param name="max" value="25"/>
198 <param name="Nmode" value="reject"/> 203 <param name="Nmode" value="reject"/>
199 <param name="clip_sequence" value="TCGTATGCCGTCTTCTGCTTG"/> 204 <param name="clip_sequence" value="TCGTATGCCGTCTTCTGCTTG"/>
200 <param name="v" value="0"/> 205 <param name="v" value="0"/>
207 <output name="output" file="unclipped.out.bam" compare="sim_size" /> 212 <output name="output" file="unclipped.out.bam" compare="sim_size" />
208 <output name="gff3" file="translated_dme.gff3" lines_diff="22" ftype="gff3" /> 213 <output name="gff3" file="translated_dme.gff3" lines_diff="22" ftype="gff3" />
209 <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.tab" ftype="tabular" /> 214 <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.tab" ftype="tabular" />
210 <output name="mir_count_file" file="mirs_unclipped_count.tab" ftype="tabular" /> 215 <output name="mir_count_file" file="mirs_unclipped_count.tab" ftype="tabular" />
211 </test> 216 </test>
212 <test> 217 <test expect_num_outputs="6">
213 <param name="cutoption" value="yes" /> 218 <param name="cutoption" value="yes"/>
214 <param name="min" value="15"/> 219 <param name="min" value="15"/>
215 <param name="max" value="25"/> 220 <param name="max" value="25"/>
216 <param name="Nmode" value="reject"/> 221 <param name="Nmode" value="reject"/>
217 <param name="clip_sequence" value="TCGTATGCCGTCTTCTGCTTG"/> 222 <param name="clip_sequence" value="TCGTATGCCGTCTTCTGCTTG"/>
218 <param name="v" value="0"/> 223 <param name="v" value="0"/>
228 <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.tab" ftype="tabular" /> 233 <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.tab" ftype="tabular" />
229 <output name="mir_count_file" file="mirs_unclipped_count.tab" ftype="tabular" /> 234 <output name="mir_count_file" file="mirs_unclipped_count.tab" ftype="tabular" />
230 <output name="latticePDF" file="mir_unclipped_coverage.pdf" ftype="pdf"/> 235 <output name="latticePDF" file="mir_unclipped_coverage.pdf" ftype="pdf"/>
231 <output name="coverage_dataframe" file="lattice_unclipped_dataframe.tab" ftype="tabular" /> 236 <output name="coverage_dataframe" file="lattice_unclipped_dataframe.tab" ftype="tabular" />
232 </test> 237 </test>
233 <test> 238 <test expect_num_outputs="6">
234 <param name="cutoption" value="no" /> 239 <param name="cutoption" value="no"/>
235 <param name="v" value="1"/> 240 <param name="v" value="1"/>
236 <param name="genomeKey" value="dme"/> 241 <param name="genomeKey" value="dme"/>
237 <param name="mirbase_version" value="21"/> 242 <param name="mirbase_version" value="21"/>
238 <param name="clipped_input" value="input.clipped.fastqsanger" ftype="fastqsanger"/> 243 <param name="clipped_input" value="input.clipped.fastqsanger" ftype="fastqsanger"/>
239 <param name="plottingOption" value="yes"/> 244 <param name="plottingOption" value="yes"/>
257 + Computes pre-mir and mir counts using the pysam python package 262 + Computes pre-mir and mir counts using the pysam python package
258 + Plots pre-mir read coverages using R lattice package (optional) 263 + Plots pre-mir read coverages using R lattice package (optional)
259 264
260 This tool uses a species-specific GFF3 file generated from mirBase_ to guide the parsing of a bam file of small RNA alignments. 265 This tool uses a species-specific GFF3 file generated from mirBase_ to guide the parsing of a bam file of small RNA alignments.
261 266
262 .. _mirBase: ftp://mirbase.org/pub/mirbase/ 267 .. _mirBase: https://mirbase.org/download/
263 268
264 ------ 269 ------
265 270
266 271
267 **Inputs** 272 **Inputs**