--- title: Flare emoji: 🔥 colorFrom: green colorTo: blue sdk: streamlit pinned: false python_version: 3.11.7 --- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference # 🔥 FLARE Fine-grained Learning for Aligment of spectra-molecule REpresentation ### Yan Zhou Chen, Soha Hassoun #### Department of Computer Science, Tufts University This repository provides the implementation of FALRE. Given a mass spectrum, FLARE can be used to rank a set of molecular candidates. Further, FLARE enables visualization of peak-to-node attribution. ## 🛠 Set up ### Clone repository ``` git clone https://github.com/hassounlab/flare cd flare ``` ### Set up environment and install dependencies ``` conda create -n flare python=3.11 conda activate flare pip install -r requirements.txt ``` ## Usage Modify params.yaml as necessary ``` # preprocess data python subformula_assign/assign_subformulae.py --spec-files ../data/sample/data.tsv --output-dir ../data/sample/subformulae --labels-file ../data/sample/data.tsv --max-formulae 60 # train python train.py # test python test.py ``` ## 🙏 Acknowledgments - **Loss Objective**: [FILIP](https://arxiv.org/abs/2111.07783) - **Training Data**: [MassSpecGym](https://github.com/pluskal-lab/MassSpecGym) - **Subformula Assigner Code**: [MIST](https://github.com/samgoldman97/mist/tree/main_v2)