struct
type t = {
locus : string option ;
allele : string option ;
desc : string option ;
maploc : string option ;
pseudo : bool option ;
db : Dbtag.t list ;
}
let of_xml t =
let t = echild_exn "Gene-ref" t in
{
locus = sleaf "Gene-ref_locus" t ;
allele = sleaf "Gene-ref_allele" t ;
desc = sleaf "Gene-ref_desc" t ;
maploc = sleaf "Gene-ref_maploc" t ;
pseudo = Option.bind (echild "Gene-ref_pseudo" t) (battr "value") ;
db =
Option.value_map
(echild "Gene-ref_db" t)
~default:[]
~f:(map_echildren ~tag:"Dbtag" Dbtag.of_xml) ;
}
end