aboutsummaryrefslogtreecommitdiff
path: root/tools/fastqc-check.nix
blob: 9b6dd96e7f0dac11b4a7446707b2d03f5727dafa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ bionix
, flags ? null
}:

with bionix;
with lib;

input:

stage {
  name = "fastqc-check";
  buildInputs = [ bionix.fastqc.fastqc pkgs.unzip ];
  stripStorePaths = false; # we do it explicity for fastqc
  outputs = [ "out" "zip" ];
  buildCommand = ''
    fastqc \
      -o $TMPDIR \
      ${optionalString (flags != null) flags} \
      ${input}

    sed  "s|$(basename ${input})|input|g" *.html > $out
    cp *.zip $zip
  '';
}