comparison tools/filters/gtf2bedgraph.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="gtf2bedgraph" name="GTF-to-BEDGraph">
2 <description>converter</description>
3 <command interpreter="python">gtf_to_bedgraph_converter.py $input $out_file1 $attribute_name</command>
4 <inputs>
5 <param format="gtf" name="input" type="data" label="Convert this query"/>
6 <param name="attribute_name" type="text" label="Attribute to Use for Value"/>
7 </inputs>
8 <outputs>
9 <data format="bedgraph" name="out_file1" />
10 </outputs>
11 <tests>
12 <test>
13 <param name="input" value="gtf2bedgraph_in.gtf" ftype="gtf"/>
14 <param name="attribute_name" value="FPKM"/>
15 <output name="out_file1" file="gtf2bedgraph_out.bedgraph" ftype="bedgraph"/>
16 </test>
17 </tests>
18 <help>
19
20 **What it does**
21
22 This tool converts data from GTF format to BEDGraph format (scroll down for format description).
23
24 --------
25
26 **Example**
27
28 The following data in GFF format::
29
30 chr22 GeneA enhancer 10000000 10001000 500 + . gene_id "GeneA"; transcript_id "TranscriptAlpha"; FPKM "2.75"; frac "1.000000";
31 chr22 GeneA promoter 10010000 10010100 900 + . gene_id "GeneA"; transcript_id "TranscriptsAlpha"; FPKM "2.25"; frac "1.000000";
32
33 using the attribute name 'FPKM' will be converted to BEDGraph (**note** that 1 is subtracted from the start coordinate)::
34
35
36 chr22 9999999 10001000 2.75
37 chr22 10009999 10010100 2.25
38
39 ------
40
41 .. class:: infomark
42
43 **About formats**
44
45 **GTF format** Gene Transfer Format is a format for describing genes and other features associated with DNA, RNA and Protein sequences. GTF lines have nine tab-separated fields::
46
47 1. seqname - Must be a chromosome or scaffold.
48 2. source - The program that generated this feature.
49 3. feature - The name of this type of feature. Some examples of standard feature types are "CDS", "start_codon", "stop_codon", and "exon".
50 4. start - The starting position of the feature in the sequence. The first base is numbered 1.
51 5. end - The ending position of the feature (inclusive).
52 6. score - A score between 0 and 1000. If there is no score value, enter ".".
53 7. strand - Valid entries include '+', '-', or '.' (for don't know/care).
54 8. frame - If the feature is a coding exon, frame should be a number between 0-2 that represents the reading frame of the first base. If the feature is not a coding exon, the value should be '.'.
55 9. group - The group field is a list of attributes. Each attribute consists of a type/value pair. Attributes must end in a semi-colon, and be separated from any following attribute by exactly one space. The attribute list must begin with the two mandatory attributes: (i) gene_id value - A globally unique identifier for the genomic source of the sequence and (ii) transcript_id value - A globally unique identifier for the predicted transcript.
56
57 **BEDGraph format**
58
59 The bedGraph format is line-oriented. Bedgraph data are preceeded by a track definition line, which adds a number of options for controlling the default display of this track.
60
61 For the track definition line, all options are placed in a single line separated by spaces:
62 track type=bedGraph name=track_label description=center_label
63 visibility=display_mode color=r,g,b altColor=r,g,b
64 priority=priority autoScale=on|off alwaysZero=on|off
65 gridDefault=on|off maxHeightPixels=max:default:min
66 graphType=bar|points viewLimits=lower:upper
67 yLineMark=real-value yLineOnOff=on|off
68 windowingFunction=maximum|mean|minimum smoothingWindow=off|2-16
69
70 The track type is REQUIRED, and must be bedGraph:
71 type=bedGraph
72
73 Following the track definition line are the track data in four column BED format::
74
75 chromA chromStartA chromEndA dataValueA
76 chromB chromStartB chromEndB dataValueB
77
78 </help>
79 </tool>