Meta-information about files and their formats.
module Biocaml_tags:
sig
typefile_format =
[ `bam
| `bed
| `fasta of Biocaml_fasta.Tags.t
| `fastq
| `gff of Biocaml_gff.Tags.t
| `gzip of file_format
| `raw_zip of file_format
| `sam
| `table of Biocaml_table.Row.Tags.t
| `wig of Biocaml_wig.Tags.t ]
typet =
[ `bam
| `bed
| `fasta of Biocaml_fasta.Tags.t
| `fastq
| `gff of Biocaml_gff.Tags.t
| `gzip of file_format
| `list of t list
| `raw_zip of file_format
| `sam
| `table of Biocaml_table.Row.Tags.t
| `wig of Biocaml_wig.Tags.t ]
val to_tag : file_format -> t
val default_extension : file_format -> string
default_extension (`gzip (`fasta `char))
will be
"fasta.gz"
.val default_extensions : t -> string list
default_extension
but for potentially multiple file-formats.val add_extensions : t ->
string list ->
(string list * string list, [> `tags of [> `not_enough_filenames ] ])
Core.Result.t
tags
value and a list of file-base-names add
extensions to the files, and return also the base-names not touched.
If t
involves n file-formats, add_extensions t fl
will add
extensions to the first n files of fl
and return also the
untouched base-names:
(files_with_extensions, remaingin_base_names)
.
If there are not enough base-names, the result is the error
`tags `not_enough_filenames
.val guess_from_filename : string ->
(file_format,
[> `extension_absent | `extension_unknown of string ])
Core.Result.t
val of_string : string -> (t, [> `parse_tags of exn ]) Core.Result.t
module Output_transform:
sig
typeoutput_error =
[ `bam of Biocaml_bam.Error.item_to_raw
| `fastq of [ `cannot_convert_ascii_phred_score of string ]
| `sam of Biocaml_sam.Error.item_to_raw ]
Biocaml_sam.item
values.
(the other output transforms are error-free).Biocaml_tags.t
= Tags.t
for this module.typet =
[ `bed_to_file of (Biocaml_bed.item, string) Biocaml_transform.t
| `char_fasta_to_file of
(Biocaml_fasta.char_seq Biocaml_fasta.raw_item, string)
Biocaml_transform.t
| `fastq_to_file of (Biocaml_fastq.item, string) Biocaml_transform.t
| `fastq_to_two_files of
(Biocaml_fastq.item,
(string * string, output_error)
Core.Result.t)
Biocaml_transform.t
| `gff_to_file of (Biocaml_gff.item, string) Biocaml_transform.t
| `int_fasta_to_file of
(Biocaml_fasta.int_seq Biocaml_fasta.raw_item, string)
Biocaml_transform.t
| `sam_item_to_file of
(Biocaml_sam.item,
(string, output_error) Core.Result.t)
Biocaml_transform.t
| `table_to_file of (Biocaml_table.Row.t, string) Biocaml_transform.t
| `wig_to_file of (Biocaml_wig.item, string) Biocaml_transform.t ]
?zip_level:int ->
?zlib_buffer_size:int ->
tags ->
(t, [> `not_implemented of string ])
Biocaml_internal_pervasives.Result.t
: Output_transform.t
from file tags.val sexp_of_output_error : output_error -> Sexplib.Sexp.t
end
module Input_transform:
sig
typeinput_error =
[ `bam of Biocaml_bam.Error.raw_bam
| `bam_to_item of Biocaml_bam.Error.raw_to_item
| `bed of Biocaml_bed.Error.parsing
| `fasta of Biocaml_fasta.Error.t
| `fasta_lengths_mismatch
| `fastq of Biocaml_fastq.Error.t
| `gff of Biocaml_gff.Error.parsing
| `sam of Biocaml_sam.Error.string_to_raw
| `sam_to_item of Biocaml_sam.Error.raw_to_item
| `table_row of Biocaml_table.Row.Error.t
| `unzip of Biocaml_zip.Error.unzip
| `wig of Biocaml_wig.Error.parsing ]
Biocaml_tags.t
= Tags.t
.typet =
[ `file_to_bed of
(string,
(Biocaml_bed.item, input_error)
Core.Result.t)
Biocaml_transform.t
| `file_to_char_fasta of
(string,
(Biocaml_fasta.char_seq Biocaml_fasta.raw_item,
input_error)
Core.Result.t)
Biocaml_transform.t
| `file_to_fastq of
(string,
(Biocaml_fastq.item, input_error)
Core.Result.t)
Biocaml_transform.t
| `file_to_gff of
(string,
(Biocaml_gff.item, input_error)
Core.Result.t)
Biocaml_transform.t
| `file_to_int_fasta of
(string,
(Biocaml_fasta.int_seq Biocaml_fasta.raw_item,
input_error)
Core.Result.t)
Biocaml_transform.t
| `file_to_sam_item of
(string,
(Biocaml_sam.item, input_error)
Core.Result.t)
Biocaml_transform.t
| `file_to_table of
(string,
(Biocaml_table.Row.t, input_error)
Core.Result.t)
Biocaml_transform.t
| `file_to_wig of
(string,
(Biocaml_wig.item, input_error)
Core.Result.t)
Biocaml_transform.t
| `two_files_to_fastq of
(string * string,
(Biocaml_fastq.item, input_error)
Core.Result.t)
Biocaml_transform.t ]
?zlib_buffer_size:int ->
tags ->
(t, [> `not_implemented of string ])
Core.Result.t
: Input_transform.t
from tags
describing the format.val sexp_of_input_error : input_error -> Sexplib.Sexp.t
end
val file_format_of_sexp : Sexplib.Sexp.t -> file_format
val sexp_of_file_format : file_format -> Sexplib.Sexp.t
include Core.Sexpable.S
end