summaryrefslogtreecommitdiff
path: root/pkgs/by-name/mu/multiqc/package.nix
blob: 8ddbe69464cb2dff8b859c9a745bd0ded8dd779f (about) (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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
  lib,
  python3Packages,
  fetchFromGitHub,
  procps,
  stdenv,
  versionCheckHook,
  addBinToPathHook,
}:

python3Packages.buildPythonApplication rec {
  pname = "multiqc";
  version = "1.26";

  # Two data sources. One for the code, another for the test data
  srcs = [
    (fetchFromGitHub {
      name = "multiqc";
      owner = "MultiQC";
      repo = "MultiQC";
      tag = "v${version}";
      hash = "sha256-MPAw6gG/3LzdskkDXOTDEM1NpG0sH9GvklYFQ1ZXWIs=";
    })
    (fetchFromGitHub {
      owner = "MultiQC";
      repo = "test-data";
      rev = "67435083a8bfa228dca3dda7d835facef15fc2c7";
      hash = "sha256-oYmPIJSy6dOKPcMr3B4foGoWcerA29x0XeGoU4dSYsA=";
      name = "test-data";
    })
  ];

  sourceRoot = "multiqc";

  dependencies = with python3Packages; [
    click
    humanize
    importlib-metadata
    jinja2
    kaleido
    markdown
    natsort
    numpy
    packaging
    requests
    pillow
    plotly
    pyyaml
    rich
    rich-click
    coloredlogs
    spectra
    pydantic
    typeguard
    tqdm
  ];

  optional-dependencies = {
    dev = with python3Packages; [
      pre-commit-hooks
      pdoc3
      pytest
      pytest-cov-stub
      pytest-xdist
      syrupy
      pygithub
      mypy
      types-pyyaml
      types-tqdm
      types-requests
      types-markdown
      types-beautifulsoup4
      types-pillow
    ];
  };

  # Some tests run subprocess.run() with "multiqc"
  preCheck = ''
    chmod -R u+w ../test-data
    ln -s ../test-data .
  '';

  # Some tests run subprocess.run() with "ps"
  nativeCheckInputs =
    with python3Packages;
    [
      procps
      pytest-cov
      pytest-xdist
      pytestCheckHook
      syrupy
      pygithub
      versionCheckHook
    ]
    ++ [
      addBinToPathHook
    ];

  versionCheckProgramArg = "--version";

  disabledTests =
    # On darwin, kaleido fails to starts
    lib.optionals (stdenv.hostPlatform.isDarwin) [
      "test_flat_plot"
    ];

  meta = {
    description = "Aggregates bioinformatics results from multiple samples into a unified report";
    longDescription = ''
      MultiQC is a tool to create a single report with interactive plots for multiple bioinformatics analyses across many samples.

      Reports are generated by scanning given directories for recognised log files. These are parsed and a single HTML report is generated summarising the statistics for all logs found. MultiQC reports can describe multiple analysis steps and large numbers of samples within a single plot, and multiple analysis tools making it ideal for routine fast quality control.
    '';
    homepage = "https://multiqc.info";
    changelog = "https://github.com/MultiQC/MultiQC/releases/tag/v${version}/";
    license = [ lib.licenses.gpl3Plus ];
    maintainers = [ lib.maintainers.apraga ];
    mainProgram = "multiqc";
    platforms = lib.platforms.unix;
  };

}