imaging-transcriptomics


Nameimaging-transcriptomics JSON
Version 1.1.15 PyPI version JSON
download
home_pagehttps://github.com/alegiac95/Imaging-transcriptomics
SummaryA package to perform imaging transcriptomics analysis on a neuroimaging brain scan.
upload_time2024-06-27 08:20:46
maintainerNone
docs_urlNone
authorAlessio Giacomel, Daniel Martins
requires_python<3.9,>=3.6
licenseGPLv3
keywords image analysis neuroimaging imaging transcriptomics medical imaging research multimodal imaging
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Imaging Transcriptomics

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6364963.svg)](https://doi.org/10.5281/zenodo.6364963)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Maintainer](https://img.shields.io/badge/maintainer-alegiac95-blue)](https://github.com/alegiac95)
[![Generic badge](https://img.shields.io/badge/python->=3.6-blue.svg)](https://www.python.org/doc/versions/)
[![Documentation Status](https://readthedocs.org/projects/imaging-transcriptomics/badge/?version=latest)](https://imaging-transcriptomics.readthedocs.io/en/latest/?badge=latest)


![Imaging-transcriptomics_overwiew](https://raw.githubusercontent.com/alegiac95/imt/main/.github/images/imaging_transcriptomics.png
 "Overview of the imaging 
transcriptomics methodology")

Imaging transcriptomics is a methodology that allows to identify patterns of correlation between gene expression and some
property of brain structure or function as measured by neuroimaging (e.g., MRI, fMRI, PET).

---

The `imaging-transcriptomics` package allows performing imaging transcriptomics analysis on a neuroimaging scan 
(e.g., PET, MRI, fMRI...). 

The software is implemented in Python3 (v.3.7), its source code is available on GitHub, it can be installed via Pypi and
is released under the GPL v3 license. 



> **NOTE** Versions from v1.0.0 are or will be maintained. The original script linked by the BioRxiv preprint (v0.0) is 
> [still available on GitHub](https://github.com/alegiac95/Imaging_Transcriptomics_preprint) but no changes will be made to that code. If you have downloaded or used that script please 
> update to the newer version by installing this new version.

## Installation

> **NOTE** We recommend to install the package in a dedicated environment of your choice 
> (e.g., [venv](https://docs.python.org/3/library/venv.html) or [anaconda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)). Once you have created your environment and you
> have activated it, you can follow the below guide to install the package and dependencies. This process will avoid 
> clashes between conflicting packages that could happen during/after the installation.


> **TIP**: To create easily an environment on your machine download the `environment.yml` file from the [Github repo](https://github.com/alegiac95/Imaging-transcriptomics/) and install the environemnt with the command: `conda env create -f environment.yml`, then you can proceed with the following steps.

To install the `imaging-transcriptomics` Python package, first you will need to install an additional package that can't be installed directly from PyPi, but require to be downloaded from GitHub.
This package to install is [pypyls](https://github.com/netneurolab/pypyls). To install this package you can follow the installation on the documentation for the package or simply run the command
```shell
pip install -e git+https://github.com/netneurolab/pypyls.git/#egg=pyls
```

After this, to download the package, and its dependencies directly from GitHub by using `pip`.

Once this package is installed you can install the `imaging-transcriptomics` package by running
```shell
pip install imaging-transcriptomics
```


> **WARNING** At this time the package might some problems running on Mac 
> computers that have the M1 chip instead of the Intel ones. The problem is 
> not due to the package but on the chip architecture in running Python. 
> We're currently working to test some solution for this.

> **WARNING** There is an issue in running the toolbox in Windows OS experienced by some users.
> One of the packages used tries to write a file for some analyses which the OS doesn't allow,
> resulting in a fatal error.
## Usage


Once installed the software can be used in two ways:
- as standalone script
- as part of some python script

> **WARNING** Before running the script make sure the Pyhton environment where you have installed the package is activated.


### Standalone script
---
To run the standalone script from the terminal use the command:
```shell
imagingtranscriptomics options {corr, pls}
```

The `options` available are:
- `-i (--input)`: Path to the imaging file to analise. The path should be given to the program as an absolute path (e.g., `/Users/myusername/Documents/my_scan.nii`, since a relative path could raise permission errors and crashes. The script only accepts imaging files in the NIfTI format (`.nii`, `.nii.gz`).
- `-o (--output)` *(optional)*: Path where to save the results. If none is provided the results will be saved in the same directory as the input scan.
- `-r` *(optional)*: Regions of the brain to use for the estimation. Can be either "cort+sub" (or equivalently "all") to use all regions or "cort" to use only cortical regions.
- `--no-gsea` *(optional)*: If this option is provided the GSEA analysis will not be performed.
- `--geneset` *(optional)*: Name of the geneset to use to run GSEA. The 
  full list is available in the documentation or by running the `imt_gsea 
  avail` command.
Additionally to the above options two specific commands (required) are available:
- `corr`: To run the correlation analysis.
- `pls`: To run the PLS analysis. If you choose to run the pls analysis 
  there are two additional options available:
  - `--ncomp`: number of components to use in the PLS analysis.
  - `--var`: variance to estimate from the data.

### Part of Python script

---
When used as part of a Python script the library can be imported as:
```python
import imaging_transcriptomics as imt
```

The core class of the package is the `ImagingTranscriptomics` class which  gives access to the methods used in the standalone script.
To use the analysis in your scripts you can initialise the class and then simply call the `ImagingTranscriptomics().run()` method.

```python
import numpy as np
import imaging_transcriptomics as imt
my_data = np.ones(41)  # MUST be of size 41 
                       # (corresponds to the regions in left hemisphere of the DK atlas)

analysis = imt.ImagingTranscriptomics(my_data, method="pls", n_components=1,
                                      regions="cort+sub")
analysis.run(gsea=False)
# If instead of running PLS you want to analysze the data with correlation you can run the analysis with:
analysis = imt.ImagingTranscriptomics(my_data, method="corr", 
                                      regions="cort+sub")
```

Once completed the results will be part of the `analysis` object and can be accessed with `analysis.gene_results`.

The import of the `imaging_transcriptomics` package will import other helpful functions for input and reporting. For a complete explanation of this please refer to the [official documentation](https://imaging-transcriptomics.readthedocs.io/en/latest/) of the package.


### Documentation

The documentation of the script is available at [imaging-transcriptomics.rtfd.io/](https://imaging-transcriptomics.rtfd.io/en/latest/). 

### Troubleshooting

For any problems with the software you can [open an issue in GitHub](https://github.com/alegiac95/Imaging-transcriptomics/issues) or [contact the maintainer](mailto:alessio.giacomel@kcl.ac.uk)) of the package.

### Citing

If you publish work using `imaging-transcriptomics` as part of your analysis please cite:

>*Imaging transcriptomics: Convergent cellular, transcriptomic, and 
> molecular neuroimaging signatures in the healthy adult human brain.* 
> Daniel Martins, Alessio Giacomel, Steven CR Williams, Federico Turkheimer,
> Ottavia Dipasquale, Mattia Veronese, PET templates working group. Cell 
> Reports; doi: [https://doi.org/10.1016/j.celrep.2021.110173](https://doi.org/10.1016/j.celrep.2021.110173)


>*Imaging-transcriptomics: Second release update (v1.0.2)*.Alessio Giacomel, & Daniel Martins. (2021). Zenodo. https://doi.org/10.5281/zenodo.5726839

>*Integrating neuroimaging and gene expression data using the imaging transcriptomics toolbox*. 
> Alessio Giacomel, Daniel Martins, Matteo Frigo, Federico Turkheimer, Steven CR Williams, Ottavia Dipasquale, and Mattia Veronese. STAR Protocols; doi: [https://doi.org/10.1016/j.xpro.2022.101315](https://doi.org/10.1016/j.xpro.2022.101315)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/alegiac95/Imaging-transcriptomics",
    "name": "imaging-transcriptomics",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.9,>=3.6",
    "maintainer_email": null,
    "keywords": "Image analysis, Neuroimaging, Imaging Transcriptomics, Medical Imaging, Research, Multimodal Imaging",
    "author": "Alessio Giacomel, Daniel Martins",
    "author_email": "alessio.giacomel@kcl.ac.uk , daniel.martins@kcl.ac.uk",
    "download_url": "https://files.pythonhosted.org/packages/7f/48/f85141bf36d55d55b21c223a9a6ed34f8321bc8487671b5ba6ecd59a929e/imaging-transcriptomics-1.1.15.tar.gz",
    "platform": null,
    "description": "# Imaging Transcriptomics\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6364963.svg)](https://doi.org/10.5281/zenodo.6364963)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![Maintainer](https://img.shields.io/badge/maintainer-alegiac95-blue)](https://github.com/alegiac95)\n[![Generic badge](https://img.shields.io/badge/python->=3.6-blue.svg)](https://www.python.org/doc/versions/)\n[![Documentation Status](https://readthedocs.org/projects/imaging-transcriptomics/badge/?version=latest)](https://imaging-transcriptomics.readthedocs.io/en/latest/?badge=latest)\n\n\n![Imaging-transcriptomics_overwiew](https://raw.githubusercontent.com/alegiac95/imt/main/.github/images/imaging_transcriptomics.png\n \"Overview of the imaging \ntranscriptomics methodology\")\n\nImaging transcriptomics is a methodology that allows to identify patterns of correlation between gene expression and some\nproperty of brain structure or function as measured by neuroimaging (e.g., MRI, fMRI, PET).\n\n---\n\nThe `imaging-transcriptomics` package allows performing imaging transcriptomics analysis on a neuroimaging scan \n(e.g., PET, MRI, fMRI...). \n\nThe software is implemented in Python3 (v.3.7), its source code is available on GitHub, it can be installed via Pypi and\nis released under the GPL v3 license. \n\n\n\n> **NOTE** Versions from v1.0.0 are or will be maintained. The original script linked by the BioRxiv preprint (v0.0) is \n> [still available on GitHub](https://github.com/alegiac95/Imaging_Transcriptomics_preprint) but no changes will be made to that code. If you have downloaded or used that script please \n> update to the newer version by installing this new version.\n\n## Installation\n\n> **NOTE** We recommend to install the package in a dedicated environment of your choice \n> (e.g., [venv](https://docs.python.org/3/library/venv.html) or [anaconda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)). Once you have created your environment and you\n> have activated it, you can follow the below guide to install the package and dependencies. This process will avoid \n> clashes between conflicting packages that could happen during/after the installation.\n\n\n> **TIP**: To create easily an environment on your machine download the `environment.yml` file from the [Github repo](https://github.com/alegiac95/Imaging-transcriptomics/) and install the environemnt with the command: `conda env create -f environment.yml`, then you can proceed with the following steps.\n\nTo install the `imaging-transcriptomics` Python package, first you will need to install an additional package that can't be installed directly from PyPi, but require to be downloaded from GitHub.\nThis package to install is [pypyls](https://github.com/netneurolab/pypyls). To install this package you can follow the installation on the documentation for the package or simply run the command\n```shell\npip install -e git+https://github.com/netneurolab/pypyls.git/#egg=pyls\n```\n\nAfter this, to download the package, and its dependencies directly from GitHub by using `pip`.\n\nOnce this package is installed you can install the `imaging-transcriptomics` package by running\n```shell\npip install imaging-transcriptomics\n```\n\n\n> **WARNING** At this time the package might some problems running on Mac \n> computers that have the M1 chip instead of the Intel ones. The problem is \n> not due to the package but on the chip architecture in running Python. \n> We're currently working to test some solution for this.\n\n> **WARNING** There is an issue in running the toolbox in Windows OS experienced by some users.\n> One of the packages used tries to write a file for some analyses which the OS doesn't allow,\n> resulting in a fatal error.\n## Usage\n\n\nOnce installed the software can be used in two ways:\n- as standalone script\n- as part of some python script\n\n> **WARNING** Before running the script make sure the Pyhton environment where you have installed the package is activated.\n\n\n### Standalone script\n---\nTo run the standalone script from the terminal use the command:\n```shell\nimagingtranscriptomics options {corr, pls}\n```\n\nThe `options` available are:\n- `-i (--input)`: Path to the imaging file to analise. The path should be given to the program as an absolute path (e.g., `/Users/myusername/Documents/my_scan.nii`, since a relative path could raise permission errors and crashes. The script only accepts imaging files in the NIfTI format (`.nii`, `.nii.gz`).\n- `-o (--output)` *(optional)*: Path where to save the results. If none is provided the results will be saved in the same directory as the input scan.\n- `-r` *(optional)*: Regions of the brain to use for the estimation. Can be either \"cort+sub\" (or equivalently \"all\") to use all regions or \"cort\" to use only cortical regions.\n- `--no-gsea` *(optional)*: If this option is provided the GSEA analysis will not be performed.\n- `--geneset` *(optional)*: Name of the geneset to use to run GSEA. The \n  full list is available in the documentation or by running the `imt_gsea \n  avail` command.\nAdditionally to the above options two specific commands (required) are available:\n- `corr`: To run the correlation analysis.\n- `pls`: To run the PLS analysis. If you choose to run the pls analysis \n  there are two additional options available:\n  - `--ncomp`: number of components to use in the PLS analysis.\n  - `--var`: variance to estimate from the data.\n\n### Part of Python script\n\n---\nWhen used as part of a Python script the library can be imported as:\n```python\nimport imaging_transcriptomics as imt\n```\n\nThe core class of the package is the `ImagingTranscriptomics` class which  gives access to the methods used in the standalone script.\nTo use the analysis in your scripts you can initialise the class and then simply call the `ImagingTranscriptomics().run()` method.\n\n```python\nimport numpy as np\nimport imaging_transcriptomics as imt\nmy_data = np.ones(41)  # MUST be of size 41 \n                       # (corresponds to the regions in left hemisphere of the DK atlas)\n\nanalysis = imt.ImagingTranscriptomics(my_data, method=\"pls\", n_components=1,\n                                      regions=\"cort+sub\")\nanalysis.run(gsea=False)\n# If instead of running PLS you want to analysze the data with correlation you can run the analysis with:\nanalysis = imt.ImagingTranscriptomics(my_data, method=\"corr\", \n                                      regions=\"cort+sub\")\n```\n\nOnce completed the results will be part of the `analysis` object and can be accessed with `analysis.gene_results`.\n\nThe import of the `imaging_transcriptomics` package will import other helpful functions for input and reporting. For a complete explanation of this please refer to the [official documentation](https://imaging-transcriptomics.readthedocs.io/en/latest/) of the package.\n\n\n### Documentation\n\nThe documentation of the script is available at [imaging-transcriptomics.rtfd.io/](https://imaging-transcriptomics.rtfd.io/en/latest/). \n\n### Troubleshooting\n\nFor any problems with the software you can [open an issue in GitHub](https://github.com/alegiac95/Imaging-transcriptomics/issues) or [contact the maintainer](mailto:alessio.giacomel@kcl.ac.uk)) of the package.\n\n### Citing\n\nIf you publish work using `imaging-transcriptomics` as part of your analysis please cite:\n\n>*Imaging transcriptomics: Convergent cellular, transcriptomic, and \n> molecular neuroimaging signatures in the healthy adult human brain.* \n> Daniel Martins, Alessio Giacomel, Steven CR Williams, Federico Turkheimer,\n> Ottavia Dipasquale, Mattia Veronese, PET templates working group. Cell \n> Reports; doi: [https://doi.org/10.1016/j.celrep.2021.110173](https://doi.org/10.1016/j.celrep.2021.110173)\n\n\n>*Imaging-transcriptomics: Second release update (v1.0.2)*.Alessio Giacomel, & Daniel Martins. (2021). Zenodo. https://doi.org/10.5281/zenodo.5726839\n\n>*Integrating neuroimaging and gene expression data using the imaging transcriptomics toolbox*. \n> Alessio Giacomel, Daniel Martins, Matteo Frigo, Federico Turkheimer, Steven CR Williams, Ottavia Dipasquale, and Mattia Veronese. STAR Protocols; doi: [https://doi.org/10.1016/j.xpro.2022.101315](https://doi.org/10.1016/j.xpro.2022.101315)\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "A package to perform imaging transcriptomics analysis on a neuroimaging brain scan.",
    "version": "1.1.15",
    "project_urls": {
        "Bug Reports": "https://github.com/alegiac95/Imaging-transcriptomics/issues",
        "Documentation": "https://imaging-transcriptomics.rtfd.io/",
        "Homepage": "https://github.com/alegiac95/Imaging-transcriptomics",
        "Source": "https://github.com/alegiac95/Imaging-transcriptomics"
    },
    "split_keywords": [
        "image analysis",
        " neuroimaging",
        " imaging transcriptomics",
        " medical imaging",
        " research",
        " multimodal imaging"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f48f85141bf36d55d55b21c223a9a6ed34f8321bc8487671b5ba6ecd59a929e",
                "md5": "15d8ae472935ad488bc11c0f6a5f92f3",
                "sha256": "c73963dd6bd8b210c7a406637d5f44f65a7c1ca7d041a8e250e023a694ab8b1c"
            },
            "downloads": -1,
            "filename": "imaging-transcriptomics-1.1.15.tar.gz",
            "has_sig": false,
            "md5_digest": "15d8ae472935ad488bc11c0f6a5f92f3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.9,>=3.6",
            "size": 19896870,
            "upload_time": "2024-06-27T08:20:46",
            "upload_time_iso_8601": "2024-06-27T08:20:46.948601Z",
            "url": "https://files.pythonhosted.org/packages/7f/48/f85141bf36d55d55b21c223a9a6ed34f8321bc8487671b5ba6ecd59a929e/imaging-transcriptomics-1.1.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-27 08:20:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "alegiac95",
    "github_project": "Imaging-transcriptomics",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "requirements": [],
    "lcname": "imaging-transcriptomics"
}
        
Elapsed time: 0.34182s