package bio_io

  1. Overview
  2. Docs
A library for reading and writing common file formats used in bioinformatics like FASTA files

Install

Dune Dependency

Authors

Maintainers

Sources

0.7.0.tar.gz
md5=f1c5c5d9436a9572340b313043f3f96b
sha512=70f204e5b4bf7e3418efca8e6ca6d0bb446b0c1623be8410b014fc559901a7d333b22770c8a5344b5fd1c5d058ca9678d90e0b32fafdc429a7932209df81c5a2

Description

Published: 11 Sep 2023

README

Bio_io

Bio_io is an OCaml library that provides programmatic access to common file formats used in bioinformatics like FASTA files.

Quick Start

Install

opam install bio_io

Example

Read a FASTA file and print the ID and sequence length for each record.

open! Base

let fasta_file = "sequences.fasta"

let () =
  (* This open gives you [In_channel] and [Record]. *)
  let open Bio_io.Fasta in
  In_channel.with_file_iter_records fasta_file ~f:(fun record ->
      (* Print the ID and the length of the sequence. *)
      Stdio.printf "%s => %d\n" (Record.id record) (Record.seq_length record))

Docs

For more examples, API, and other usage info, see the docs.

License

Licensed under the Apache License, Version 2.0 or the MIT license, at your option. This program may not be copied, modified, or distributed except according to those terms.

Dependencies (7)

  1. stdio >= "v0.16"
  2. ppx_sexp_conv >= "v0.16"
  3. ppx_fields_conv >= "v0.16"
  4. ppx_compare >= "v0.16"
  5. ocaml >= "4.14"
  6. base >= "v0.16"
  7. dune >= "3.2"

Dev Dependencies (6)

  1. odoc with-doc
  2. re >= "1.10" & with-test
  3. ppx_inline_test >= "v0.16" & with-test
  4. ppx_expect >= "v0.16" & with-test
  5. base_quickcheck >= "v0.16" & with-test
  6. ppx_assert >= "v0.16" & with-test

Used by

None

Conflicts

None