sig
type raw_alignment = {
qname : string;
flag : int;
rname : string;
pos : int;
mapq : int;
cigar : string;
rnext : string;
pnext : int;
tlen : int;
seq : string;
qual : string;
optional : (string * char * string) list;
}
type raw_item =
[ `alignment of Biocaml_sam_deprecated.raw_alignment
| `comment of string
| `header of string * (string * string) list ]
type reference_sequence = {
ref_name : string;
ref_length : int;
ref_assembly_identifier : string option;
ref_checksum : string option;
ref_species : string option;
ref_uri : string option;
ref_unknown : (string * string) list;
}
val reference_sequence :
?assembly_identifier:string ->
?checksum:string ->
?species:string ->
?uri:string ->
?unknown_data:(string * string) list ->
string -> int -> Biocaml_sam_deprecated.reference_sequence
module Flags :
sig
type t = private int
val of_int : int -> Biocaml_sam_deprecated.Flags.t
val has_multiple_segments : Biocaml_sam_deprecated.Flags.t -> bool
val each_segment_properly_aligned :
Biocaml_sam_deprecated.Flags.t -> bool
val segment_unmapped : Biocaml_sam_deprecated.Flags.t -> bool
val next_segment_unmapped : Biocaml_sam_deprecated.Flags.t -> bool
val seq_is_reverse_complemented :
Biocaml_sam_deprecated.Flags.t -> bool
val next_seq_is_reverse_complemented :
Biocaml_sam_deprecated.Flags.t -> bool
val first_segment : Biocaml_sam_deprecated.Flags.t -> bool
val last_segment : Biocaml_sam_deprecated.Flags.t -> bool
val secondary_alignment : Biocaml_sam_deprecated.Flags.t -> bool
val not_passing_quality_controls :
Biocaml_sam_deprecated.Flags.t -> bool
val pcr_or_optical_duplicate : Biocaml_sam_deprecated.Flags.t -> bool
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
type cigar_op =
[ `D of int
| `Eq of int
| `H of int
| `I of int
| `M of int
| `N of int
| `P of int
| `S of int
| `X of int ]
type optional_content_value =
[ `array of char * Biocaml_sam_deprecated.optional_content_value array
| `char of char
| `float of float
| `int of int
| `string of string ]
type optional_content =
(string * char * Biocaml_sam_deprecated.optional_content_value) list
type alignment = {
query_template_name : string;
flags : Biocaml_sam_deprecated.Flags.t;
reference_sequence :
[ `name of string
| `none
| `reference_sequence of Biocaml_sam_deprecated.reference_sequence ];
position : int option;
mapping_quality : int option;
cigar_operations : Biocaml_sam_deprecated.cigar_op array;
next_reference_sequence :
[ `name of string
| `none
| `qname
| `reference_sequence of Biocaml_sam_deprecated.reference_sequence ];
next_position : int option;
template_length : int option;
sequence : [ `none | `reference | `string of string ];
quality : Biocaml_phred_score.t array;
optional_content : Biocaml_sam_deprecated.optional_content;
}
type item =
[ `alignment of Biocaml_sam_deprecated.alignment
| `comment of string
| `header of string * (string * string) list
| `header_line of
string * [ `coordinate | `queryname | `unknown | `unsorted ] *
(string * string) list
| `reference_sequence_dictionary of
Biocaml_sam_deprecated.reference_sequence array ]
module Error :
sig
type optional_content_parsing =
[ `wrong_optional of
(string * char * string) list *
[ `not_a_char of string
| `not_a_float of string
| `not_an_int of string
| `unknown_type of char
| `wrong_array of
[ `not_a_char of string
| `not_a_float of string
| `not_an_int of string
| `unknown_type of char
| `wrong_type of string ]
| `wrong_type of string ] ]
type string_to_raw =
[ `incomplete_input of
Biocaml_internal_utils.Pos.t * string list * string option
| `invalid_header_tag of Biocaml_internal_utils.Pos.t * string
| `invalid_tag_value_list of
Biocaml_internal_utils.Pos.t * string list
| `not_an_int of Biocaml_internal_utils.Pos.t * string * string
| `wrong_alignment of Biocaml_internal_utils.Pos.t * string
| `wrong_optional_field of Biocaml_internal_utils.Pos.t * string ]
type raw_to_item =
[ `comment_after_end_of_header of int * string
| `duplicate_in_reference_sequence_dictionary of
Biocaml_sam_deprecated.reference_sequence array
| `header_after_end_of_header of
int * (string * (string * string) list)
| `header_line_not_first of int
| `header_line_without_version of (string * string) list
| `header_line_wrong_sorting of string
| `missing_ref_sequence_length of (string * string) list
| `missing_ref_sequence_name of (string * string) list
| `wrong_cigar_text of string
| `wrong_flag of Biocaml_sam_deprecated.raw_alignment
| `wrong_mapq of Biocaml_sam_deprecated.raw_alignment
| `wrong_optional of
(string * char * string) list *
[ `not_a_char of string
| `not_a_float of string
| `not_an_int of string
| `unknown_type of char
| `wrong_array of
[ `not_a_char of string
| `not_a_float of string
| `not_an_int of string
| `unknown_type of char
| `wrong_type of string ]
| `wrong_type of string ]
| `wrong_phred_scores of Biocaml_sam_deprecated.raw_alignment
| `wrong_pnext of Biocaml_sam_deprecated.raw_alignment
| `wrong_pos of Biocaml_sam_deprecated.raw_alignment
| `wrong_qname of Biocaml_sam_deprecated.raw_alignment
| `wrong_ref_sequence_length of (string * string) list
| `wrong_tlen of Biocaml_sam_deprecated.raw_alignment ]
type item_to_raw =
[ `wrong_phred_scores of Biocaml_sam_deprecated.alignment ]
type parse =
[ `comment_after_end_of_header of int * string
| `duplicate_in_reference_sequence_dictionary of
Biocaml_sam_deprecated.reference_sequence array
| `header_after_end_of_header of
int * (string * (string * string) list)
| `header_line_not_first of int
| `header_line_without_version of (string * string) list
| `header_line_wrong_sorting of string
| `incomplete_input of
Biocaml_internal_utils.Pos.t * string list * string option
| `invalid_header_tag of Biocaml_internal_utils.Pos.t * string
| `invalid_tag_value_list of
Biocaml_internal_utils.Pos.t * string list
| `missing_ref_sequence_length of (string * string) list
| `missing_ref_sequence_name of (string * string) list
| `not_an_int of Biocaml_internal_utils.Pos.t * string * string
| `wrong_alignment of Biocaml_internal_utils.Pos.t * string
| `wrong_cigar_text of string
| `wrong_flag of Biocaml_sam_deprecated.raw_alignment
| `wrong_mapq of Biocaml_sam_deprecated.raw_alignment
| `wrong_optional of
(string * char * string) list *
[ `not_a_char of string
| `not_a_float of string
| `not_an_int of string
| `unknown_type of char
| `wrong_array of
[ `not_a_char of string
| `not_a_float of string
| `not_an_int of string
| `unknown_type of char
| `wrong_type of string ]
| `wrong_type of string ]
| `wrong_optional_field of Biocaml_internal_utils.Pos.t * string
| `wrong_phred_scores of Biocaml_sam_deprecated.raw_alignment
| `wrong_pnext of Biocaml_sam_deprecated.raw_alignment
| `wrong_pos of Biocaml_sam_deprecated.raw_alignment
| `wrong_qname of Biocaml_sam_deprecated.raw_alignment
| `wrong_ref_sequence_length of (string * string) list
| `wrong_tlen of Biocaml_sam_deprecated.raw_alignment ]
type t = Biocaml_sam_deprecated.Error.parse
val optional_content_parsing_of_sexp :
Sexplib.Sexp.t ->
Biocaml_sam_deprecated.Error.optional_content_parsing
val sexp_of_optional_content_parsing :
Biocaml_sam_deprecated.Error.optional_content_parsing ->
Sexplib.Sexp.t
val string_to_raw_of_sexp :
Sexplib.Sexp.t -> Biocaml_sam_deprecated.Error.string_to_raw
val sexp_of_string_to_raw :
Biocaml_sam_deprecated.Error.string_to_raw -> Sexplib.Sexp.t
val raw_to_item_of_sexp :
Sexplib.Sexp.t -> Biocaml_sam_deprecated.Error.raw_to_item
val sexp_of_raw_to_item :
Biocaml_sam_deprecated.Error.raw_to_item -> Sexplib.Sexp.t
val item_to_raw_of_sexp :
Sexplib.Sexp.t -> Biocaml_sam_deprecated.Error.item_to_raw
val sexp_of_item_to_raw :
Biocaml_sam_deprecated.Error.item_to_raw -> Sexplib.Sexp.t
val parse_of_sexp :
Sexplib.Sexp.t -> Biocaml_sam_deprecated.Error.parse
val sexp_of_parse :
Biocaml_sam_deprecated.Error.parse -> Sexplib.Sexp.t
val t_of_sexp : Sexplib.Sexp.t -> Biocaml_sam_deprecated.Error.parse
val sexp_of_t : Biocaml_sam_deprecated.Error.parse -> Sexplib.Sexp.t
end
exception Error of Biocaml_sam_deprecated.Error.t
val in_channel_to_item_stream :
?buffer_size:int ->
?filename:string ->
Pervasives.in_channel ->
(Biocaml_sam_deprecated.item, [> Biocaml_sam_deprecated.Error.parse ])
Biocaml_internal_utils.Result.t Biocaml_internal_utils.Stream.t
val in_channel_to_raw_item_stream :
?buffer_size:int ->
?filename:string ->
Pervasives.in_channel ->
(Biocaml_sam_deprecated.raw_item,
[> Biocaml_sam_deprecated.Error.parse ])
Biocaml_internal_utils.Result.t Biocaml_internal_utils.Stream.t
val in_channel_to_item_stream_exn :
?buffer_size:int ->
?filename:string ->
Pervasives.in_channel ->
Biocaml_sam_deprecated.item Biocaml_internal_utils.Stream.t
val in_channel_to_raw_item_stream_exn :
?buffer_size:int ->
?filename:string ->
Pervasives.in_channel ->
Biocaml_sam_deprecated.raw_item Biocaml_internal_utils.Stream.t
val parse_cigar_text :
string ->
(Biocaml_sam_deprecated.cigar_op array, [> `wrong_cigar_text of string ])
Biocaml_internal_utils.Result.t
val parse_optional_content :
(string * char * string) list ->
(Biocaml_sam_deprecated.optional_content,
[> Biocaml_sam_deprecated.Error.optional_content_parsing ])
Biocaml_internal_utils.Result.t
val parse_header_line :
'a ->
string ->
([> `comment of string | `header of string * (string * string) list ],
[> `invalid_header_tag of 'a * string
| `invalid_tag_value_list of 'a * string list ])
Biocaml_internal_utils.Result.t
val expand_header_line :
(string * string) list ->
([> `header_line of
string * [ `coordinate | `queryname | `unknown | `unsorted ] *
(string * string) list ],
[> `header_line_without_version of (string * string) list
| `header_line_wrong_sorting of string ])
Biocaml_internal_utils.Result.t
module Transform :
sig
val string_to_raw :
?filename:string ->
unit ->
(string,
(Biocaml_sam_deprecated.raw_item,
[> Biocaml_sam_deprecated.Error.string_to_raw ])
Biocaml_internal_utils.Result.t)
Biocaml_transform.t
val raw_to_string :
unit -> (Biocaml_sam_deprecated.raw_item, string) Biocaml_transform.t
val raw_to_item :
unit ->
(Biocaml_sam_deprecated.raw_item,
(Biocaml_sam_deprecated.item,
[> Biocaml_sam_deprecated.Error.raw_to_item ])
Biocaml_internal_utils.Result.t)
Biocaml_transform.t
val item_to_raw :
unit ->
(Biocaml_sam_deprecated.item,
(Biocaml_sam_deprecated.raw_item,
[> Biocaml_sam_deprecated.Error.item_to_raw ])
Biocaml_internal_utils.Result.t)
Biocaml_transform.t
end
val cigar_op_of_sexp : Sexplib.Sexp.t -> Biocaml_sam_deprecated.cigar_op
val sexp_of_cigar_op : Biocaml_sam_deprecated.cigar_op -> Sexplib.Sexp.t
val optional_content_value_of_sexp :
Sexplib.Sexp.t -> Biocaml_sam_deprecated.optional_content_value
val sexp_of_optional_content_value :
Biocaml_sam_deprecated.optional_content_value -> Sexplib.Sexp.t
val optional_content_of_sexp :
Sexplib.Sexp.t -> Biocaml_sam_deprecated.optional_content
val sexp_of_optional_content :
Biocaml_sam_deprecated.optional_content -> Sexplib.Sexp.t
val alignment_of_sexp : Sexplib.Sexp.t -> Biocaml_sam_deprecated.alignment
val sexp_of_alignment : Biocaml_sam_deprecated.alignment -> Sexplib.Sexp.t
val item_of_sexp : Sexplib.Sexp.t -> Biocaml_sam_deprecated.item
val sexp_of_item : Biocaml_sam_deprecated.item -> Sexplib.Sexp.t
end