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.

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.dev5

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.dev5
File Size Uploaded Provenance Actions
pylqt-1.0.dev5.tar.gz 31.2 kB Without provenance Details for pylqt-1.0.dev5.tar.gz

Built distribution (wheel)

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

Total release size: 65.0 kB

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

Download URL pylqt-1.0.dev5.tar.gz
Size 31.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0b30d82bd27288a311c3a42cbb9860b764da0ae9504d30f21f1ebd7215cd761d
BLAKE2b-256 checksum
How to use checksums
85fbe95ec917506aab2a353e46af8f052ed3d8e8c4a15098899a82a5d5aafb6e
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.dev5-py3-none-any.whl

Download URL pylqt-1.0.dev5-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e5ea054ea319d6bb6478d1a2efc117c6892b49f76ba8df8982b59d9e1e34ec3
BLAKE2b-256 checksum
How to use checksums
b5013935c91b8ba93ad015625bab29720efd8b6cd5ce6b3f21c8f9204c3e3aae
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.dev5

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