2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, boost
|
|
|
|
, bzip2
|
|
|
|
, htslib
|
|
|
|
, llvmPackages
|
|
|
|
, xz
|
|
|
|
, zlib
|
|
|
|
, delly
|
|
|
|
, runCommand
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "delly";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.1.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-07-15 17:15:38 +00:00
|
|
|
owner = "dellytools";
|
|
|
|
repo = "delly";
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-/I//7MhsC/CcBeIJblzbjXp/yOSBm83KWJsrYpl6UJk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
bzip2
|
|
|
|
htslib
|
|
|
|
xz
|
|
|
|
zlib
|
|
|
|
] ++ lib.optional stdenv.isDarwin llvmPackages.openmp;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
makeFlags = [
|
|
|
|
"EBROOTHTSLIB=${htslib}"
|
|
|
|
"PARALLEL=1"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm555 src/delly $out/bin/delly
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.tests = {
|
|
|
|
simple = runCommand "${finalAttrs.pname}-test" { } ''
|
|
|
|
mkdir $out
|
|
|
|
${lib.getExe delly} call -g ${delly.src}/example/ref.fa ${delly.src}/example/sr.bam > $out/sr.vcf
|
|
|
|
${lib.getExe delly} lr -g ${delly.src}/example/ref.fa ${delly.src}/example/lr.bam > $out/lr.vcf
|
|
|
|
${lib.getExe delly} cnv -g ${delly.src}/example/ref.fa -m ${delly.src}/example/map.fa.gz ${delly.src}/example/sr.bam > cnv.vcf
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Structural variant caller for mapped DNA sequenced data";
|
2020-10-16 20:44:37 +00:00
|
|
|
license = licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ scalavision ];
|
2023-07-15 17:15:38 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Delly is an integrated structural variant (SV) prediction method
|
|
|
|
that can discover, genotype and visualize deletions, tandem duplications,
|
|
|
|
inversions and translocations at single-nucleotide resolution in
|
|
|
|
short-read massively parallel sequencing data. It uses paired-ends,
|
|
|
|
split-reads and read-depth to sensitively and accurately delineate
|
|
|
|
genomic rearrangements throughout the genome.
|
|
|
|
'';
|
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
})
|