/tools/filters/gtf2bedgraph.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 79 lines · 58 code · 21 blank · 0 comment · 0 complexity · cdb0998bfa73eb9de4ea8448e5c8fb28 MD5 · raw file

  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. **What it does**
  20. This tool converts data from GTF format to BEDGraph format (scroll down for format description).
  21. --------
  22. **Example**
  23. The following data in GFF format::
  24. chr22 GeneA enhancer 10000000 10001000 500 + . gene_id "GeneA"; transcript_id "TranscriptAlpha"; FPKM "2.75"; frac "1.000000";
  25. chr22 GeneA promoter 10010000 10010100 900 + . gene_id "GeneA"; transcript_id "TranscriptsAlpha"; FPKM "2.25"; frac "1.000000";
  26. using the attribute name 'FPKM' will be converted to BEDGraph (**note** that 1 is subtracted from the start coordinate)::
  27. chr22 9999999 10001000 2.75
  28. chr22 10009999 10010100 2.25
  29. ------
  30. .. class:: infomark
  31. **About formats**
  32. **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::
  33. 1. seqname - Must be a chromosome or scaffold.
  34. 2. source - The program that generated this feature.
  35. 3. feature - The name of this type of feature. Some examples of standard feature types are "CDS", "start_codon", "stop_codon", and "exon".
  36. 4. start - The starting position of the feature in the sequence. The first base is numbered 1.
  37. 5. end - The ending position of the feature (inclusive).
  38. 6. score - A score between 0 and 1000. If there is no score value, enter ".".
  39. 7. strand - Valid entries include '+', '-', or '.' (for don't know/care).
  40. 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 '.'.
  41. 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.
  42. **BEDGraph format**
  43. 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.
  44. For the track definition line, all options are placed in a single line separated by spaces:
  45. track type=bedGraph name=track_label description=center_label
  46. visibility=display_mode color=r,g,b altColor=r,g,b
  47. priority=priority autoScale=on|off alwaysZero=on|off
  48. gridDefault=on|off maxHeightPixels=max:default:min
  49. graphType=bar|points viewLimits=lower:upper
  50. yLineMark=real-value yLineOnOff=on|off
  51. windowingFunction=maximum|mean|minimum smoothingWindow=off|2-16
  52. The track type is REQUIRED, and must be bedGraph:
  53. type=bedGraph
  54. Following the track definition line are the track data in four column BED format::
  55. chromA chromStartA chromEndA dataValueA
  56. chromB chromStartB chromEndB dataValueB
  57. </help>
  58. </tool>