diff options
-rw-r--r-- | pkgs/applications/science/biology/trimmomatic/default.nix | 66 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
2 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/applications/science/biology/trimmomatic/default.nix b/pkgs/applications/science/biology/trimmomatic/default.nix new file mode 100644 index 0000000000000..ad1dc45c5c26d --- /dev/null +++ b/pkgs/applications/science/biology/trimmomatic/default.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, ant +, fetchFromGitHub +, jdk11_headless +, jre +, makeWrapper +}: + +stdenv.mkDerivation rec { + pname = "trimmomatic"; + version = "0.39"; + + src = fetchFromGitHub { + owner = "usadellab"; + repo = "Trimmomatic"; + rev = "v${version}"; + hash = "sha256-u+ubmacwPy/vsEi0YQCv0fTnVDesQvqeQDEwCbS8M6I="; + }; + + # Set source and target version to 11 + postPatch = '' + substituteInPlace ./build.xml \ + --replace 'source="1.5" target="1.5"' 'release="11"' + ''; + + nativeBuildInputs = [ jdk11_headless ant makeWrapper ]; + + buildPhase = '' + runHook preBuild + + ant + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/share + cp dist/jar/trimmomatic-${version}.jar $out/share/ + cp -r adapters $out/share/ + makeWrapper ${jre}/bin/java $out/bin/trimmomatic \ + --add-flags "-cp $out/share/trimmomatic-${version}.jar org.usadellab.trimmomatic.Trimmomatic" + + runHook postInstall + ''; + + meta = { + description = "A flexible read trimming tool for Illumina NGS data"; + longDescription = '' + Trimmomatic performs a variety of useful trimming tasks for illumina + paired-end and single ended data: adapter trimming, quality trimming, + cropping to a specified length, length filtering, quality score + conversion. + ''; + homepage = "http://www.usadellab.org/cms/?page=trimmomatic"; + downloadPage = "https://github.com/usadellab/Trimmomatic/releases"; + license = lib.licenses.gpl3Only; + sourceProvenance = [ + lib.sourceTypes.fromSource + lib.sourceTypes.binaryBytecode # source bundles dependencies as jars + ]; + maintainers = [ lib.maintainers.kupac ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b2c5bbe15974f..2dd2637b45ac5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -39342,6 +39342,14 @@ with pkgs; trimal = callPackage ../applications/science/biology/trimal { }; + trimmomatic = callPackage ../applications/science/biology/trimmomatic { + # Reduce closure size + jre = pkgs.jre_minimal.override { + modules = [ "java.base" "java.logging" ]; + jdk = pkgs.jdk11_headless; + }; + }; + truvari = callPackage ../applications/science/biology/truvari { }; varscan = callPackage ../applications/science/biology/varscan { }; |