sig
  module type Trans_base =
    sig
      type 'a from
      type 'a term
      val fwd :
        'Biokepi_pipeline_edsl.Optimization_framework.Trans_base.from ->
        'Biokepi_pipeline_edsl.Optimization_framework.Trans_base.term
      val bwd :
        'Biokepi_pipeline_edsl.Optimization_framework.Trans_base.term ->
        'Biokepi_pipeline_edsl.Optimization_framework.Trans_base.from
    end
  module type Transformation =
    sig
      type 'a from
      type 'a term
      val fwd : 'a from -> 'a term
      val bwd : 'a term -> 'a from
      val fmap : ('a from -> 'b from) -> 'a term -> 'b term
      val fmap2 :
        ('a from -> 'b from -> 'c from) -> 'a term -> 'b term -> 'c term
    end
  module Define_transformation :
    functor (X : Trans_base->
      sig
        type 'a from = 'X.from
        type 'a term = 'X.term
        val fwd : 'a from -> 'a term
        val bwd : 'a term -> 'a from
        val fmap : ('a from -> 'b from) -> 'a term -> 'b term
        val fmap2 :
          ('a from -> 'b from -> 'c from) -> 'a term -> 'b term -> 'c term
      end
  module Generic_optimizer :
    functor
      (X : Transformation) (Input : sig
                                      type 'a repr = 'X.from
                                      val lambda :
                                        ('a repr -> 'b repr) ->
                                        ('-> 'b) repr
                                      val apply :
                                        ('-> 'b) repr -> 'a repr -> 'b repr
                                      type 'a observation
                                      val observe :
                                        (unit -> 'a repr) -> 'a observation
                                      val list : 'a repr list -> 'a list repr
                                      val list_map :
                                        'a list repr ->
                                        f:('-> 'b) repr -> 'b list repr
                                      val pair :
                                        'a repr -> 'b repr -> ('a * 'b) repr
                                      val pair_first :
                                        ('a * 'b) repr -> 'a repr
                                      val pair_second :
                                        ('a * 'b) repr -> 'b repr
                                      val to_unit : 'a repr -> unit repr
                                      val fastq :
                                        sample_name:string ->
                                        ?fragment_id:string ->
                                        r1:string ->
                                        ?r2:string -> unit -> [ `Fastq ] repr
                                      val fastq_gz :
                                        sample_name:string ->
                                        ?fragment_id:string ->
                                        r1:string ->
                                        ?r2:string ->
                                        unit -> [ `Gz of [ `Fastq ] ] repr
                                      val bam :
                                        path:string ->
                                        ?sorting:[ `Coordinate | `Read_name ] ->
                                        reference_build:string ->
                                        unit -> [ `Bam ] repr
                                      val gunzip :
                                        [ `Gz of 'a ] repr -> 'a repr
                                      val gunzip_concat :
                                        [ `Gz of 'a ] list repr -> 'a repr
                                      val concat : 'a list repr -> 'a repr
                                      val merge_bams :
                                        [ `Bam ] list repr -> [ `Bam ] repr
                                      val bam_to_fastq :
                                        sample_name:string ->
                                        ?fragment_id:string ->
                                        [ `PE | `SE ] ->
                                        [ `Bam ] repr -> [ `Fastq ] repr
                                      val bwa_aln :
                                        ?configuration:Biokepi_bfx_tools.Bwa.Configuration.Aln.t ->
                                        reference_build:Biokepi_run_environment.Reference_genome.name ->
                                        [ `Fastq ] repr -> [ `Bam ] repr
                                      val bwa_mem :
                                        ?configuration:Biokepi_bfx_tools.Bwa.Configuration.Mem.t ->
                                        reference_build:Biokepi_run_environment.Reference_genome.name ->
                                        [ `Fastq ] repr -> [ `Bam ] repr
                                      val star :
                                        ?configuration:Biokepi_bfx_tools.Star.Configuration.Align.t ->
                                        reference_build:Biokepi_run_environment.Reference_genome.name ->
                                        [ `Fastq ] repr -> [ `Bam ] repr
                                      val hisat :
                                        ?configuration:Biokepi_bfx_tools.Hisat.Configuration.t ->
                                        reference_build:Biokepi_run_environment.Reference_genome.name ->
                                        [ `Fastq ] repr -> [ `Bam ] repr
                                      val mosaik :
                                        reference_build:Biokepi_run_environment.Reference_genome.name ->
                                        [ `Fastq ] repr -> [ `Bam ] repr
                                      val stringtie :
                                        ?configuration:Biokepi_bfx_tools.Stringtie.Configuration.t ->
                                        [ `Bam ] repr -> [ `Gtf ] repr
                                      val gatk_indel_realigner :
                                        ?configuration:Biokepi_bfx_tools.Gatk.Configuration.indel_realigner ->
                                        [ `Bam ] repr -> [ `Bam ] repr
                                      val gatk_indel_realigner_joint :
                                        ?configuration:Biokepi_bfx_tools.Gatk.Configuration.indel_realigner ->
                                        ([ `Bam ] * [ `Bam ]) repr ->
                                        ([ `Bam ] * [ `Bam ]) repr
                                      val picard_mark_duplicates :
                                        ?configuration:Biokepi_bfx_tools.Picard.Mark_duplicates_settings.t ->
                                        [ `Bam ] repr -> [ `Bam ] repr
                                      val gatk_bqsr :
                                        ?configuration:Biokepi_bfx_tools.Gatk.Configuration.bqsr ->
                                        [ `Bam ] repr -> [ `Bam ] repr
                                      val seq2hla :
                                        [ `Fastq ] repr ->
                                        [ `Seq2hla_result ] repr
                                      val optitype :
                                        [ `DNA | `RNA ] ->
                                        [ `Fastq ] repr ->
                                        [ `Optitype_result ] repr
                                      val gatk_haplotype_caller :
                                        [ `Bam ] repr -> [ `Vcf ] repr
                                      val mutect :
                                        ?configuration:Biokepi_bfx_tools.Mutect.Configuration.t ->
                                        normal:[ `Bam ] repr ->
                                        tumor:[ `Bam ] repr ->
                                        unit -> [ `Vcf ] repr
                                      val mutect2 :
                                        ?configuration:Biokepi_bfx_tools.Gatk.Configuration.Mutect2.t ->
                                        normal:[ `Bam ] repr ->
                                        tumor:[ `Bam ] repr ->
                                        unit -> [ `Vcf ] repr
                                      val somaticsniper :
                                        ?configuration:Biokepi_bfx_tools.Somaticsniper.Configuration.t ->
                                        normal:[ `Bam ] repr ->
                                        tumor:[ `Bam ] repr ->
                                        unit -> [ `Vcf ] repr
                                      val varscan_somatic :
                                        ?adjust_mapq:int ->
                                        normal:[ `Bam ] repr ->
                                        tumor:[ `Bam ] repr ->
                                        unit -> [ `Vcf ] repr
                                      val strelka :
                                        ?configuration:Biokepi_bfx_tools.Strelka.Configuration.t ->
                                        normal:[ `Bam ] repr ->
                                        tumor:[ `Bam ] repr ->
                                        unit -> [ `Vcf ] repr
                                      val virmid :
                                        ?configuration:Biokepi_bfx_tools.Virmid.Configuration.t ->
                                        normal:[ `Bam ] repr ->
                                        tumor:[ `Bam ] repr ->
                                        unit -> [ `Vcf ] repr
                                      val muse :
                                        ?configuration:Biokepi_bfx_tools.Muse.Configuration.t ->
                                        normal:[ `Bam ] repr ->
                                        tumor:[ `Bam ] repr ->
                                        unit -> [ `Vcf ] repr
                                    end->
      sig
        type 'a repr = 'X.term
        val lambda : ('a repr -> 'b repr) -> ('-> 'b) repr
        val apply : ('-> 'b) repr -> 'a repr -> 'b repr
        type 'a observation = 'Input.observation
        val observe : (unit -> 'a repr) -> 'a observation
        val list : 'a repr list -> 'a list repr
        val list_map : 'a list repr -> f:('-> 'b) repr -> 'b list repr
        val pair : 'a repr -> 'b repr -> ('a * 'b) repr
        val pair_first : ('a * 'b) repr -> 'a repr
        val pair_second : ('a * 'b) repr -> 'b repr
        val to_unit : 'a repr -> unit repr
        val fastq :
          sample_name:string ->
          ?fragment_id:string ->
          r1:string -> ?r2:string -> unit -> [ `Fastq ] repr
        val fastq_gz :
          sample_name:string ->
          ?fragment_id:string ->
          r1:string -> ?r2:string -> unit -> [ `Gz of [ `Fastq ] ] repr
        val bam :
          path:string ->
          ?sorting:[ `Coordinate | `Read_name ] ->
          reference_build:string -> unit -> [ `Bam ] repr
        val gunzip : [ `Gz of 'a ] repr -> 'a repr
        val gunzip_concat : [ `Gz of 'a ] list repr -> 'a repr
        val concat : 'a list repr -> 'a repr
        val merge_bams : [ `Bam ] list repr -> [ `Bam ] repr
        val bam_to_fastq :
          sample_name:string ->
          ?fragment_id:string ->
          [ `PE | `SE ] -> [ `Bam ] repr -> [ `Fastq ] repr
        val bwa_aln :
          ?configuration:Biokepi_bfx_tools.Bwa.Configuration.Aln.t ->
          reference_build:Biokepi_run_environment.Reference_genome.name ->
          [ `Fastq ] repr -> [ `Bam ] repr
        val bwa_mem :
          ?configuration:Biokepi_bfx_tools.Bwa.Configuration.Mem.t ->
          reference_build:Biokepi_run_environment.Reference_genome.name ->
          [ `Fastq ] repr -> [ `Bam ] repr
        val star :
          ?configuration:Biokepi_bfx_tools.Star.Configuration.Align.t ->
          reference_build:Biokepi_run_environment.Reference_genome.name ->
          [ `Fastq ] repr -> [ `Bam ] repr
        val hisat :
          ?configuration:Biokepi_bfx_tools.Hisat.Configuration.t ->
          reference_build:Biokepi_run_environment.Reference_genome.name ->
          [ `Fastq ] repr -> [ `Bam ] repr
        val mosaik :
          reference_build:Biokepi_run_environment.Reference_genome.name ->
          [ `Fastq ] repr -> [ `Bam ] repr
        val stringtie :
          ?configuration:Biokepi_bfx_tools.Stringtie.Configuration.t ->
          [ `Bam ] repr -> [ `Gtf ] repr
        val gatk_indel_realigner :
          ?configuration:Biokepi_bfx_tools.Gatk.Configuration.indel_realigner ->
          [ `Bam ] repr -> [ `Bam ] repr
        val gatk_indel_realigner_joint :
          ?configuration:Biokepi_bfx_tools.Gatk.Configuration.indel_realigner ->
          ([ `Bam ] * [ `Bam ]) repr -> ([ `Bam ] * [ `Bam ]) repr
        val picard_mark_duplicates :
          ?configuration:Biokepi_bfx_tools.Picard.Mark_duplicates_settings.t ->
          [ `Bam ] repr -> [ `Bam ] repr
        val gatk_bqsr :
          ?configuration:Biokepi_bfx_tools.Gatk.Configuration.bqsr ->
          [ `Bam ] repr -> [ `Bam ] repr
        val seq2hla : [ `Fastq ] repr -> [ `Seq2hla_result ] repr
        val optitype :
          [ `DNA | `RNA ] -> [ `Fastq ] repr -> [ `Optitype_result ] repr
        val gatk_haplotype_caller : [ `Bam ] repr -> [ `Vcf ] repr
        val mutect :
          ?configuration:Biokepi_bfx_tools.Mutect.Configuration.t ->
          normal:[ `Bam ] repr ->
          tumor:[ `Bam ] repr -> unit -> [ `Vcf ] repr
        val mutect2 :
          ?configuration:Biokepi_bfx_tools.Gatk.Configuration.Mutect2.t ->
          normal:[ `Bam ] repr ->
          tumor:[ `Bam ] repr -> unit -> [ `Vcf ] repr
        val somaticsniper :
          ?configuration:Biokepi_bfx_tools.Somaticsniper.Configuration.t ->
          normal:[ `Bam ] repr ->
          tumor:[ `Bam ] repr -> unit -> [ `Vcf ] repr
        val varscan_somatic :
          ?adjust_mapq:int ->
          normal:[ `Bam ] repr ->
          tumor:[ `Bam ] repr -> unit -> [ `Vcf ] repr
        val strelka :
          ?configuration:Biokepi_bfx_tools.Strelka.Configuration.t ->
          normal:[ `Bam ] repr ->
          tumor:[ `Bam ] repr -> unit -> [ `Vcf ] repr
        val virmid :
          ?configuration:Biokepi_bfx_tools.Virmid.Configuration.t ->
          normal:[ `Bam ] repr ->
          tumor:[ `Bam ] repr -> unit -> [ `Vcf ] repr
        val muse :
          ?configuration:Biokepi_bfx_tools.Muse.Configuration.t ->
          normal:[ `Bam ] repr ->
          tumor:[ `Bam ] repr -> unit -> [ `Vcf ] repr
      end
end