1 { lib, stdenv, zlib, bzip2, xz, fetchFromGitHub } :
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "1vv5mc9z5d22kgdy7mm27ya5aahnqgkcrskdr2405058ikk9g8kp";
12 fetchSubmodules = true;
15 buildInputs = [ zlib bzip2 xz ];
18 # Fix gcc-13 build failure due to missing includes
19 sed -e '1i #include <cstdint>' -i \
20 SeqLib/src/non_api/Histogram.h \
24 # Workaround build failure on -fno-common toolchains like upstream
25 # gcc-10. Otherwise build fails as:
26 # ld: ./libfml.a(rle.o):/build/source/SeqLib/fermi-lite/rle.h:33: multiple definition of
27 # `rle_auxtab'; ./libfml.a(misc.o):/build/source/SeqLib/fermi-lite/rle.h:33: first defined here
28 env.NIX_CFLAGS_COMPILE = "-fcommon";
32 install -Dm555 src/svaba/svaba $out/bin/svaba
37 broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
38 description = "Structural variant and INDEL caller for DNA sequencing data, using genome-wide local assembly";
39 mainProgram = "svaba";
40 license = licenses.gpl3;
41 homepage = "https://github.com/walaj/svaba";
42 maintainers = with maintainers; [ scalavision ];
43 platforms = platforms.linux;
45 SvABA is a method for detecting structural variants in sequencing data
46 using genome-wide local assembly. Under the hood, SvABA uses a custom
47 implementation of SGA (String Graph Assembler) by Jared Simpson,
48 and BWA-MEM by Heng Li. Contigs are assembled for every 25kb window
49 (with some small overlap) for every region in the genome.
50 The default is to use only clipped, discordant, unmapped and indel reads,
51 although this can be customized to any set of reads at the command line using VariantBam rules.
52 These contigs are then immediately aligned to the reference with BWA-MEM and parsed to identify variants.
53 Sequencing reads are then realigned to the contigs with BWA-MEM, and variants are scored by their read support.