google-deepmind/extract_frag_trees
Java
Captured source
source ↗google-deepmind/extract_frag_trees
Language: Java
License: AGPL-3.0
Stars: 1
Forks: 0
Open issues: 0
Created: 2026-11-21T20:08:24Z
Pushed: 2026-11-21T20:22:00Z
Default branch: main
Fork: no
Archived: no
README:
extract_frag_trees
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 /lib/app/*boot*.jar plus the boot JAR itself).
Prerequisites
- 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.java compiles against and invokes SIRIUS 6.2.2 Java APIs at compile time and runtime. SIRIUS is not bundled in ExtractTrees.jar or 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
/lib/runtime/bin/java, or use java on PATH. No javac is needed at runtime when using the precompiled ExtractTrees.jar.
Usage
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.
Building ExtractTrees.jar Locally
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" .License and disclaimer
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.