Skip to main content

ARBOLpy

python implementation of ARBOL scRNAseq iterative tiered clustering

Iteratively cluster single cell datasets using a scanpy anndata object as input. Identify and use optimum cluster resolution parameters at each tier of clustering. Outputs QC and visualization plots for each clustering event.

Install

By github:

pip install git+https://github.com/jo-m-lab/ARBOLpy.git

from PyPI

pip install arbolpy

or clone the repository and source the functions directly from the script

git clone https://github.com/jo-m-lab/ARBOLpy.git

import "path/to/cloned/git/repo/ARBOLpy/ARBOL")

there is a docker image available with ARBOL and dependencies preinstalled https://hub.docker.com/r/kkimler/arbolpy

ARBOL was developed and used in the paper, "A treatment-naïve cellular atlas of pediatric Crohn’s disease predicts disease severity and therapeutic response" Currently, a tutorial is only available for the R version, where the FGID atlas figure is reproduced: https://jo-m-lab.github.io/ARBOL/ARBOLtutorial.html

This package is meant as a starting point for the way that we approached clustering and and is meant to be edited/customized through community feedback through users such as yourself!

We have dedicated effort to choosing reasonable defaults, but there is no certainty that they are the best defaults for your data.

The main function of ARBOLpy is ARBOL() - here is an example call. The helper function write_ARBOL_output writes the anytree object's endclusters to a csv file.

tree = ARBOL.ARBOL(adata)

ARBOL.write_ARBOL_output(tree)

Note This script can take a long time to run. Running on 20K cells could take an hour. Running on 100k+ cells could take 5 hours. This timing varies based on the heterogeneity of your data.

Note The script requires approximately 1.2 GB RAM per 1k cells, meaning on a local machine with 16GB RAM, one could reasonably run 12k cells. The current RAM/time bottleneck is the silhouette analysis, which runs

ARBOL() Parameters

  • adata scanpy anndata object
  • normalization_method normalization method, defaults to "Pearson", scanpy's experimental implementation of SCTransform
  • tier starting tier, defaults to 0
  • clustN starting cluster, defaults to 0
  • min_cluster_size minimum number of cells to allow further clustering
  • tree anytree object to attach arbol to. Shouldn't be changed unless building onto a pre-existing tree.
  • parent parent node of current clustering event, defaults to None. As with tree, shouldn't be changed unless building onto a pre-existing anytree object
  • max_tiers maximum number of tiers to allow further clustering
  • min_silhouette_res lower bound of silhouette analysis leiden clustering resolution parameter scan
  • max_silhouette_res upper bound
  • h5dir where to save h5 objects for each tier and cluster, if None, does not save
  • figdir where to save QC and viz figures for each tier and cluster, if None does not save

Returns

  • anytree object based on iterative tiered clustering

Metadata

Release files for ARBOLpy-kkimler 0.0.1

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

Source distribution (sdist)

Source distribution for ARBOLpy-kkimler 0.0.1
File Size Uploaded Provenance
ARBOLpy-kkimler-0.0.1.tar.gz 3.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ARBOLpy-kkimler 0.0.1
File Interpreter ABI Platform
ARBOLpy_kkimler-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / ARBOLpy-kkimler-0.0.1.tar.gz

Download URL ARBOLpy-kkimler-0.0.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
dcfb42a0dfb745e54d2e810c4ff5bd4ce34a4b87a3cf5ebeb4e1f48985e47811
BLAKE2b-256 checksum
How to use checksums
cbefb243b865f598560334e6666a338137ff9338c62c1b94641f40c0bc94a71e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.4

Release files / ARBOLpy_kkimler-0.0.1-py3-none-any.whl

Download URL ARBOLpy_kkimler-0.0.1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5322d1f5cde30375e79dc6a06551484596b22cf2b71d25ed513c513f7e88464b
BLAKE2b-256 checksum
How to use checksums
504a2b43959a715640b3ff4d2c24ba25c09481b9556b62f7a717dd3438a248d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.4

Security for ARBOLpy-kkimler 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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