This project contains the model and experimental implementation as detailed in the publication:
"SpectraFlow: A Novel Feature Selection Framework for Overcoming Challenges in 1D NMR Spectroscopy"
The SpectraFlow framework synergistically combines denoising, PCA-binning, sequential attention, and an MLP model to address challenges specific to feature selection on 1D NMR data.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Before you begin, ensure you have Conda installed on your system. You can install either Miniconda or Anaconda:
To recreate the Conda environment with all necessary dependencies, follow these steps:
- Open your terminal.
- Navigate to the project directory.
- Run the following command to create the environment:
conda env create -f spectraflow_env.yml
- Once the environment is created, activate it:
conda activate spectraflow
If you prefer to use a virtual environment and install the core libraries without Conda, follow these steps:
- Ensure you have Python and
pip
installed on your system. - Create a virtual environment:
python -m venv myenv
- Activate the virtual environment:
- On Windows:
myenv\Scripts\activate
- On Unix or MacOS:
source myenv/bin/activate
- Install the required packages:
pip install -r requirements.txt
After setting up the environment, you can run the project using the provided shell scripts:
Running Preprocessing
Before running run_preprocess.sh, ensure it is executable:
chmod +x run_preprocess.sh
Then, you can run the preprocessing script which should not take longer than a minute on a normal machine:
./run_preprocess.sh
Remember to check and modify any variables or paths inside the script as necessary for your environment.
Running SpectraFlow Analysis
For run_spectraflow.sh, it is recommended to use a cluster of CPU machines due to the intensive computational resources required. First, make the script executable:
chmod +x run_spectraflow.sh
Afterwards, modify any variables or paths in the script according to your cluster environment and input data. Then execute:
./run_spectraflow.sh
View code documentation
View publication documentation
If you would like to contribute to the project, please read CONTRIBUTING.md
(if you have this file) for details on our code of conduct, and the process for submitting pull requests to us.
- Adrian Wesek - adigoryl
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details