package bistro-bio

  1. Overview
  2. Docs
Bistro workflows for computational biology

Install

Dune Dependency

Authors

Maintainers

Sources

bistro-0.6.0.tbz
sha256=146177faaaa9117a8e2bf0fd60cb658662c0aa992f35beb246e6fd0766050e66
sha512=553fe0c20f236316449b077a47e6e12626d193ba1916e9da233e5526dd39090e8677277e1c79baace3bdc940cb009f25431730a8efc00ae4ed9cc42a0add9609

doc/src/bistro-bio/meme_suite.ml.html

Source file meme_suite.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
open Core_kernel
open Bistro
open Bistro.Shell_dsl

let img = [ docker_image ~account:"pveber" ~name:"meme" ~tag:"4.11.2" () ]

let meme_chip ?meme_nmotifs ?meme_minw ?meme_maxw (* ?np:threads *) fa =
  Workflow.shell ~descr:"meme-chip" ~img (* ?np:threads *) [
    cmd "meme-chip" [
      option (opt "-meme-nmotifs" int) meme_nmotifs ;
      option (opt "-meme-minw" int) meme_minw ;
      option (opt "-meme-maxw" int) meme_maxw ;
      (* opt "-meme-p" Fn.id np ; *)(* this is disabled due to mpirun refusing to run as root under docker *)
      opt "--oc" Fn.id dest ;
      dep fa ;
    ]
  ]

let string_of_alphabet = function
  | `dna -> "dna"
  | `rna -> "rna"
  | `protein -> "protein"

let meme_alphabet_opt x =
  string ("-" ^ string_of_alphabet x)

let meme ?nmotifs ?minw ?maxw ?revcomp ?maxsize ?alphabet (* ?threads *) fa =
  Workflow.shell ~descr:"meme" ~img (* ?np:threads *) [
    cmd "meme" [
      option (opt "-nmotifs" int) nmotifs ;
      option (opt "-minw" int) minw ;
      option (opt "-maxw" int) maxw ;
      option meme_alphabet_opt alphabet ;
      option (flag string "-revcomp") revcomp ;
      option (opt "-maxsize" int) maxsize ;
      (* opt "-p" Fn.id np ; *) (* this is disabled due to mpirun refusing to run as root under docker *)
      opt "-oc" Fn.id dest ;
      dep fa ;
    ]
  ]

let  dir ?(rc = false) n =
  Workflow.select dir [ sprintf "logo%s%d.png" (if rc then "" else "_rc") n ]

let fimo
    ?alpha ?bgfile ?max_stored_scores ?max_strand ?motif ?motif_pseudo
    ?no_qvalue ?norc ?parse_genomic_coord ?prior_dist ?psp
    ?qv_thresh ?thresh meme_motifs seqs =
  Bistro.Workflow.shell ~descr:"meme_suite.fimo" ~img [
    cmd "fimo" [
      option (opt "--alpha" float) alpha ;
      option (opt "--bgfile" dep) bgfile ;
      option (opt "--max-stored-scores" int) max_stored_scores ;
      option (flag string "--max-strand") max_strand ;
      option (opt "--motif" string) motif ;
      option (opt "--motif-pseudo" float) motif_pseudo ;
      option (flag string "--no-qvalue") no_qvalue ;
      option (flag string "--norc") norc ;
      option (flag string "--parse-genomic-coord") parse_genomic_coord ;
      option (opt "--prior-dist" dep) prior_dist ;
      option (opt "--psp" dep) psp ;
      option (flag string "--qv-thresh") qv_thresh ;
      option (opt "--thresh" float) thresh ;
      opt "--oc" Fn.id dest ;
      dep meme_motifs ;
      dep seqs ;
    ]
  ]
OCaml

Innovation. Community. Security.