file_formats.ml 1.37 KB
Newer Older
1 2 3 4 5 6 7 8
open Bistro.Std
open Bistro_bioinfo.Std

class type nhx = object
  inherit text_file
  method format : [`nhx]
end

Philippe Veber's avatar
Philippe Veber committed
9 10 11 12 13
class type diffsel_tree = object
  inherit text_file
  method format : [`diffsel_tree]
end

Philippe Veber's avatar
Philippe Veber committed
14 15 16 17
class type nucleotide_fasta = object
  inherit fasta
  method alphabet : [`Nucleotide]
end
18

19 20
class type aminoacid_fasta = object
  inherit fasta
Carine Rey's avatar
Carine Rey committed
21 22 23 24 25 26
  method alphabet : [`Aminoacid]
end

class type nucleotide_phylip = object
  inherit text_file
  method format : [`Nucleotide]
27 28 29 30 31
end


type parsed_input_tree

32 33 34 35 36 37
type output_parse_input_tree =
  | Nodes_H0
  | Nodes_Ha
  | Tree4detect
  | Tree4simu
  | Tree_diffsel
38 39 40 41 42 43 44

type raw_dataset = {
  input_tree: nhx workflow ;
  fna: nucleotide_fasta workflow ;
  }

type ready_dataset = {
45
  input_tree: nhx workflow ;
Philippe Veber's avatar
Philippe Veber committed
46
  tree_dataset : [`tree_dataset] directory workflow ;
47 48 49
  fna: nucleotide_fasta workflow ;
  faa: aminoacid_fasta workflow ;
  }
Carine Rey's avatar
Carine Rey committed
50 51 52 53 54 55 56 57 58

type ('a,'b) w_dataset =
  | Raw_dataset of 'a
  | Ready_dataset of 'b


type dataset = {
  model_prefix: string ;
  tree_prefix : string ;
Carine Rey's avatar
Carine Rey committed
59
  ready_dataset : ready_dataset
Carine Rey's avatar
Carine Rey committed
60
  }
Carine Rey's avatar
Carine Rey committed
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83


type det_meth =
  | Pcoc
  | Pcoc_gamma
  | Diffsel

let string_of_det_meth = function
  | Pcoc -> "pcoc"
  | Pcoc_gamma -> "pcoc_gamma"
  | Diffsel -> "diffsel"

type 'a w_det_meth =
  | Pcoc_w of 'a
  | Pcoc_gamma_w of 'a
  | Diffsel of 'a

type 'a det_result = {
  dataset : dataset ;
  det_meth : det_meth ;
  det_result : 'a workflow
  }