package biocaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=497e3f2f7128a6ca347d66848da38a3d
sha512=4a76ebbafda3bc944afaff40d69791dfe153a0638ef5d7e6e1bc962b7f991d9545cd0af2d7930b39f8b31dbf067d0603cfa03d9b7a49396ab1ae452df47fd1f3
doc/biocaml.ez/Biocaml_ez/Sam/index.html
Module Biocaml_ez.Sam
include module type of struct include Biocaml_unix.Sam end
Types
Header Types
Header item tags define the different types of header lines. The term "tag" in this context should not be confused with its use in "tag-value" pairs, which comprise the content of header items.
val sexp_of_header_item_tag : header_item_tag -> Ppx_sexp_conv_lib.Sexp.tval header_item_tag_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> header_item_tagval __header_item_tag_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> header_item_tagA tag-value pair comprising the content of header items. Tag-value pairs occur in other places too, but this type is specifically for those in the header.
val sexp_of_tag_value : tag_value -> Ppx_sexp_conv_lib.Sexp.tval tag_value_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> tag_valueval sexp_of_sort_order : sort_order -> Ppx_sexp_conv_lib.Sexp.tval sort_order_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> sort_orderval __sort_order_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> sort_orderval sexp_of_group_order : group_order -> Ppx_sexp_conv_lib.Sexp.tval group_order_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group_orderval __group_order_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> group_ordertype header_line = private Biocaml_unix.Sam.header_line = {version : string;(*VN
*)sort_order : sort_order option;(*SO
*)group_order : group_order option;(*GO
*)
}@HD. A header consists of different types of lines. Confusingly, one of these types is called the "header line", which is what this type refers to. It does not refer generically to any line within a header.
val sexp_of_header_line : header_line -> Ppx_sexp_conv_lib.Sexp.tval header_line_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> header_linetype ref_seq = private Biocaml_unix.Sam.ref_seq = {name : string;(*SN
*)length : int;(*LN
*)assembly : string option;(*AS
*)md5 : string option;(*M5
*)species : string option;(*SP
*)uri : string option;(*UR
*)
}@SQ. Reference sequence.
val sexp_of_ref_seq : ref_seq -> Ppx_sexp_conv_lib.Sexp.tval ref_seq_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> ref_seqval sexp_of_platform : platform -> Ppx_sexp_conv_lib.Sexp.tval platform_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> platformval __platform_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> platformtype read_group = private Biocaml_unix.Sam.read_group = {id : string;(*ID
*)seq_center : string option;(*CN
*)description : string option;(*DS
*)run_date : [ `Date of string | `Time of string ] option;(*DT
*)flow_order : string option;(*FO
*)key_seq : string option;(*KS
*)library : string option;(*LB
*)program : string option;(*PG
*)predicted_median_insert_size : int option;(*PI
*)platform : platform option;(*PL
*)platform_unit : string option;(*PU
*)sample : string option;(*SM
*)
}@RG.
val sexp_of_read_group : read_group -> Ppx_sexp_conv_lib.Sexp.tval read_group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> read_grouptype program = private Biocaml_unix.Sam.program = {id : string;(*ID
*)name : string option;(*PN
*)command_line : string option;(*CL
*)previous_id : string option;(*PP
*)description : string option;(*DS
*)version : string option;(*VN
*)
}@PG.
val sexp_of_program : program -> Ppx_sexp_conv_lib.Sexp.tval program_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> programtype header_item = private [< | `HD of header_line| `SQ of ref_seq| `RG of read_group| `PG of program| `CO of string| `Other of string * tag_value list
]val sexp_of_header_item : header_item -> Ppx_sexp_conv_lib.Sexp.tval header_item_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> header_itemval __header_item_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> header_itemtype header = private Biocaml_unix.Sam.header = {version : string option;sort_order : sort_order option;group_order : group_order option;ref_seqs : ref_seq list;read_groups : read_group list;programs : program list;comments : string list;others : (string * tag_value list) list;
}sort_order: Guaranteed to beNoneifversion = None.
ref_seqs: List of @SQ items. Order matters; it dictates alignment sorting order whensort_order = `Coordinate.
read_groups: Unordered list of @RG items.
programs: List of @PG lines. Currently unordered, but we should topologically sort.
comments: Unordered list of @CO lines.
val empty_header : headermodule Flags = Biocaml_unix.Sam.Flagstype cigar_op = private [< | `Alignment_match of int| `Insertion of int| `Deletion of int| `Skipped of int| `Soft_clipping of int| `Hard_clipping of int| `Padding of int| `Seq_match of int| `Seq_mismatch of int
]CIGAR operations.
val sexp_of_cigar_op : cigar_op -> Ppx_sexp_conv_lib.Sexp.tval cigar_op_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> cigar_opval __cigar_op_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> cigar_optype optional_field_value = private [< | `A of char| `i of Core_kernel.Int64.t| `f of float| `Z of string| `H of string| `B of char * string list
]The constructor encodes the TYPE and each carries its corresponding VALUE.
val sexp_of_optional_field_value :
optional_field_value ->
Ppx_sexp_conv_lib.Sexp.tval optional_field_value_of_sexp :
Ppx_sexp_conv_lib.Sexp.t ->
optional_field_valueval __optional_field_value_of_sexp__ :
Ppx_sexp_conv_lib.Sexp.t ->
optional_field_valuetype optional_field = private Biocaml_unix.Sam.optional_field = {tag : string;value : optional_field_value;
}val sexp_of_optional_field : optional_field -> Ppx_sexp_conv_lib.Sexp.tval optional_field_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> optional_fieldval sexp_of_rnext : rnext -> Ppx_sexp_conv_lib.Sexp.tval rnext_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> rnextval __rnext_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> rnexttype alignment = private Biocaml_unix.Sam.alignment = {qname : string option;(*QNAME
*)flags : Flags.t;(*FLAG
*)rname : string option;(*RNAME
*)pos : int option;(*POS
*)mapq : int option;(*MAPQ
*)cigar : cigar_op list;(*CIGAR
*)rnext : rnext option;(*RNEXT
*)pnext : int option;(*PNEXT
*)tlen : int option;(*TLEN
*)seq : string option;(*SEQ
*)qual : Biocaml_unix.Phred_score.t list;(*QUAL
*)optional_fields : optional_field list;
}For cigar and qual, empty list indicates no value, i.e. '*', was given.
val sexp_of_alignment : alignment -> Ppx_sexp_conv_lib.Sexp.tval alignment_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> alignmentmodule MakeIO = Biocaml_unix.Sam.MakeIOinclude sig ... end
val write :
Biocaml_unix.Future_unix.Writer.t ->
?header:header ->
alignment Biocaml_unix.Future_unix.Pipe.Reader.t ->
unit Biocaml_unix.Future_unix.Deferred.tval write_file :
?perm:int ->
?append:bool ->
string ->
?header:header ->
alignment Biocaml_unix.Future_unix.Pipe.Reader.t ->
unit Biocaml_unix.Future_unix.Deferred.tLow-level Parsers and Constructors
val header_line :
version:string ->
?sort_order:sort_order ->
?group_order:group_order ->
unit ->
header_line Core_kernel.Or_error.tLow-level Header Parsers and Constructors
val ref_seq :
name:string ->
length:int ->
?assembly:string ->
?md5:string ->
?species:string ->
?uri:string ->
unit ->
ref_seq Core_kernel.Or_error.tval read_group :
id:string ->
?seq_center:string ->
?description:string ->
?run_date:string ->
?flow_order:string ->
?key_seq:string ->
?library:string ->
?program:string ->
?predicted_median_insert_size:int ->
?platform:platform ->
?platform_unit:string ->
?sample:string ->
unit ->
read_group Core_kernel.Or_error.tThe run_date string will be parsed as a Date.t or Time.t, whichever is possible. If it is a time without a timezone, local timezone will be assumed.
val header :
?version:string ->
?sort_order:sort_order ->
?group_order:group_order ->
?ref_seqs:ref_seq list ->
?read_groups:read_group list ->
?programs:program list ->
?comments:string list ->
?others:(string * tag_value list) list ->
unit ->
header Core_kernel.Or_error.tval parse_header_item_tag : string -> header_item_tag Core_kernel.Or_error.tval parse_tag_value : string -> tag_value Core_kernel.Or_error.tval parse_sort_order : string -> sort_order Core_kernel.Or_error.tval parse_header_line : tag_value list -> header_line Core_kernel.Or_error.tval parse_platform : string -> platform Core_kernel.Or_error.tval parse_read_group : tag_value list -> read_group Core_kernel.Or_error.tval parse_header_item :
Biocaml_unix.Line.t ->
header_item Core_kernel.Or_error.tval parse_header : string -> header Core_kernel.Or_error.tval cigar_op_alignment_match : int -> cigar_op Core_kernel.Or_error.tLow-level Optional field Parsers and Constructors
val cigar_op_insertion : int -> cigar_op Core_kernel.Or_error.tval cigar_op_deletion : int -> cigar_op Core_kernel.Or_error.tval cigar_op_skipped : int -> cigar_op Core_kernel.Or_error.tval cigar_op_soft_clipping : int -> cigar_op Core_kernel.Or_error.tval cigar_op_hard_clipping : int -> cigar_op Core_kernel.Or_error.tval cigar_op_padding : int -> cigar_op Core_kernel.Or_error.tval cigar_op_seq_match : int -> cigar_op Core_kernel.Or_error.tval cigar_op_seq_mismatch : int -> cigar_op Core_kernel.Or_error.tval optional_field_value_A :
char ->
optional_field_value Core_kernel.Or_error.tLow-level Optional field Parsers and Constructors
val optional_field_value_i : Core_kernel.Int64.t -> optional_field_valueval optional_field_value_f : float -> optional_field_valueval optional_field_value_Z :
string ->
optional_field_value Core_kernel.Or_error.tval optional_field_value_H :
string ->
optional_field_value Core_kernel.Or_error.tval optional_field_value_B :
char ->
string list ->
optional_field_value Core_kernel.Or_error.tval optional_field :
string ->
optional_field_value ->
optional_field Core_kernel.Or_error.tval parse_optional_field_value :
string ->
optional_field_value Core_kernel.Or_error.tval parse_optional_field : string -> optional_field Core_kernel.Or_error.tval alignment :
?ref_seqs:Core_kernel.String.Set.t ->
?qname:string ->
flags:Flags.t ->
?rname:string ->
?pos:int ->
?mapq:int ->
?cigar:cigar_op list ->
?rnext:rnext ->
?pnext:int ->
?tlen:int ->
?seq:string ->
?qual:Biocaml_unix.Phred_score.t list ->
?optional_fields:optional_field list ->
unit ->
alignment Core_kernel.Or_error.tLow-level Alignment Parsers and Constructors
val parse_flags : string -> Flags.t Core_kernel.Or_error.tval parse_cigar : string -> cigar_op list Core_kernel.Or_error.tval parse_rnext : string -> rnext option Core_kernel.Or_error.tval parse_qual :
string ->
Biocaml_unix.Phred_score.t list Core_kernel.Or_error.tval parse_alignment :
?ref_seqs:Core_kernel.String.Set.t ->
Biocaml_unix.Line.t ->
alignment Core_kernel.Or_error.tLow-level Printers
val print_header_item_tag : header_item_tag -> stringLow-level Header Printers
val print_tag_value : tag_value -> stringval print_sort_order : sort_order -> stringval print_header_line : header_line -> stringval print_ref_seq : ref_seq -> stringval print_platform : platform -> stringval print_read_group : read_group -> stringval print_program : program -> stringval print_other : (string * tag_value list) -> stringval print_flags : Flags.t -> stringval print_cigar_op : cigar_op -> stringval print_cigar : cigar_op list -> stringval print_rnext : rnext option -> stringval print_qual : Biocaml_unix.Phred_score.t list -> stringval print_optional_field : optional_field -> stringval print_alignment : alignment -> stringval read :
?start:Biocaml_unix.Pos.t ->
Biocaml_unix.Future_unix.Reader.t ->
header * alignment CFStream.Stream.t