Mercurial > repos > nilesh > rseqc
comparison bam2wig.xml @ 32:580ee0c4bc4e
Fixes from Bjorn Gruning: create symlinks under $TMP and clean them up afterwards, replace R dependency with the Tool Shed R3 package, add --install-scripts, prepend tool-ids with rseqc
author | lparsons |
---|---|
date | Mon, 07 Oct 2013 15:01:13 -0400 |
parents | cc5eaa9376d8 |
children | 8fbd165f8835 |
comparison
equal
deleted
inserted
replaced
31:cc5eaa9376d8 | 32:580ee0c4bc4e |
---|---|
1 <tool id="bam2wig" name="BAM to Wiggle" version="1.1"> | 1 <tool id="rseqc_bam2wig" name="BAM to Wiggle" version="1.1"> |
2 <description> | 2 <description> |
3 converts all types of RNA-seq data from .bam to .wig | 3 converts all types of RNA-seq data from .bam to .wig |
4 </description> | 4 </description> |
5 <requirements> | 5 <requirements> |
6 <requirement type="package" version="2.11.0">R</requirement> | 6 <requirement type="package" version="3.0.1">R</requirement> |
7 <requirement type="package" version="1.7.1">numpy</requirement> | 7 <requirement type="package" version="1.7.1">numpy</requirement> |
8 <requirement type="package" version="2.3.7">rseqc</requirement> | 8 <requirement type="package" version="2.3.7">rseqc</requirement> |
9 </requirements> | 9 </requirements> |
10 <command> | 10 <command> |
11 ln -s "${input}" "local_input.bam" && | |
12 ln -s "${input.metadata.bam_index}" "local_input.bam.bai" && | |
13 bam2wig.py -i "local_input.bam" -s $chromsize -o outfile | |
14 | 11 |
15 #if str($strand_type.strand_specific) == "pair" | 12 #import tempfile, os |
16 -d | 13 #set $tmp_input = tempfile.NamedTemporaryFile() |
17 #if str($strand_type.pair_type) == "sd" | 14 #set $tmp_input_name = $input_singles_tmp_handle.name |
18 '1++,1--,2+-,2-+' | 15 #silent $tmp_input.close() |
19 #else | |
20 '1+-,1-+,2++,2--' | |
21 #end if | |
22 #end if | |
23 | 16 |
24 #if str($strand_type.strand_specific) == "single" | 17 ln -s "${input}" $tmp_input_name && |
25 -d | 18 ln -s "${input.metadata.bam_index}" $tmp_input_name + ".bai" && |
26 #if str($strand_type.single_type) == "s" | 19 bam2wig.py -i "local_input.bam" -s $chromsize -o outfile |
27 '++,--' | |
28 #else | |
29 '+-,-+' | |
30 #end if | |
31 #end if | |
32 | 20 |
33 #if $wigsum.wigsum_type | 21 #if str($strand_type.strand_specific) == "pair" |
34 -t $wigsum.totalwig | 22 -d |
35 #end if | 23 #if str($strand_type.pair_type) == "sd" |
24 '1++,1--,2+-,2-+' | |
25 #else | |
26 '1+-,1-+,2++,2--' | |
27 #end if | |
28 #end if | |
36 | 29 |
37 #if $skipmultihits | 30 #if str($strand_type.strand_specific) == "single" |
38 -u | 31 -d |
39 #end if | 32 #if str($strand_type.single_type) == "s" |
40 </command> | 33 '++,--' |
41 <inputs> | 34 #else |
42 <param name="input" type="data" label="Input .bam File" format="bam" /> | 35 '+-,-+' |
43 <param name="chromsize" type="data" label="Chromosome size file (tab or space separated)" format="txt,tabular" /> | 36 #end if |
44 <param name="skipmultihits" type="boolean" label="Skip Multiple Hit Reads/Only Use Uniquely Mapped Reads" value="false" /> | 37 #end if |
45 <conditional name="wigsum"> | 38 |
46 <param name="wigsum_type" type="boolean" label="Specify wigsum?" value="false"> | 39 #if $wigsum.wigsum_type |
47 </param> | 40 -t $wigsum.totalwig |
48 <when value="true"> | 41 #end if |
49 <param name="totalwig" value="0" type="integer" label="specified wigsum" /> | 42 |
50 </when> | 43 #if $skipmultihits |
51 <when value="false"></when> | 44 -u |
52 </conditional> | 45 #end if |
53 <conditional name="strand_type"> | 46 ; |
54 <param name="strand_specific" type="select" label="Strand-specific?" value="none"> | 47 rm $tmp_input_name + ".bai" ; |
55 <option value="none">none</option> | 48 rm $tmp_input_name |
56 <option value="pair">Pair-End RNA-seq</option> | 49 </command> |
57 <option value="single">Single-End RNA-seq</option> | 50 <inputs> |
58 </param> | 51 <param name="input" type="data" label="Input .bam File" format="bam" /> |
59 <when value="pair"> | 52 <param name="chromsize" type="data" label="Chromosome size file (tab or space separated)" format="txt,tabular" /> |
60 <param name="pair_type" type="select" display="radio" label="Pair-End Read Type (format: mapped --> parent)" value="sd"> | 53 <param name="skipmultihits" type="boolean" label="Skip Multiple Hit Reads/Only Use Uniquely Mapped Reads" value="false" /> |
61 <option value="sd"> read1 (positive --> positive; negative --> negative), read2 (positive --> negative; negative --> positive)</option> | 54 <conditional name="wigsum"> |
62 <option value="ds">read1 (positive --> negative; negative --> positive), read2 (positive --> positive; negative --> negative)</option> | 55 <param name="wigsum_type" type="boolean" label="Specify wigsum?" value="false"> |
63 </param> | 56 </param> |
64 </when> | 57 <when value="true"> |
65 <when value="single"> | 58 <param name="totalwig" value="0" type="integer" label="specified wigsum" /> |
66 <param name="single_type" type="select" display="radio" label="Single-End Read Type (format: mapped --> parent)" value="s"> | 59 </when> |
67 <option value="s">positive --> positive; negative --> negative</option> | 60 <when value="false"/> |
68 <option value="d">positive --> negative; negative --> positive</option> | 61 </conditional> |
69 </param> | 62 <conditional name="strand_type"> |
70 </when> | 63 <param name="strand_specific" type="select" label="Strand-specific?" value="none"> |
71 <when value="none"></when> | 64 <option value="none">none</option> |
72 </conditional> | 65 <option value="pair">Pair-End RNA-seq</option> |
73 </inputs> | 66 <option value="single">Single-End RNA-seq</option> |
74 <outputs> | 67 </param> |
75 <data format="wig" name="output" from_work_dir="outfile.wig"> | 68 <when value="pair"> |
76 <filter>strand_type['strand_specific'] == 'none'</filter> | 69 <param name="pair_type" type="select" display="radio" label="Pair-End Read Type (format: mapped --> parent)" value="sd"> |
77 </data> | 70 <option value="sd"> read1 (positive --> positive; negative --> negative), read2 (positive --> negative; negative --> positive)</option> |
78 <data format="wig" name="outputfwd" from_work_dir="outfile_Forward.wig" label="${tool.name} on ${on_string} (Forward Reads)"> | 71 <option value="ds">read1 (positive --> negative; negative --> positive), read2 (positive --> positive; negative --> negative)</option> |
79 <filter>strand_type['strand_specific'] != 'none'</filter> | 72 </param> |
80 </data> | 73 </when> |
81 <data format="wig" name="outputrv" from_work_dir="outfile_Reverse.wig" label="${tool.name} on ${on_string} (Reverse Reads)"> | 74 <when value="single"> |
82 <filter>strand_type['strand_specific'] != 'none'</filter> | 75 <param name="single_type" type="select" display="radio" label="Single-End Read Type (format: mapped --> parent)" value="s"> |
83 </data> | 76 <option value="s">positive --> positive; negative --> negative</option> |
84 </outputs> | 77 <option value="d">positive --> negative; negative --> positive</option> |
78 </param> | |
79 </when> | |
80 <when value="none"></when> | |
81 </conditional> | |
82 </inputs> | |
83 <outputs> | |
84 <data format="wig" name="output" from_work_dir="outfile.wig"> | |
85 <filter>strand_type['strand_specific'] == 'none'</filter> | |
86 </data> | |
87 <data format="wig" name="outputfwd" from_work_dir="outfile_Forward.wig" label="${tool.name} on ${on_string} (Forward Reads)"> | |
88 <filter>strand_type['strand_specific'] != 'none'</filter> | |
89 </data> | |
90 <data format="wig" name="outputrv" from_work_dir="outfile_Reverse.wig" label="${tool.name} on ${on_string} (Reverse Reads)"> | |
91 <filter>strand_type['strand_specific'] != 'none'</filter> | |
92 </data> | |
93 </outputs> | |
85 <stdio> | 94 <stdio> |
86 <exit_code range="1:" level="fatal" description="An error occured during execution, see stderr and stdout for more information" /> | 95 <exit_code range="1:" level="fatal" description="An error occured during execution, see stderr and stdout for more information" /> |
87 <regex match="[Ee]rror" source="both" description="An error occured during execution, see stderr and stdout for more information" /> | 96 <regex match="[Ee]rror" source="both" description="An error occured during execution, see stderr and stdout for more information" /> |
88 </stdio> | 97 </stdio> |
89 <help> | 98 <help> |
90 bam2wig.py | 99 bam2wig.py |
91 ++++++++++ | 100 ++++++++++ |
92 | 101 |
93 Visualization is the most straightforward and effective way to QC your RNA-seq | 102 Visualization is the most straightforward and effective way to QC your RNA-seq |
94 data. For example, change of expression or new splicing can be easily checked | 103 data. For example, change of expression or new splicing can be easily checked |
101 | 110 |
102 Inputs | 111 Inputs |
103 ++++++++++++++ | 112 ++++++++++++++ |
104 | 113 |
105 Input BAM file | 114 Input BAM file |
106 Alignment file in BAM format (SAM is not supported). BAM file will be sorted and indexed using samTools. | 115 Alignment file in BAM format (SAM is not supported). BAM file will be sorted and indexed using samTools. |
107 | 116 |
108 Chromosome size file | 117 Chromosome size file |
109 Tab or space separated text file with 2 columns: first column is chromosome name, second column is size of the chromosome. Chromosome names (such as "chr1") should be consistent between this file and BAM file. | 118 Tab or space separated text file with 2 columns: first column is chromosome name, second column is size of the chromosome. Chromosome names (such as "chr1") should be consistent between this file and BAM file. |
110 | 119 |
111 Specified wigsum (default=none) | 120 Specified wigsum (default=none) |
112 Specified wigsum. Wigsum of 100000000 equals to coverage achieved by 1 million 100nt reads. Ignore this option to disable normalization. | 121 Specified wigsum. Wigsum of 100000000 equals to coverage achieved by 1 million 100nt reads. Ignore this option to disable normalization. |
113 | 122 |
114 Skip multiple Hit reads | 123 Skip multiple Hit reads |
115 skips multiple hit reads or only use uniquely mapped reads | 124 skips multiple hit reads or only use uniquely mapped reads |
116 | 125 |
117 Strand-specific (default=none) | 126 Strand-specific (default=none) |
118 How read(s) were stranded during sequencing. If you are not sure about the strand rule, run infer_experiment.py | 127 How read(s) were stranded during sequencing. If you are not sure about the strand rule, run infer_experiment.py |
119 | 128 |
120 Outputs | 129 Outputs |
121 ++++++++++++++ | 130 ++++++++++++++ |
122 | 131 |
123 If RNA-seq is not strand specific, one wig file will be generated, if RNA-seq | 132 If RNA-seq is not strand specific, one wig file will be generated, if RNA-seq |
141 .. _IGV: http://www.broadinstitute.org/igv/home | 150 .. _IGV: http://www.broadinstitute.org/igv/home |
142 .. _BAM: http://genome.ucsc.edu/goldenPath/help/bam.html | 151 .. _BAM: http://genome.ucsc.edu/goldenPath/help/bam.html |
143 .. _wiggle: http://genome.ucsc.edu/goldenPath/help/wiggle.html | 152 .. _wiggle: http://genome.ucsc.edu/goldenPath/help/wiggle.html |
144 .. _bigwig: http://genome.ucsc.edu/FAQ/FAQformat.html#format6.1 | 153 .. _bigwig: http://genome.ucsc.edu/FAQ/FAQformat.html#format6.1 |
145 | 154 |
146 </help> | 155 </help> |
147 </tool> | 156 </tool> |