diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 7238446aaf00205362f97398ce906b33f9953529..eb74da6b284731c910b40e659ef37ba36827da98 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -4483,6 +4483,11 @@ (define-public ncbi-vdb
                  (("CFLAGS	=" prefix)
                   (string-append prefix "-msse2 ")))
 
+               ;; Override search path for ngs-java
+               (substitute* "setup/package.prl"
+                 (("/usr/local/ngs/ngs-java")
+                  (assoc-ref inputs "java-ngs")))
+
                ;; The 'configure' script doesn't recognize things like
                ;; '--enable-fast-install'.
                (zero? (system*
@@ -4494,8 +4499,6 @@ (define-public ncbi-vdb
                                       (assoc-ref inputs "libxml2"))
                        (string-append "--with-ngs-sdk-prefix="
                                       (assoc-ref inputs "ngs-sdk"))
-                       (string-append "--with-ngs-java-prefix="
-                                      (assoc-ref inputs "java-ngs"))
                        (string-append "--with-hdf5-prefix="
                                       (assoc-ref inputs "hdf5")))))))
          (add-after 'install 'install-interfaces