Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit fd5f4556 authored by Philippe Veber's avatar Philippe Veber
Browse files

toolbox/Candidate_site.draw: draw amino acids

parent 753d8b10
......@@ -89,14 +89,19 @@ let collapsed_tree ~f t =
and branch (Branch b) = Tree.branch b.data (tree b.tip) in
tree (tree_add_cond_at_leaves t)
let ratio = 8.
let ratio = 4.
let draw_profile ~col xs =
let open Biotk_croquis.Croquis in
let n = Array.length xs in
List.init n ~f:(fun i ->
let x = float i /. ratio in
Picture.rect ~fill:col ~xmin:x ~xmax:(x +. 1. /. (ratio +. 1.)) ~ymin:0. ~ymax:xs.(i) ()
let xtext = (x +. x +. 1. /. (ratio +. 1.)) /. 2. in
let aa = Amino_acid.(to_char (of_int_exn i)) |> Char.to_string in
Picture.blend [
Picture.text ~x:xtext ~y:0. ~valign:`base ~halign:`middle ~size:0.2 aa ;
Picture.rect ~fill:col ~xmin:x ~xmax:(x +. 1. /. (ratio +. 1.)) ~ymin:0. ~ymax:xs.(i) () ;
]
)
|> Picture.blend
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment