README.md 2.36 KB
Newer Older
1
# FSL-MRS
Saad Jbabdi's avatar
Saad Jbabdi committed
2
3


Saad Jbabdi's avatar
Saad Jbabdi committed
4
### Description
Saad Jbabdi's avatar
Saad Jbabdi committed
5

Saad Jbabdi's avatar
Saad Jbabdi committed
6
7
8
9
10
FSL-MRS is a collection of python modules and wrapper scripts for pre-processing and model fitting of Magnetic Resonance Spectroscopy (MRS) data.

---
### Installation 

11
12
13
To get the packaged example data, make sure [git-lfs](https://git-lfs.github.com/) is installed.

    git clone --recurse-submodules https://git.fmrib.ox.ac.uk/saad/fsl_mrs.git
Saad Jbabdi's avatar
Saad Jbabdi committed
14
15
16
    cd fsl_mrs
    pip install .

William Clarke's avatar
William Clarke committed
17
18
19
20
#### Dependencies

    pip install spec2nii

Saad Jbabdi's avatar
Saad Jbabdi committed
21
After installation see the [quick start guide](https://users.fmrib.ox.ac.uk/~saad/fsl_mrs/html/quick_start.html).
William Clarke's avatar
William Clarke committed
22

Saad Jbabdi's avatar
Saad Jbabdi committed
23
---
Saad Jbabdi's avatar
Saad Jbabdi committed
24

25
26
### Content

Saad Jbabdi's avatar
Saad Jbabdi committed
27
28
29
#### Scripts:

- **fsl\_mrs**
Saad Jbabdi's avatar
Saad Jbabdi committed
30
: fit a single voxel spectroscopy (SVS) spectrum 
Saad Jbabdi's avatar
Saad Jbabdi committed
31
- **fsl\_mrsi**
William Clarke's avatar
William Clarke committed
32
33
: fit a 3D volume of 1D spectra 
- **fsl\_mrs\_proc**
Saad Jbabdi's avatar
Saad Jbabdi committed
34
: pre-processing (coil combination, averaging, phase correction, outlier rejection, water suppression, eddy-current correction) 
William Clarke's avatar
William Clarke committed
35
36
- **fsl\_mrs\_preproc**
: Pre-packaged processing for non-edited SVS. 
Saad Jbabdi's avatar
Saad Jbabdi committed
37
- **fsl\_mrs\_sim**
William Clarke's avatar
William Clarke committed
38
: simulate basis spectra
Saad Jbabdi's avatar
Saad Jbabdi committed
39
- **mrs_vis**
William Clarke's avatar
William Clarke committed
40
41
42
: quick visualisation of the spectra or basis spectra
- **svs_segment & mrsi_segment**
: Run tissue segmentation for SVS/MRSI from T1 image.
Saad Jbabdi's avatar
Saad Jbabdi committed
43
44
45

---

William Clarke's avatar
William Clarke committed
46
### Usage
Saad Jbabdi's avatar
Saad Jbabdi committed
47
48
49

For each of the wrapper scripts above, simply type `<name_of_script> --help` to get the usage.

William Clarke's avatar
William Clarke committed
50
51
Example command-line usage is demonstrated in the packaged [Jupyter Notebook](https://git.fmrib.ox.ac.uk/saad/fsl_mrs/-/blob/master/example_usage/Example%20SVS%20processing%20-%20command-line.ipynb.).

Saad Jbabdi's avatar
Saad Jbabdi committed
52
Documentation can be found online [here](https://users.fmrib.ox.ac.uk/~saad/fsl_mrs/html/index.html).
Saad Jbabdi's avatar
Saad Jbabdi committed
53

William Clarke's avatar
William Clarke committed
54
### File types
Saad Jbabdi's avatar
Saad Jbabdi committed
55

William Clarke's avatar
William Clarke committed
56
FSL-MRS accepts FID data in NIfTI + JSON format. Some scripts can also read .RAW (LCModel) and text (jMRUI).
Saad Jbabdi's avatar
Saad Jbabdi committed
57

William Clarke's avatar
William Clarke committed
58
Conversion to NIfTI is provided by [spec2nii](https://github.com/wexeee/spec2nii).
Saad Jbabdi's avatar
Saad Jbabdi committed
59

William Clarke's avatar
William Clarke committed
60
### Working in python
Saad Jbabdi's avatar
Saad Jbabdi committed
61

William Clarke's avatar
William Clarke committed
62
63
64
If you don't want to use the wrapper scripts, you can use the python modules directly in your own python scripts/programs. Or in an interactive Python environment (see example [notebook](https://git.fmrib.ox.ac.uk/saad/fsl_mrs/-/blob/master/example_usage/Example%20SVS%20processing%20-%20interactive%20notebook.ipynb)) 

---
Saad Jbabdi's avatar
Saad Jbabdi committed
65

William Clarke's avatar
William Clarke committed
66
### Permissions and citations
Saad Jbabdi's avatar
Saad Jbabdi committed
67

William Clarke's avatar
William Clarke committed
68
If you use FSL-MRS in your research please cite:
Saad Jbabdi's avatar
Saad Jbabdi committed
69

Saad Jbabdi's avatar
Saad Jbabdi committed
70
71
72
    Clarke WT, Jbabdi S. FSL-MRS: An end-to-end spectroscopy analysis package. Biorxiv 2020

Please see the [LICENSE](https://git.fmrib.ox.ac.uk/saad/fsl_mrs/-/blob/master/LICENSE) file for licensing information.
Saad Jbabdi's avatar
Saad Jbabdi committed
73
74
75
76