nixpkgs/pkgs/by-name/mu/multiqc/package.nix
2025-02-04 09:01:38 +01:00

123 lines
2.8 KiB
Nix

{
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;
};
}