ExtractTrees.java and a GitHub Actions release workflow that publishes a
precompiled ExtractTrees.jar for exporting fragmentation trees from a
SIRIUS 6.2.2 .sirius project database
to JSON.
All chemical values (molecular formulas, scores, neutral fragment masses, measured/recalibrated m/z, relative intensities, and losses) are read directly from SIRIUS' persisted project objects without recomputing chemistry.
The published ExtractTrees.jar (~8 KB) contains only ExtractTrees.class and
META-INF/LICENSE (no SIRIUS JARs are bundled). At runtime, pass your local
SIRIUS 6.2.2 runtime classpath (BOOT-INF/lib/*.jar unpacked from
<sirius_home>/lib/app/*boot*.jar plus the boot JAR itself).
- SIRIUS 6.2.2 installed locally (e.g.
https://github.com/sirius-ms/sirius/releases/download/v6.2.2/sirius-6.2.2-linux-x64.zip). External AGPL-3.0 / LGPL dependency:ExtractTrees.javacompiles against and invokes SIRIUS 6.2.2 Java APIs at compile time and runtime. SIRIUS is not bundled inExtractTrees.jaror this repository and is distributed separately under its own license terms (including GNU AGPL-3.0 / LGPL-3.0; see SIRIUS LICENSE.txt). - Java 21+ runtime (
java): SIRIUS 6.2.2 bundles a compatible JRE at<sirius_home>/lib/runtime/bin/java, or usejavaonPATH. Nojavacis needed at runtime when using the precompiledExtractTrees.jar.
Download ExtractTrees.jar from
GitHub Releases
and run it against your local SIRIUS 6.2.2 installation:
VERSION="v0.1.0"
curl -fsSLO "https://github.com/google-deepmind/extract_frag_trees/releases/download/${VERSION}/ExtractTrees.jar"
SIRIUS_HOME="/path/to/sirius"
BOOT_JAR="${SIRIUS_HOME}/lib/app/sirius_rest_service-6.2.2-boot.jar"
JAR_DIR="$(mktemp -d)"
trap 'rm -rf "$JAR_DIR"' EXIT
unzip -q -j "$BOOT_JAR" "BOOT-INF/lib/*.jar" -d "$JAR_DIR"
"${SIRIUS_HOME}/lib/runtime/bin/java" \
-cp "ExtractTrees.jar:${JAR_DIR}/*:${BOOT_JAR}" \
ExtractTrees /path/to/project.sirius /path/to/trees.jsonExits 0 on success, or 1 if the project contains no fragmentation trees or
a tree lacks the AnnotatedPeak fragment annotation.
Requires a Java 21+ JDK (javac and jar) and a local SIRIUS 6.2.2
installation:
SIRIUS_HOME="/path/to/sirius"
BOOT_JAR="${SIRIUS_HOME}/lib/app/sirius_rest_service-6.2.2-boot.jar"
TMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TMP_DIR"' EXIT
unzip -q -j "$BOOT_JAR" "BOOT-INF/lib/*.jar" -d "${TMP_DIR}/sirius_jars"
mkdir -p "${TMP_DIR}/classes/META-INF"
javac --release 21 -cp "${TMP_DIR}/sirius_jars/*:${BOOT_JAR}" \
-d "${TMP_DIR}/classes" ExtractTrees.java
cp LICENSE "${TMP_DIR}/classes/META-INF/LICENSE"
printf 'Manifest-Version: 1.0\nMain-Class: ExtractTrees\n' > "${TMP_DIR}/MANIFEST.MF"
jar cfm ExtractTrees.jar "${TMP_DIR}/MANIFEST.MF" -C "${TMP_DIR}/classes" .Copyright 2026 Google LLC
All software in this repository is licensed under the GNU Affero General Public
License, Version 3.0 (AGPL-3.0); you may not use this file except in compliance
with the AGPL-3.0 license. You may obtain a copy of the AGPL-3.0 license in
LICENSE or at:
https://www.gnu.org/licenses/agpl-3.0.html
All other materials are licensed under the Creative Commons Attribution 4.0 International License (CC-BY). You may obtain a copy of the CC-BY license at: https://creativecommons.org/licenses/by/4.0/legalcode
Unless required by applicable law or agreed to in writing, all software and materials distributed here under the AGPL-3.0 or CC-BY licenses are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the licenses for the specific language governing permissions and limitations under those licenses.
Note on external dependencies: ExtractTrees.java compiles against and requires
a user-supplied SIRIUS 6.2.2 installation
at runtime, which is governed by SIRIUS's own license terms (including GNU
AGPL-3.0 / LGPL-3.0; see
SIRIUS LICENSE.txt).
No SIRIUS code or JARs are included in this repository or in ExtractTrees.jar.
This is not an official Google product.