neurocombat
Harmonization of multi-site imaging data with ComBat (Python)
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: sciencedirect.com -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.7%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Harmonization of multi-site imaging data with ComBat (Python)
Basic Info
Statistics
- Stars: 133
- Watchers: 3
- Forks: 36
- Open Issues: 16
- Releases: 0
Topics
Metadata Files
README.md
Multi-site harmonization in Python with neuroCombat
This is the maintained and official version of neuroCombat (previously hosted here) introduced in our our recent paper.
Installation
neuroCombat is hosted on PyPI, and the easiest way to install neuroCombat is to use the pip command:
pip install neuroCombat
Usage
The neuroCombat function performs harmonization
```python from neuroCombat import neuroCombat import pandas as pd import numpy as np
Getting example data
200 rows (features) and 10 columns (scans)
data = np.genfromtxt('testdata/testdata.csv', delimiter=",", skip_header=1)
Specifying the batch (scanner variable) as well as a biological covariate to preserve:
covars = {'batch':[1,1,1,1,1,2,2,2,2,2], 'gender':[1,2,1,2,1,2,1,2,1,2]} covars = pd.DataFrame(covars)
To specify names of the variables that are categorical:
categorical_cols = ['gender']
To specify the name of the variable that encodes for the scanner/batch covariate:
batch_col = 'batch'
Harmonization step:
datacombat = neuroCombat(dat=data, covars=covars, batchcol=batchcol, categoricalcols=categorical_cols)["data"] ```
Optional arguments
eb:TrueorFalse. Should Empirical Bayes be performed? IfFalse, the harmonization model will be fit for each feature separately. This is equivalent to performing a location/shift (L/S) correction to each feature separately (no information pooling across features).parametric:TrueorFalse. Should parametric adjustements be performed?Trueby default.mean_only:TrueorFalse. Should only be means adjusted (no scaling)?Falseby defaultref_batch: batch name to be used as the reference batch for harmonization.Noneby default, in which case the average across scans/images/sites is taken as the reference batch.
Output
Since version 0.2.10, the neuroCombat function outputs a dictionary with 3 elements:
- data: A numpy array of the harmonized data, with the same dimension (shape) as the input data.
- estimates: A dictionary of the neuroCombat estimates; useful for visualization and understand scanner effects.
- info: A dictionary of the inputs needed for ComBat harmonization (batch/scanner information, etc.)
To simply return the harmonized data, one can use the following:
data_combat = neuroCombat(dat=dat, ...)["data"]
where ... are the user-specified arguments needed for harmonization.
Owner
- Name: Jean-Philippe Fortin
- Login: Jfortin1
- Kind: user
- Location: San Francisco
- Company: Genentech
- Website: https://scholar.google.com/citations?user=cpVxkJIAAAAJ&hl=en
- Repositories: 48
- Profile: https://github.com/Jfortin1
Senior Principal Scientist @ Genentech
GitHub Events
Total
- Issues event: 4
- Watch event: 27
- Issue comment event: 7
- Pull request event: 1
- Fork event: 1
Last Year
- Issues event: 4
- Watch event: 27
- Issue comment event: 7
- Pull request event: 1
- Fork event: 1
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jean-Philippe Fortin | f****e@g****m | 21 |
| Jean-Philippe Fortin | f****6@g****m | 10 |
| Tim | t****f@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 21
- Total pull requests: 10
- Average time to close issues: 4 months
- Average time to close pull requests: 7 days
- Total issue authors: 18
- Total pull request authors: 10
- Average comments per issue: 1.1
- Average comments per pull request: 0.9
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 3
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ggbioing (2)
- MengxiaGAO (2)
- Melissa1909 (2)
- wiegertj (1)
- shrimpj (1)
- gourdchen (1)
- diegoaper (1)
- Lieke2306 (1)
- xuesongwang (1)
- Jfortin1 (1)
- allucas (1)
- fluese (1)
- pedrob37 (1)
- AmericaBG (1)
- ilariagabusi (1)
Pull Request Authors
- Terf (1)
- kwagstyl (1)
- hokifung (1)
- Jfortin1 (1)
- dependabot[bot] (1)
- sahahn (1)
- swwalsh (1)
- felixdumais (1)
- smkia (1)
- tao558 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 821 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 15
- Total maintainers: 1
pypi.org: neurocombat
ComBat algorithm for harmonizing multi-site imaging data
- Homepage: https://github.com/Jfortin1/neuroCombat
- Documentation: https://neurocombat.readthedocs.io/
- License: MIT license
-
Latest release: 0.2.12
published almost 5 years ago
Rankings
Maintainers (1)
Dependencies
- numpy ==1.16.5
- pandas ==1.0.3