sig
type header_item_tag = Biocaml_sam.header_item_tag
type tag_value = Biocaml_sam.tag_value
type sort_order = [ `Coordinate | `Query_name | `Unknown | `Unsorted ]
type header_line =
Biocaml_sam.header_line = private {
version : string;
sort_order : sort_order option;
}
type ref_seq =
Biocaml_sam.ref_seq = private {
name : string;
length : int;
assembly : string option;
md5 : string option;
species : string option;
uri : string option;
}
type platform =
[ `Capillary
| `Helicos
| `Illumina
| `Ion_Torrent
| `LS454
| `Pac_Bio
| `Solid ]
type read_group =
Biocaml_sam.read_group = private {
id : string;
seq_center : string option;
description : string option;
run_date : [ `Date of Core.Std.Date.t | `Time of Core.Std.Time.t ] option;
flow_order : string option;
key_seq : string option;
library : string option;
program : string option;
predicted_median_insert_size : int option;
platform : platform option;
platform_unit : string option;
sample : string option;
}
type program =
Biocaml_sam.program = private {
id : string;
name : string option;
command_line : string option;
previous_id : string option;
description : string option;
version : string option;
}
type header_item = Biocaml_sam.header_item
type header =
Biocaml_sam.header = private {
version : string option;
sort_order : sort_order option;
ref_seqs : ref_seq list;
read_groups : read_group list;
programs : program list;
comments : string list;
others : (string * tag_value list) list;
}
val empty_header : header
module Flags :
sig
type t = Biocaml_sam.Flags.t
val of_int : int -> t Core.Std.Or_error.t
val has_multiple_segments : t -> bool
val each_segment_properly_aligned : t -> bool
val segment_unmapped : t -> bool
val next_segment_unmapped : t -> bool
val seq_is_reverse_complemented : t -> bool
val next_seq_is_reverse_complemented : t -> bool
val first_segment : t -> bool
val last_segment : t -> bool
val secondary_alignment : t -> bool
val not_passing_quality_controls : t -> bool
val pcr_or_optical_duplicate : t -> bool
val supplementary_alignment : t -> bool
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
type cigar_op = Biocaml_sam.cigar_op
type optional_field_value = Biocaml_sam.optional_field_value
type optional_field =
Biocaml_sam.optional_field = private {
tag : string;
value : optional_field_value;
}
type rnext = Biocaml_sam.rnext
type alignment =
Biocaml_sam.alignment = private {
qname : string option;
flags : Flags.t;
rname : string option;
pos : int option;
mapq : int option;
cigar : cigar_op list;
rnext : rnext option;
pnext : int option;
tlen : int option;
seq : string option;
qual : Biocaml_phred_score.t list;
optional_fields : optional_field list;
}
module MakeIO :
functor (Future : Future.S) ->
sig
val read :
?start:Biocaml_internal_utils.Pos.t ->
Future.Reader.t ->
(header * alignment Core.Std.Or_error.t Future.Pipe.Reader.t)
Core.Std.Or_error.t Future.Deferred.t
val write :
Future.Writer.t ->
?header:header ->
alignment Future.Pipe.Reader.t -> unit Future.Deferred.t
val write_file :
?perm:int ->
?append:bool ->
string ->
?header:header ->
alignment Future.Pipe.Reader.t -> unit Future.Deferred.t
end
val read :
?start:Biocaml_internal_utils.Pos.t ->
Future_std.Reader.t ->
(header * alignment Core.Std.Or_error.t Future_std.Pipe.Reader.t)
Core.Std.Or_error.t Future_std.Deferred.t
val write :
Future_std.Writer.t ->
?header:header ->
alignment Future_std.Pipe.Reader.t -> unit Future_std.Deferred.t
val write_file :
?perm:int ->
?append:bool ->
string ->
?header:header ->
alignment Future_std.Pipe.Reader.t -> unit Future_std.Deferred.t
val header_line :
version:string ->
?sort_order:sort_order -> unit -> header_line Core.Std.Or_error.t
val ref_seq :
name:string ->
length:int ->
?assembly:string ->
?md5:string ->
?species:string -> ?uri:string -> unit -> ref_seq Core.Std.Or_error.t
val 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.Std.Or_error.t
val header :
?version:string ->
?sort_order:sort_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.Std.Or_error.t
val parse_header_item_tag : string -> header_item_tag Core.Std.Or_error.t
val parse_tag_value : string -> tag_value Core.Std.Or_error.t
val parse_header_version : string -> string Core.Std.Or_error.t
val parse_sort_order : string -> sort_order Core.Std.Or_error.t
val parse_header_line : tag_value list -> header_line Core.Std.Or_error.t
val parse_ref_seq : tag_value list -> ref_seq Core.Std.Or_error.t
val parse_platform : string -> platform Core.Std.Or_error.t
val parse_read_group : tag_value list -> read_group Core.Std.Or_error.t
val parse_program : tag_value list -> program Core.Std.Or_error.t
val parse_header_item :
Biocaml_internal_utils.Line.t -> header_item Core.Std.Or_error.t
val parse_header : string -> header Core.Std.Or_error.t
val cigar_op_alignment_match : int -> cigar_op Core.Std.Or_error.t
val cigar_op_insertion : int -> cigar_op Core.Std.Or_error.t
val cigar_op_deletion : int -> cigar_op Core.Std.Or_error.t
val cigar_op_skipped : int -> cigar_op Core.Std.Or_error.t
val cigar_op_soft_clipping : int -> cigar_op Core.Std.Or_error.t
val cigar_op_hard_clipping : int -> cigar_op Core.Std.Or_error.t
val cigar_op_padding : int -> cigar_op Core.Std.Or_error.t
val cigar_op_seq_match : int -> cigar_op Core.Std.Or_error.t
val cigar_op_seq_mismatch : int -> cigar_op Core.Std.Or_error.t
val optional_field_value_A :
char -> optional_field_value Core.Std.Or_error.t
val optional_field_value_i : Core.Std.Int32.t -> optional_field_value
val optional_field_value_f : float -> optional_field_value
val optional_field_value_Z :
string -> optional_field_value Core.Std.Or_error.t
val optional_field_value_H :
string -> optional_field_value Core.Std.Or_error.t
val optional_field_value_B :
char -> string list -> optional_field_value Core.Std.Or_error.t
val optional_field :
string -> optional_field_value -> optional_field Core.Std.Or_error.t
val parse_optional_field_value :
string -> optional_field_value Core.Std.Or_error.t
val parse_optional_field : string -> optional_field Core.Std.Or_error.t
val alignment :
?ref_seqs:Core.Std.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_phred_score.t list ->
?optional_fields:optional_field list ->
unit -> alignment Core.Std.Or_error.t
val parse_qname : string -> string option Core.Std.Or_error.t
val parse_flags : string -> Flags.t Core.Std.Or_error.t
val parse_rname : string -> string option Core.Std.Or_error.t
val parse_pos : string -> int option Core.Std.Or_error.t
val parse_mapq : string -> int option Core.Std.Or_error.t
val parse_cigar : string -> cigar_op list Core.Std.Or_error.t
val parse_rnext : string -> rnext option Core.Std.Or_error.t
val parse_pnext : string -> int option Core.Std.Or_error.t
val parse_tlen : string -> int option Core.Std.Or_error.t
val parse_seq : string -> string option Core.Std.Or_error.t
val parse_qual : string -> Biocaml_phred_score.t list Core.Std.Or_error.t
val parse_alignment :
?ref_seqs:Core.Std.String.Set.t ->
Biocaml_internal_utils.Line.t -> alignment Core.Std.Or_error.t
val print_header_item_tag : header_item_tag -> string
val print_tag_value : tag_value -> string
val print_header_version : string -> string
val print_sort_order : sort_order -> string
val print_header_line : header_line -> string
val print_ref_seq : ref_seq -> string
val print_platform : platform -> string
val print_read_group : read_group -> string
val print_program : program -> string
val print_other : string * tag_value list -> string
val print_qname : string option -> string
val print_flags : Flags.t -> string
val print_rname : string option -> string
val print_pos : int option -> string
val print_mapq : int option -> string
val print_cigar_op : cigar_op -> string
val print_cigar : cigar_op list -> string
val print_rnext : rnext option -> string
val print_pnext : int option -> string
val print_tlen : int option -> string
val print_seq : string option -> string
val print_qual : Biocaml_phred_score.t list -> string
val print_optional_field : optional_field -> string
val print_alignment : alignment -> string
val header_item_tag_of_sexp : Sexplib.Sexp.t -> header_item_tag
val __header_item_tag_of_sexp__ : Sexplib.Sexp.t -> header_item_tag
val sexp_of_header_item_tag : header_item_tag -> Sexplib.Sexp.t
val tag_value_of_sexp : Sexplib.Sexp.t -> tag_value
val sexp_of_tag_value : tag_value -> Sexplib.Sexp.t
val sort_order_of_sexp : Sexplib.Sexp.t -> sort_order
val __sort_order_of_sexp__ : Sexplib.Sexp.t -> sort_order
val sexp_of_sort_order : sort_order -> Sexplib.Sexp.t
val header_line_of_sexp : Sexplib.Sexp.t -> header_line
val sexp_of_header_line : header_line -> Sexplib.Sexp.t
val ref_seq_of_sexp : Sexplib.Sexp.t -> ref_seq
val sexp_of_ref_seq : ref_seq -> Sexplib.Sexp.t
val platform_of_sexp : Sexplib.Sexp.t -> platform
val __platform_of_sexp__ : Sexplib.Sexp.t -> platform
val sexp_of_platform : platform -> Sexplib.Sexp.t
val read_group_of_sexp : Sexplib.Sexp.t -> read_group
val sexp_of_read_group : read_group -> Sexplib.Sexp.t
val program_of_sexp : Sexplib.Sexp.t -> program
val sexp_of_program : program -> Sexplib.Sexp.t
val header_item_of_sexp : Sexplib.Sexp.t -> header_item
val __header_item_of_sexp__ : Sexplib.Sexp.t -> header_item
val sexp_of_header_item : header_item -> Sexplib.Sexp.t
val cigar_op_of_sexp : Sexplib.Sexp.t -> cigar_op
val __cigar_op_of_sexp__ : Sexplib.Sexp.t -> cigar_op
val sexp_of_cigar_op : cigar_op -> Sexplib.Sexp.t
val optional_field_value_of_sexp : Sexplib.Sexp.t -> optional_field_value
val __optional_field_value_of_sexp__ :
Sexplib.Sexp.t -> optional_field_value
val sexp_of_optional_field_value : optional_field_value -> Sexplib.Sexp.t
val optional_field_of_sexp : Sexplib.Sexp.t -> optional_field
val sexp_of_optional_field : optional_field -> Sexplib.Sexp.t
val rnext_of_sexp : Sexplib.Sexp.t -> rnext
val __rnext_of_sexp__ : Sexplib.Sexp.t -> rnext
val sexp_of_rnext : rnext -> Sexplib.Sexp.t
val alignment_of_sexp : Sexplib.Sexp.t -> alignment
val sexp_of_alignment : alignment -> Sexplib.Sexp.t
end