Skip to content

Commit

Permalink
Adding identity to CSV.
Browse files Browse the repository at this point in the history
  • Loading branch information
matsen committed Dec 29, 2016
1 parent cb55169 commit 0700302
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pplacer_src/guppy_to_csv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ object (self)
|> List.cons
["origin"; "name"; "multiplicity"; "edge_num"; "like_weight_ratio";
"post_prob"; "likelihood"; "marginal_like"; "distal_length";
"pendant_length"; "classification"; "map_ratio"; "map_overlap"]
"pendant_length"; "classification"; "map_ratio"; "map_overlap";
"map_identity"]
|> self#write_ll_tab

end
4 changes: 3 additions & 1 deletion pplacer_src/placement.ml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ let to_strl_gen fint ffloat ftaxid default place =
let map_ratio, map_overlap =
Option.map_default (Tuple2.map some some) (None, None) place.map_identity
(* eta expansion !! *)
and fopt f xo = Option.map_default f default xo in
and fopt f xo = Option.map_default f default xo
and fidentity x = ffloat (fst x) in
[
fint place.location;
ffloat place.ml_ratio;
Expand All @@ -153,6 +154,7 @@ let to_strl_gen fint ffloat ftaxid default place =
fopt ftaxid place.classif;
fopt ffloat map_ratio;
fopt fint map_overlap;
fopt fidentity place.map_identity;
]

let to_strl =
Expand Down

0 comments on commit 0700302

Please sign in to comment.