package bio_io

  1. Overview
  2. Docs

Module Bio_io.BtabSource

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 file_name ~f:(fun r ->
        Stdio.printf "%s => %s (%.3f)\n" (Record.query r) (Record.target r)
          (Record.bits r) )

Modules

Sourcemodule Record : sig ... end

A record type for Btab (Blast-tab) files

Sourcemodule In_channel : sig ... end

In_channel for Btab records.