https://github.com/martin3141/spant
Tools for reading, visualising and processing Magnetic Resonance Spectroscopy data
https://github.com/martin3141/spant
brain cran mri mrs mrshub spectroscopy
Last synced: 8 months ago
JSON representation
Tools for reading, visualising and processing Magnetic Resonance Spectroscopy data
- Host: GitHub
- URL: https://github.com/martin3141/spant
- Owner: martin3141
- License: gpl-3.0
- Created: 2016-11-15T08:25:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-10-16T15:02:19.000Z (8 months ago)
- Last Synced: 2025-10-16T17:53:35.754Z (8 months ago)
- Topics: brain, cran, mri, mrs, mrshub, spectroscopy
- Language: R
- Homepage: https://martin3141.github.io/spant
- Size: 97.7 MB
- Stars: 27
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r setup, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-",
fig.width = 6,
fig.height = 5
)
```
# Spectroscopy Analysis Tools (spant)
[](https://github.com/martin3141/spant/actions)
[](https://doi.org/10.21105/joss.03646)
[](https://cran.r-project.org/package=spant)
[](https://cran.r-project.org/package=spant)
## Overview
spant provides a full suite of tools to build automated analysis pipelines for Magnetic Resonance Spectroscopy (MRS) data. The following features and algorithms are included:
* Advanced fully-automated metabolite fitting algorithm - ABfit https://onlinelibrary.wiley.com/doi/10.1002/mrm.28385, https://onlinelibrary.wiley.com/doi/10.1002/mrm.30462.
* Robust retrospective frequency and phase correction - RATS https://onlinelibrary.wiley.com/doi/abs/10.1002/mrm.27605.
* Support for common MRS data formats including read / write NIfTI MRS - https://onlinelibrary.wiley.com/doi/10.1002/mrm.29418.
* Flexible data types to support single voxel, dynamic and spectroscopic imaging.
* Raw data import from individual coils and dynamic measurements, eg support for importing individual FIDs from Siemens TWIX formatted data.
* Publication quality plotting.
* Extensive set of pre-processing steps (phasing, coil-combination, zero-filling, HSVD filtering...).
* Quantum mechanical based simulation for experimental design and basis-set generation.
* Set of metabolite, macromolecule and lipid parameters for typical brain analyses.
* Voxel registration to anatomical images for partial volume concentration corrections.
## Documentation
The [online spant user manual](https://spantdoc.wilsonlab.co.uk/) ([pdf version](https://spantdoc.wilsonlab.co.uk/spant-User-Manual.pdf)) is written for users with minimal experience in R or MRS processing and is the best place to start.
For more advanced users, help developing custom analysis pipeline can be found
below.
Introduction : https://martin3141.github.io/spant/articles/spant-intro.html
Short tutorials : https://martin3141.github.io/spant/articles/
Function reference : https://martin3141.github.io/spant/reference/
Once the spant library has been loaded with `library(spant)`, type `?spant` on the console for instructions on how to access the offline documentation. Note that offline help on the available functions can be quickly shown in RStudio using `?function_name`, eg `?read_mrs`.
## Basic installation
Download and install the latest version of R (https://cloud.r-project.org/), or with your package manager if using a recent Linux distribution, eg `sudo apt install r-base`.
It is also strongly recommended to install RStudio Desktop (https://rstudio.com/products/rstudio/download) to provide a modern environment for interactive data analysis.
Once R and RStudio have been installed, open the RStudio application and type the following in the Console (lower left panel) to install the latest stable version of spant:
```{r cran, eval = FALSE}
install.packages("spant", dependencies = TRUE)
```
Or the the development version from GitHub (requires the `devtools` package):
```{r github, eval = FALSE}
install.packages("devtools")
devtools::install_github("martin3141/spant", ref = "devel", dependencies = TRUE)
```