package bio_io

  1. Overview
  2. Docs

Parsing tab-delimited homology search results (btab, blast-tab, BLAST outfmt 6)

Each query-target alignment (hit) is a single record. See Btab_queries if you want to treat queries as records.

Example

Here is a small example program.

open! Base

let parse_argv () =
  match Sys.get_argv () with
  | [| _; file_name |] -> file_name
  | _ -> failwith "missing file_name"

let file_name = parse_argv ()

let () =
  let open Bio_io.Btab in
  In_channel.with_file_iter_records_exn file_name ~f:(fun r ->
      Stdio.printf "%s => %s (%.3f)\n" (Record.query r) (Record.target r)
        (Record.bits r))

Modules

module Record : sig ... end

A record type for Btab (Blast-tab) files

module In_channel : sig ... end

In_channel for Btab records.