comparison tools/filters/wiggle_to_simple.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9071e359b9a3
1 <tool id="wiggle2simple1" name="Wiggle-to-Interval">
2 <description>converter</description>
3 <command interpreter="python">wiggle_to_simple.py $input $out_file1 </command>
4 <inputs>
5 <param format="wig" name="input" type="data" label="Convert"/>
6 </inputs>
7 <outputs>
8 <data format="interval" name="out_file1" />
9 </outputs>
10 <tests>
11 <test>
12 <param name="input" value="2.wig" />
13 <output name="out_file1" file="2.interval"/>
14 </test>
15 <test>
16 <param name="input" value="3.wig" />
17 <output name="out_file1" file="3_wig.bed"/>
18 </test>
19 </tests>
20 <help>
21 **Syntax**
22
23 This tool converts wiggle data into interval type.
24
25 - **Wiggle format**: The .wig format is line-oriented. Wiggle data is preceded by a UCSC track definition line. Following the track definition line is the track data, which can be entered in three different formats described below.
26
27 - **BED format** with no declaration line and four columns of data::
28
29 chromA chromStartA chromEndA dataValueA
30 chromB chromStartB chromEndB dataValueB
31
32 - **variableStep** two column data; started by a declaration line and followed with chromosome positions and data values::
33
34 variableStep chrom=chrN [span=windowSize]
35 chromStartA dataValueA
36 chromStartB dataValueB
37
38 - **fixedStep** single column data; started by a declaration line and followed with data values::
39
40 fixedStep chrom=chrN start=position step=stepInterval [span=windowSize]
41 dataValue1
42 dataValue2
43
44 -----
45
46 **Example**
47
48 - input wiggle format file::
49
50 #track type=wiggle_0 name="Bed Format" description="BED format"
51 chr19 59302000 59302300 -1.0
52 chr19 59302300 59302600 -0.75
53 chr19 59302600 59302900 -0.50
54 chr19 59302900 59303200 -0.25
55 chr19 59303200 59303500 0.0
56 #track type=wiggle_0 name="variableStep" description="variableStep format"
57 variableStep chrom=chr19 span=150
58 59304701 10.0
59 59304901 12.5
60 59305401 15.0
61 59305601 17.5
62 #track type=wiggle_0 name="fixedStep" description="fixed step" visibility=full
63 fixedStep chrom=chr19 start=59307401 step=300 span=200
64 1000
65 900
66 800
67 700
68 600
69
70 - convert the above file to interval file::
71
72 chr19 59302000 59302300 + -1.0
73 chr19 59302300 59302600 + -0.75
74 chr19 59302600 59302900 + -0.5
75 chr19 59302900 59303200 + -0.25
76 chr19 59303200 59303500 + 0.0
77 chr19 59304701 59304851 + 10.0
78 chr19 59304901 59305051 + 12.5
79 chr19 59305401 59305551 + 15.0
80 chr19 59305601 59305751 + 17.5
81 chr19 59307701 59307901 + 1000.0
82 chr19 59308001 59308201 + 900.0
83 chr19 59308301 59308501 + 800.0
84 chr19 59308601 59308801 + 700.0
85 chr19 59308901 59309101 + 600.0
86
87 </help>
88 </tool>