Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pyLQT

pyLQT, standing for “Python Lesion Quantification Toolkit”, is a toolbox designed for analysis brain-lesioned patients scans with minimal resources, regrouping several metrics for lesion quantification. It is a sucessor to LQT [1] which was originally developped on MATLAB and remastered on R [2].

The metrics are divided into three main domains:

  • Grey matter: lesion effects on grey-matter regions and parcels.
  • White matter: lesion effects on white-matter tracts and streamlines.
  • Network: lesion effects on structural or functional brain networks.

installation

pip install pyLQT

Running pyLQT

Configuration files

pyLQT uses three JSON configuration files to define the lesion cohort, atlas, and tractography dataset. Each file specifies the relevant data paths and reference space. For the simplest usage, only the lesion cohort configuration file is required, in which case the atlas and tractogram files are automatically downloaded.

Lesion configuration

Defines the lesion cohort, the folder containing the lesion NIfTI files, and their reference space.

{
    "cohort_name": "ExampleCohort",
    "lesion_folder": "lesions",
    "space": "MNI152NLin6Asym"
}
Atlas configuration

Specifies the atlas NIfTI file, its corresponding label CSV, and its reference space. The CSV must contain a Parcel column with parcel indices matching the atlas NIfTI and a Label column with the corresponding parcel names.

{
    "name": "glasser360",
    "atlas": "glasser360.nii.gz",
    "atlas_labels": "glasser360_labels.csv",
    "space": "MNI152NLin2009cAsym"
}
Tractography configuration

Specifies the tractography dataset, the folder containing its .trk files, the folder containing its reference NIfTI files, and its reference space.

{
    "name": "HCP1065",
    "tracts": "hcp1065_avg_tracts_trk",
    "references": "hcp1065_avg_tracts",
    "space": "MNI152NLin2009aAsym"
}

Notes:

  • All paths are relative to the corresponding configuration file.
  • NIfTI files can be uncompressed (.nii) or gzipped (.nii.gz).
  • The space field can specify either a standard space supported by TemplateFlow (e.g., MNI152NLin2009cAsym) or a relative path to a reference NIfTI file (.nii or .nii.gz).
  • All paths and names above are examples and should be adapted to your dataset.

basic use

Below is the simplest usage that only requires the lesion cohort configuration file. By default, the Glasser360 atlas and the HCP1065 tractogram are downloaded if not provided in the arguments.

pyLQT --lesion_cfg <path/to/lesion_config> --out_folder <path/to/outputs>
Argument Default Options / Range Description
--lesion_cfg — Path to a .json file Path to the lesion cohort configuration file.
--atlas_cfg None Path to a .json file or None Path to the atlas configuration file.
--tracts_cfg None Path to a .json file or None Path to the tracts configuration file.
--out_folder — Path to a directory Path to the output folder.
--registration_type syn syn, affine Registration type used to transform the lesion and atlas from their respective spaces to tract space.
--spared_threshold 0.5 Float between 0 and 1 Threshold used to define spared parcel-to-parcel connectivity.
--delete_tmp True True, False Whether to delete temporary files generated during processing.

Outputs

TODO

Dependencies

pyLQT relies on the following libraries:

  • numpy
  • nibabel
  • pandas
  • scipy
  • requests
  • dipy
  • templateflow
  • networkx

References

[1] Griffis et al. (2021). Lesion Quantification Toolkit: A MATLAB software tool for estimating grey matter damage and white matter disconnections in patients with focal brain lesions. NeuroImage: Clinical.

[2] Dworkin Jordan (https://github.com/jdwor/LQT)

Metadata

Release files for pyLQT 1.0.dev8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyLQT 1.0.dev8
File Size Uploaded Provenance Actions
pylqt-1.0.dev8.tar.gz 31.2 kB Without provenance Details for pylqt-1.0.dev8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyLQT 1.0.dev8
File Interpreter ABI Platform Actions
pylqt-1.0.dev8-py3-none-any.whl Python 3 none any Details for pylqt-1.0.dev8-py3-none-any.whl

Total release size: 64.8 kB

Release files / pylqt-1.0.dev8.tar.gz

Download URL pylqt-1.0.dev8.tar.gz
Size 31.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5278f5ba5f386bad764090a6726a760911248ae2a2f9397843c4906faa5f61fc
BLAKE2b-256 checksum
How to use checksums
ddae9e455396b72250293bc702622b4173bdb9e29b2fb702a0785cf72c59f221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / pylqt-1.0.dev8-py3-none-any.whl

Download URL pylqt-1.0.dev8-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf5ee5e1779ed4fb01b32d93379168a2e227d2100ba68c4a22c6461a88b2b7bb
BLAKE2b-256 checksum
How to use checksums
a3b8c170a0b73293d066b0b05544a8bbf7400da57bcf6e081cd88e9baf9752cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for pyLQT 1.0.dev8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page