Track files in UCSC Genome Browser format. The following
documentation assumes knowledge of concepts explained on the UCSC
Genome Browser's website. Basically, a track file is one of several
types of data (WIG, GFF, etc.), possibly preceded by comments, browser
lines, and a track line. This module allows only a single data track
within a file, although the UCSC specifies that multiple tracks may be
provided together.
module Biocaml_track:
sig
name
- string enclosed in double quotes if there are spaces;
recommended to use only alphanumeric characters and length less
than 15 characters but this is not enforceddescription
- string enclosed in double quotes if there are
spaces; recommended to use only alphanumeric characters and
length less than 60 characters but this is not enforcedvisibility
- "hide", "dense", "full", "pack", or "squish"; if
type=wiggle_0
then "hide", "dense", or "full"; can also use
integer value where 0 = "hide", 1 = "dense", 2 = "full", 3 =
"pack", 4 = "squish"color
- "R,G,B" where each of R, G, and B are integers between
0 and 255altColor
- "R,G,B" where each of R, G, and B are integers
between 0 and 255itemRgb
- "On" is the only allowed valueuseScore
- 0 or 1group
- stringpriority
- integerautoScale
- "on" or "off"gridDefault
- "on" or "off"maxHeightPixels
- "max:default:min" where each of max,
default, and min are integersgraphType
- "bar" or "points"viewLimits
- "lower:upper" where each of lower and upper are
integersyLineMark
- floating point valueyLineOnOff
- "on" or "off"windowingFunction
- "maximum", "mean", or "minimum"smoothingWindow
- "off" or an integer between 2 and 16db
- should be a valid UCSC assembly ID, but currently any
string is acceptedoffset
- integerurl
- stringhtmlUrl
- stringtype
- "wiggle_0" is the only value currently supported,
leaving this attribute unset handles other track typestypet =
[ `browser of
[ `hide of [ `all ]
| `position of string * int * int
| `unknown of string ]
| `comment of string
| `track of (string * string) list ]
type'a
content =[ `content of 'a ]
module Error:
sig
typeparsing =
[ `incomplete_input of
Biocaml_internal_utils.Pos.t * string list * string option
| `wrong_browser_position of Biocaml_internal_utils.Pos.t * string
| `wrong_key_value_format of (string * string) list * string * string ]
typet =
parsing
val parsing_of_sexp : Sexplib.Sexp.t -> parsing
val sexp_of_parsing : parsing -> Sexplib.Sexp.t
end
module Transform:
sig
val string_to_string_content : ?filename:string ->
unit ->
(string,
([ `browser of
[ `hide of [ `all ]
| `position of string * int * int
| `unknown of string ]
| `comment of string
| `content of string
| `track of (string * string) list ], [> Biocaml_track.Error.parsing ])
Biocaml_internal_utils.Result.t)
Biocaml_transform.t
`content _
.val string_content_to_string : ?add_content_new_line:bool ->
unit ->
([ `browser of
[ `hide of [ `all ]
| `position of string * int * int
| `unknown of string ]
| `comment of string
| `content of string
| `track of (string * string) list ], string)
Biocaml_transform.t
`content line
lines.val string_to_wig : ?filename:string ->
unit ->
(string,
([ `bed_graph_value of Biocaml_wig.bed_graph_value
| `browser of
[ `hide of [ `all ]
| `position of string * int * int
| `unknown of string ]
| `comment of string
| `fixed_step_state_change of string * int * int * int option
| `fixed_step_value of float
| `track of (string * string) list
| `variable_step_state_change of string * int option
| `variable_step_value of int * float ],
[> `cannot_parse_key_values of Biocaml_internal_utils.Pos.t * string
| `empty_line of Biocaml_internal_utils.Pos.t
| `incomplete_input of
Biocaml_internal_utils.Pos.t * string list * string option
| `missing_chrom_value of Biocaml_internal_utils.Pos.t * string
| `missing_start_value of Biocaml_internal_utils.Pos.t * string
| `missing_step_value of Biocaml_internal_utils.Pos.t * string
| `unrecognizable_line of Biocaml_internal_utils.Pos.t * string list
| `wrong_bed_graph_value of Biocaml_internal_utils.Pos.t * string
| `wrong_browser_position of Biocaml_internal_utils.Pos.t * string
| `wrong_fixed_step_value of Biocaml_internal_utils.Pos.t * string
| `wrong_key_value_format of (string * string) list * string * string
| `wrong_span_value of Biocaml_internal_utils.Pos.t * string
| `wrong_start_value of Biocaml_internal_utils.Pos.t * string
| `wrong_step_value of Biocaml_internal_utils.Pos.t * string
| `wrong_variable_step_value of Biocaml_internal_utils.Pos.t * string ])
Biocaml_internal_utils.Result.t)
Biocaml_transform.t
val wig_to_string : unit ->
([ `bed_graph_value of Biocaml_wig.bed_graph_value
| `browser of
[ `hide of [ `all ]
| `position of string * int * int
| `unknown of string ]
| `comment of string
| `fixed_step_state_change of string * int * int * int option
| `fixed_step_value of float
| `track of (string * string) list
| `variable_step_state_change of string * int option
| `variable_step_value of int * float ], string)
Biocaml_transform.t
val string_to_gff : ?filename:string ->
tags:Biocaml_gff.Tags.t ->
unit ->
(string,
([ `browser of
[ `hide of [ `all ]
| `position of string * int * int
| `unknown of string ]
| `comment of string
| `record of Biocaml_gff.record
| `track of (string * string) list ],
[> `cannot_parse_float of Biocaml_internal_utils.Pos.t * string
| `cannot_parse_int of Biocaml_internal_utils.Pos.t * string
| `cannot_parse_strand of Biocaml_internal_utils.Pos.t * string
| `cannot_parse_string of Biocaml_internal_utils.Pos.t * string
| `empty_line of Biocaml_internal_utils.Pos.t
| `incomplete_input of
Biocaml_internal_utils.Pos.t * string list * string option
| `wrong_attributes of Biocaml_internal_utils.Pos.t * string
| `wrong_browser_position of Biocaml_internal_utils.Pos.t * string
| `wrong_key_value_format of (string * string) list * string * string
| `wrong_row of Biocaml_internal_utils.Pos.t * string
| `wrong_url_escaping of Biocaml_internal_utils.Pos.t * string ])
Biocaml_internal_utils.Result.t)
Biocaml_transform.t
val gff_to_string : tags:Biocaml_gff.Tags.t ->
unit ->
([ `browser of
[ `hide of [ `all ]
| `position of string * int * int
| `unknown of string ]
| `comment of string
| `record of Biocaml_gff.record
| `track of (string * string) list ], string)
Biocaml_transform.t
val string_to_bed : ?filename:string ->
?more_columns:Biocaml_bed.parsing_spec ->
unit ->
(string,
([ `browser of
[ `hide of [ `all ]
| `position of string * int * int
| `unknown of string ]
| `comment of string
| `content of Biocaml_bed.item
| `track of (string * string) list ],
[> `bed of Biocaml_bed.Error.parsing_base
| `incomplete_input of
Biocaml_internal_utils.Pos.t * string list * string option
| `wrong_browser_position of Biocaml_internal_utils.Pos.t * string
| `wrong_key_value_format of (string * string) list * string * string ])
Biocaml_internal_utils.Result.t)
Biocaml_transform.t
val bed_to_string : unit ->
([ `browser of
[ `hide of [ `all ]
| `position of string * int * int
| `unknown of string ]
| `comment of string
| `content of Biocaml_bed.item
| `track of (string * string) list ], string)
Biocaml_transform.t
end
end