comparison regtools_junctions_extract.xml @ 0:2626c5b4c665 draft

planemo upload commit db634d933827ebc78981c7a0aa18205a85fa42e6-dirty
author yating-l
date Mon, 19 Dec 2016 13:07:32 -0500
parents
children e9dcea52d079
comparison
equal deleted inserted replaced
-1:000000000000 0:2626c5b4c665
1 <tool id="regtools_junctions_extract" name="regtools junctions extract" version="0.1.0">
2 <description>Extract splice junctions from a RNA-Seq BAM file</description>
3 <requirements>
4 <requirement type="package" version="0.3.0">regtools</requirement>
5 </requirements>
6 <stdio>
7 <exit_code range="1:" />
8 </stdio>
9 <command><![CDATA[
10 ## regtools expects an indexed BAM file
11 ## Use symlinks to link the BAM file and its index to the working directory
12 ## See: https://biostar.usegalaxy.org/p/10128/
13
14 ln -sf '${input1}' infile.bam &&
15 ln -sf '${input1.metadata.bam_index}' infile.bam.bai &&
16
17 regtools junctions extract
18 -i $min_intron_length
19 -I $max_intron_length
20 -o $output1
21 #if str($advanced_options.advanced_options_selector) == "on":
22 -a $advanced_options.min_anchor_length
23
24 #if str($advanced_options.region):
25 -r "$advanced_options.region"
26 #end if
27 #end if
28 infile.bam &&
29
30 python $__tool_directory__/validator.py $output1 $fixed_output
31 ]]></command>
32 <inputs>
33 <param name="input1" type="data" format="bam" />
34
35 <param name="min_intron_length" type="integer" label="Minimum intron length" value="20" min="1">
36 <help>Only considers spliced RNA-Seq reads with this minimum intron length (-i)</help>
37 </param>
38 <param name="max_intron_length" type="integer" label="Maximum intron length" value="500000" min="1">
39 <help>Only considers spliced RNA-Seq reads with this maximum intron length (-I)</help>
40 </param>
41
42 <conditional name="advanced_options">
43 <param name="advanced_options_selector" type="select" label="Advanced options">
44 <option value="off" selected="true">Hide advanced options</option>
45 <option value="on">Display advanced options</option>
46 </param>
47 <when value="on">
48 <param name="min_anchor_length" type="integer" label="Minimum anchor length" value="8" min="1">
49 <help>Only report splice junctions with this minimum anchor length on both sides of the junction (-a)</help>
50 </param>
51 <param name="region" type="text" optional="true" label="Only extract junctions in this region" value="">
52 <help>Only report splice junctions within this region (format = chrom:start-end) (-r)</help>
53 <validator type="regex"
54 message="Region should be in the following format: chrom:start-end">^([^:]+):(\d+)-(\d+)$</validator>
55 </param>
56 </when>
57
58 <when value="off" />
59 </conditional>
60 </inputs>
61 <outputs>
62 <data name="output1" format="bed" message="original output"/>
63 <data name="fixed_output" format="bed" message="Check for lines with invalid BED format, if so remove the lines. This output is the one that should be used in HAC workflow"/>
64 </outputs>
65 <tests>
66 <test>
67 <!-- Test with default parameters -->
68 <param name="input1" value="Dbia3_adult_males_shallow.bam" />
69 <output name="output1" file="Dbia3_adult_males_junctions_i20_I500000.bed" />
70 <output name="fixed_output" file="Dbia3_adult_males_junctions_i20_I500000_fixed.bed" />
71 </test>
72 <test>
73 <!-- Test with custom intron length thresholds -->
74 <param name="min_intron_length" value="50" />
75 <param name="max_intron_length" value="50000" />
76 <param name="input1" value="Dbia3_adult_males_shallow.bam" />
77 <output name="output1" file="Dbia3_adult_males_junctions_i50_I50000.bed" />
78 <output name="fixed_output" file="Dbia3_adult_males_junctions_i50_I50000_fixed.bed" />
79 </test>
80 <test>
81 <!-- Test with advanced option and custom anchor size -->
82 <param name="advanced_options_selector" value="on" />
83 <param name="min_anchor_length" value="10" />
84 <param name="input1" value="Dbia3_adult_males_shallow.bam" />
85 <output name="output1"
86 file="Dbia3_adult_males_junctions_i20_I500000_a10.bed" />
87 <output name="fixed_output"
88 file="Dbia3_adult_males_junctions_i20_I500000_a10_fixed.bed" />
89 </test>
90 <test>
91 <!-- Test with advanced option and selected region -->
92 <param name="advanced_options_selector" value="on" />
93 <param name="region" value="contig2:10000-30000" />
94 <param name="input1" value="Dbia3_adult_males_shallow.bam" />
95 <output name="output1" file="Dbia3_adult_males_junctions_i20_I500000_rcontig2_10-30kb.bed" />
96 <output name="fixed_output" file="Dbia3_adult_males_junctions_i20_I500000_rcontig2_10-30kb_fixed.bed"/>
97 </test>
98 <test>
99 <!--Test with output having invalid strand -->
100 <param name="input1" value="Dbia3.bam" />
101 <output name="output1" file="Dbia3_i20_I500000.bed" />
102 <output name="fixed_output" file="Dbia3_i20_I500000_fixed.bed" />
103 </test>
104 </tests>
105 <help><![CDATA[
106 **What it does**
107
108 The `regtools junctions extract <https://regtools.readthedocs.io/en/latest/commands/junctions-extract/>`_
109 tool creates a list of exon-exon junctions from spliced RNA-Seq reads within a BAM
110 alignment file. The format of the output BED file is similar to the ``junctions.bed``
111 file produced by TopHat2.
112
113 The extent of each BED feature corresponds to the maximum overhang of each splice
114 junction. The score of each BED feature corresponds to the number of spliced RNA-Seq
115 reads that support each junction.
116
117 --------
118
119 .. class:: warningmark
120
121 By default, the minimum intron size is **20 bp** and the maximum intron size is
122 **500,000 bp** so that they conform to the default intron size settings for
123 `HISAT2 <https://ccb.jhu.edu/software/hisat2/manual.shtml#options>`_. The minimum
124 intron size for the command-line version of ``regtools junctions extract`` is 70 bp.
125
126 ]]></help>
127 <citations>
128 <citation type="bibtex">
129 @misc{githubregtools,
130 author = {Griffith Lab},
131 year = {2016},
132 title = {regtools},
133 publisher = {GitHub},
134 journal = {GitHub repository},
135 url = {https://github.com/griffithlab/regtools},
136 }</citation>
137 </citations>
138 </tool>