package bistro-bio

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file FastQC.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
open Bistro
open Bistro.Shell_dsl

type report = [`fastQC] directory

let img = [ docker_image ~account:"pveber" ~name:"fastqc" ~tag:"0.11.8" () ]

module Cmd = struct
  let fastqc x = [
    mkdir_p dest ;
    cmd "fastqc" [
      seq ~sep:"" [ string "--outdir=" ; dest ] ;
      (
        match x with
        | `fq fq -> dep fq
        | `fq_gz fq_gz -> Bistro_unix.Cmd.gzdep fq_gz
      )
    ] ;
    and_list [
      cd dest ;
      cmd "unzip" [ string "*_fastqc.zip" ] ;
      cmd "mv" [ string "*_fastqc/*" ; string "." ]
    ] ;
  ]
end

let fastqc fq = Workflow.shell ~descr:"fastQC" ~img (Cmd.fastqc (`fq fq))

let fastqc_gz fq_gz = Workflow.shell ~descr:"fastQC" ~img (Cmd.fastqc (`fq_gz fq_gz))

let html_report x = Workflow.select x ["fastqc_report.html"]

let per_base_quality x =
  Workflow.select x ["Images" ; "per_base_quality.png"]

let per_base_sequence_content x =
  Workflow.select x ["Images" ; "per_base_sequence_content.png"]