Skip to content

Commit f2a2dd7

Browse files
Updated README.md (#74)
Minor updates to README
1 parent 94cb119 commit f2a2dd7

File tree

1 file changed

+37
-101
lines changed

1 file changed

+37
-101
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 37 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,64 @@
1-
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
2-
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
3-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
41
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)
5-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
6-
72
[![DOI](https://zenodo.org/badge/224148416.svg)](https://zenodo.org/badge/latestdoi/224148416) [![PyPI version](https://badge.fury.io/py/vb-toolbox.svg)](https://badge.fury.io/py/vb-toolbox)
83

94

105
# VBIndex
11-
Vogt-Bailey index [1], [2], [3], [4] toolbox in Python
6+
Vogt-Bailey index [1-4] toolbox in Python
127

138
## Installation as a Python package
149

1510
Clone the repository:
1611
```bash
17-
git clone [text](https://github.com/VBIndex/py_vb_toolbox.git)
12+
git clone [https://github.com/VBIndex/py_vb_toolbox.git](https://github.com/VBIndex/py_vb_toolbox.git)
13+
cd py_vb_toolbox
1814
```
1915

20-
Proceed to install the toolbox via pip.
16+
Proceed to install the toolbox via pip from the main project directory:
17+
2118
```bash
22-
pip install py_vb_toolbox/
19+
pip install .
2320
```
2421

25-
The installation will automatically install the dependancies specified in the `requirements.txt` file. In your terminal, check to see whether the VB toolbox has been properly installed by running:
22+
The installation will automatically install the dependencies specified in the requirements.txt file. In your terminal, check to see whether the VB toolbox has been properly installed by running:
2623

2724
```bash
28-
vb_tool
25+
vb_tool --help
2926
```
3027

31-
If you see the following output, the pre-requisites have been properly installed.
28+
If you see output similar to the following (specifically showing vb_tool usage and the volumetric subcommand), the prerequisites have been properly installed.
3229

33-
```
34-
usage: app.py [-h] {volumetric} ...
30+
```bash
31+
usage: vb_tool [-h] {volumetric} ...
3532

36-
Calculate the Vogt-Bailey index of a dataset. For more information, refer to
37-
https://github.com/VBIndex/py_vb_toolbox.
33+
Calculate the Vogt-Bailey Index of a dataset. For more information, refer to
34+
[https://github.com/VBIndex/py_vb_toolbox](https://github.com/VBIndex/py_vb_toolbox).
3835

3936
options:
40-
-h, --help show this help message and exit
37+
-h, --help show this help message and exit
4138

4239
VB method:
43-
{volumetric} Different methods for computing the VB Index
44-
volumetric Computes the VB Index on volumetric data using a searchlight approach
45-
46-
authors:
47-
48-
The VB Index Team (See Contributors Section in the main README)
49-
50-
references:
51-
52-
Bajada, C. J., Campos, L. Q. C., Caspers, S., Muscat, R., Parker, G. J., Ralph, M. A. L., ... & Trujillo-
53-
Barreto, N. J. (2020). A tutorial and tool for exploring feature similarity gradients with MRI data.
54-
NeuroImage, 221, 117140.
55-
56-
Ciantar, K. G., Farrugia, C., Galdi, P., Scerri, K., Xu, T., & Bajada, C. J. (2022). Geometric effects of
57-
volume-to-surface mapping of fMRI data. Brain Structure and Function, 227(7), 2457-2464.
58-
59-
Farrugia, C., Galdi, P., Irazu, I. A., Scerri, K., & Bajada, C. J. (2024). Local gradient analysis of human
60-
brain function using the Vogt-Bailey Index. Brain Structure and Function, 229(2), 497-512.
40+
{volumetric} Different methods for computing the VB Index
41+
volumetric Computes the VB Index on volumetric data using a searchlight
42+
approach
6143

62-
Galea, K., Escudero, A. A., Montalto, N. A., Vella, N., Smith, R. E., Farrugia, C., ... & Bajada, C. J. (2025).
63-
Testing the Vogt-Bailey Index using task-based fMRI across pulse sequence protocols. bioRxiv, 2025-02.
64-
65-
copyright:
66-
67-
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General
68-
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
69-
option) any later version.
70-
71-
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
72-
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
73-
for more details.
74-
75-
You should have received a copy of the GNU General Public License along with this program. If not, see
76-
<https://www.gnu.org/licenses>.
7744
```
7845

7946
## Usage
8047

81-
### 1.1 Volumetric VB Index
48+
### Volumetric VB Index
8249

83-
The VB Index has been tested using a searchlight analysis with no surface mapping. This method for running the VB Index
84-
is referred to as "Volumetric analysis" and can be carried out with the following command:
50+
This toolbox calculates the VB Index using a searchlight approach directly on volumetric data (NIfTI format). This method is referred to as "Volumetric analysis" and can be carried out with the following command:
8551

8652
```bash
8753
vb_tool volumetric --data input_data/data.nii.gz --output volumetric_output
8854
```
8955

90-
This is the simplest way to run this analysis. It will output two files, ```-vol.nii.gz``` and ```-neigh.nii.gz```. The first file is going to store the information from the analysis. On the other hand, the second file is going to store the neighbourhood used for every voxel, so the output should be a cube.
56+
This is the simplest way to run this analysis. It will output two files using the base name provided with --output and the normalization method used (e.g., volumetric_output.unnorm.vbi-vol.nii.gz and volumetric_output.unnorm.vbi-neigh.nii.gz).
57+
58+
* The *.vbi-vol.nii.gz file stores the calculated VB Index (or ReHo value) for each voxel.
59+
* The *.vbi-neigh.nii.gz file stores the number of neighbours included in the searchlight calculation for each voxel.
9160

92-
This may take a while since the tool will try to compute the VB index for every voxel and for every voxel both inside and outside of the brain. In order to speed this up, a volumetric mask can be specified:
61+
The analysis computes the index for every voxel within the NIfTI file's dimensions. This can take time. To speed this up and restrict the analysis to brain voxels, provide a volumetric brain mask:
9362

9463
```bash
9564
vb_tool volumetric --data input_data/data.nii.gz --volmask input_data/volumetric_mask.nii.gz --output volumetric_output
@@ -100,57 +69,40 @@ vb_tool volumetric --data input_data/data.nii.gz --volmask input_data/volumetric
10069
The VB Toolbox also supports analysing data with the Regional Homogeneity (ReHo) index [5]. The ReHo index measures the similarity between the Blood Oxygen Level Dependent (BOLD) signal of a voxel with respect to its immediate neighbors. To run ReHo for volumetric analysis:
10170

10271
```bash
103-
vb_tool volumetric --data input_data/data.nii.gz --volmask input_data/volumetric_mask.nii.gz --reho --output volumetric_output
72+
vb_tool volumetric --data input_data/data.nii.gz --volmask input_data/volumetric_mask.nii.gz --reho --output volumetric_reho_output
10473
```
10574

75+
*(Note: Output filenames will reflect the ReHo analysis, e.g., volumetric_reho_output.unnorm.vbi-vol.nii.gz)*
76+
10677
## General Notes
10778

10879
### Note on the data file
10980

110-
`vb_tool` can handle two separate cases. If there is a single structure in the
111-
file, `vb_tool` will read it as a matrix in which each row relates to a specific
112-
vertex. If there are two or more structures, it will read them as a series of
113-
column vectors in which each entry relates to a vertex. It will then coalesce
114-
them into a single matrix, and run the analysis of all quantities concurrently.
81+
The volumetric analysis mode expects input data (--data) as a 4D NIfTI file (e.g., fMRI time series data in .nii or .nii.gz format). The optional mask (--volmask) should be a 3D NIfTI file coregistered with the data file, containing non-zero values for voxels to be included in the analysis.
11582

11683
### Notes on parallelism
11784

118-
`vb_tool` uses a high level of parallelism. The number of threads spawned by
119-
`vb_tool` itself can be controlled using the `-j/--jobs` flag. By default, the software
120-
will try to use all the CPUs in your computer at the same time to perform the
121-
analysis. Depending on the BLAS installation on your computer, this might not
122-
be the fastest approach, but will rarely be the slowest. If you are
123-
unsure, keep the default number of jobs.
124-
125-
Due to the job structure of the `vb_tool`, the level of parallelism it can achieve
126-
on its own depends on the specific analysis being carried out.
85+
vb_tool uses multiprocessing to speed up computations. The number of parallel processes (threads) can be controlled using the -j or --jobs flag when running the volumetric command. For example:
12786

128-
1. Full brain analysis: Low level of parallelism. Will only spawn one job
129-
2. Region of Interest (ROI) analysis: Medium level of parallelism. Will spawn as many
130-
jobs as there are ROIs, or number of CPUS, whichever is the lowest.
131-
3. Any other analysis: High level of parallelism. Will spawn as many jobs as
132-
there are CPUs
87+
```bash
88+
vb_tool volumetric --data ... --output ... --jobs 4
89+
```
13390

134-
Especially for the whole brain analysis, having a well-optimized BLAS
135-
installation will greatly accelerate the process, and allow for further
136-
parallelism. Both MKL and OpenBLAS have been shown to support fast analysis. If
137-
you are using the Anaconda distribution, you will have a good BLAS
138-
pre-configured.
91+
By default, the software will try to use all available CPU cores. Depending on your system and BLAS installation, adjusting the number of jobs might yield better performance. If unsure, keeping the default is usually a safe starting point.
13992

14093
## References
141-
[1] C. J. Bajada et al., β€œA tutorial and tool for exploring feature similarity gradients with MRI data,” NeuroImage, vol. 221, pp. 117140–117140, Jul. 2020, doi: https://doi.org/10.1016/j.neuroimage.2020.117140.
94+
95+
[1] C. J. Bajada, L. Q. C. Campos, S. Caspers, R. Muscat, G. J. Parker, M. A. Lambon Ralph, ... and N. J. Trujillo-Barreto, (2020). β€œA tutorial and tool for exploring feature similarity gradients with MRI data,” NeuroImage, vol. 221, pp. 117140–117140, Jul. 2020, doi: https://doi.org/10.1016/j.neuroimage.2020.117140.
14296

14397
[2] C. Farrugia, P. Galdi, Irati Arenzana Irazu, K. Scerri, and C. J. Bajada, β€œLocal gradient analysis of human brain function using the Vogt-Bailey Index,” Brain structure & function, vol. 229, no. 2, pp. 497–512, Jan. 2024, doi: https://doi.org/10.1007/s00429-023-02751-7
14498

14599
[3] K. G. Ciantar, C. Farrugia, P. Galdi, K. Scerri, T. Xu, and C. J. Bajada, β€œGeometric effects of volume-to-surface mapping of fMRI data,” Brain Structure and Function, vol. 227, no. 7, pp. 2457–2464, Jul. 2022, doi: https://doi.org/10.1007/s00429-022-02536-4.
146100

147-
[4] K. Galea. A. A. Escudero, N. A. Montalto, N. Vella, R. E. Smith, C. Farrugia, P. Galdi, K. Scerri, L. Butler, and C. J. Bajada, β€œTesting the Vogt-Bailey Index using task-based fMRI across pulse sequence protocols,” bioRxiv, pp. 2025-02, 2025.
101+
[4] K. Galea. A. A. Escudero, N. A. Montalto, N. Vella, R. E. Smith, C. Farrugia, P. Galdi, K. Scerri, L. Butler, and C. J. Bajada, β€œTesting the Vogt-Bailey Index using task-based fMRI across pulse sequence protocols,” bioRxiv, pp. 2025-02, 2025.
148102

149103
[5] Y. Zang, T. Jiang, Y. Lu, Y. He, and L. Tian, β€œRegional homogeneity approach to fMRI data analysis,” NeuroImage, vol. 22, no. 1, pp. 394–400, May 2004, doi: https://doi.org/10.1016/j.neuroimage.2003.12.030.
150104

151-
152105
## Contributors ✨
153-
154106
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
155107
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
156108
<!-- prettier-ignore-start -->
@@ -159,30 +111,15 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
159111
<tbody>
160112
<tr>
161113
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Aitor-Alberdi"><img src="https://avatars.githubusercontent.com/u/152187460?v=4?s=100" width="100px;" alt="Aitor-Alberdi"/><br /><sub><b>Aitor-Alberdi</b></sub></a><br /><a href="https://github.com/VBIndex/py_vb_toolbox/commits?author=Aitor-Alberdi" title="Code">πŸ’»</a> <a href="#maintenance-Aitor-Alberdi" title="Maintenance">🚧</a></td>
162-
</tr>
163-
</tbody>
164-
</table>
165-
166-
<!-- markdownlint-restore -->
167-
<!-- prettier-ignore-end -->
168-
169-
<!-- ALL-CONTRIBUTORS-LIST:END -->
170-
171-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
172-
<!-- prettier-ignore-start -->
173-
<!-- markdownlint-disable -->
174-
<table>
175-
<tbody>
176-
<tr>
177114
<td align="center" valign="top" width="14.28%"><a href="https://github.com/KeithGeorgeCiantar"><img src="https://avatars1.githubusercontent.com/u/52758149?v=4?s=100" width="100px;" alt="Keith George Ciantar"/><br /><sub><b>Keith George Ciantar</b></sub></a><br /><a href="https://github.com/VBIndex/py_vb_toolbox/commits?author=KeithGeorgeCiantar" title="Code">πŸ’»</a></td>
178115
<td align="center" valign="top" width="14.28%"><a href="https://github.com/NicoleEic"><img src="https://avatars3.githubusercontent.com/u/25506847?v=4?s=100" width="100px;" alt="NicoleEic"/><br /><sub><b>NicoleEic</b></sub></a><br /><a href="https://github.com/VBIndex/py_vb_toolbox/commits?author=NicoleEic" title="Code">πŸ’»</a></td>
179116
<td align="center" valign="top" width="14.28%"><a href="http://claude.bajada.info"><img src="https://avatars3.githubusercontent.com/u/16142659?v=4?s=100" width="100px;" alt="claudebajada"/><br /><sub><b>claudebajada</b></sub></a><br /><a href="https://github.com/VBIndex/py_vb_toolbox/issues?q=author%3Aclaudebajada" title="Bug reports">πŸ›</a> <a href="#ideas-claudebajada" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="#projectManagement-claudebajada" title="Project Management">πŸ“†</a> <a href="https://github.com/VBIndex/py_vb_toolbox/commits?author=claudebajada" title="Code">πŸ’»</a></td>
180117
<td align="center" valign="top" width="14.28%"><a href="https://github.com/LucasCampos"><img src="https://avatars1.githubusercontent.com/u/2735358?v=4?s=100" width="100px;" alt="Lucas Campos"/><br /><sub><b>Lucas Campos</b></sub></a><br /><a href="https://github.com/VBIndex/py_vb_toolbox/commits?author=LucasCampos" title="Code">πŸ’»</a> <a href="https://github.com/VBIndex/py_vb_toolbox/issues?q=author%3ALucasCampos" title="Bug reports">πŸ›</a> <a href="#ideas-LucasCampos" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="#maintenance-LucasCampos" title="Maintenance">🚧</a></td>
181118
<td align="center" valign="top" width="14.28%"><a href="https://github.com/paola-g"><img src="https://avatars.githubusercontent.com/u/7580862?v=4?s=100" width="100px;" alt="paola-g"/><br /><sub><b>paola-g</b></sub></a><br /><a href="https://github.com/VBIndex/py_vb_toolbox/commits?author=paola-g" title="Code">πŸ’»</a></td>
182119
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ChristineFarrugia"><img src="https://avatars.githubusercontent.com/u/83232978?v=4?s=100" width="100px;" alt="ChristineFarrugia"/><br /><sub><b>ChristineFarrugia</b></sub></a><br /><a href="https://github.com/VBIndex/py_vb_toolbox/commits?author=ChristineFarrugia" title="Code">πŸ’»</a></td>
183-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jschewts"><img src="https://avatars.githubusercontent.com/u/68106439?v=4?s=100" width="100px;" alt="jschewts"/><br /><sub><b>jschewts</b></sub></a><br /><a href="https://github.com/VBIndex/py_vb_toolbox/commits?author=jschewts" title="Code">πŸ’»</a></td>
184120
</tr>
185121
<tr>
122+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jschewts"><img src="https://avatars.githubusercontent.com/u/68106439?v=4?s=100" width="100px;" alt="jschewts"/><br /><sub><b>jschewts</b></sub></a><br /><a href="https://github.com/VBIndex/py_vb_toolbox/commits?author=jschewts" title="Code">πŸ’»</a></td>
186123
<td align="center" valign="top" width="14.28%"><a href="http://www.kscerri.com/Personal/index.html"><img src="https://avatars.githubusercontent.com/u/153515?v=4?s=100" width="100px;" alt="Kenneth Scerri"/><br /><sub><b>Kenneth Scerri</b></sub></a><br /><a href="#projectManagement-kscerri" title="Project Management">πŸ“†</a></td>
187124
</tr>
188125
</tbody>
@@ -193,4 +130,3 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
193130

194131
<!-- ALL-CONTRIBUTORS-LIST:END -->
195132

196-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

0 commit comments

Comments
Β (0)