delve-fs


Namedelve-fs JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/jranek/delve
SummaryFeature selection for preserving biological trajectories from single-cell data
upload_time2024-02-14 17:37:32
maintainer
docs_urlNone
authorJolene Ranek
requires_python>=3.6
licenseMIT
keywords trajectory inference feature selection single-cell bioinformatics computational biology
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DELVE
Dynamic selection of locally covarying features

## Introduction

DELVE is an unsupervised feature selection method for identifying a representative subset of dynamically-expressed molecular features that recapitulate cellular trajectories from single-cell data (e.g. single-cell RNA sequencing, protein iterative immunofluorescence imaging). In contrast to previous work, DELVE uses a bottom-up approach to mitigate the effect of unwanted sources of feature variation confounding inference, and instead models cell states from dynamic feature modules that constitute core regulatory complexes. For more details on the method, please read the associated preprint: [Ranek JS, Stallaert W, Milner J, Stanley N, and Purvis JE. Feature selection for preserving biological trajectories in single-cell data. _bioRxiv_. 2023](https://www.biorxiv.org/content/10.1101/2023.05.09.540043v1).

<p>
  <img src="https://github.com/jranek/delve/blob/main/pipeline.png?raw=True" />
</p>

For a comparison of alternative feature selection methods and the overall benchmarking pipeline, please see [delve_benchmark](https://github.com/jranek/delve_benchmark). 

## Installation
Dependencies 
* Python >= 3.6, sketchKH == 0.1.1, anndata >= 0.7.6, numpy >= 1.19.5, scipy >= 1.7.1, pandas >= 1.1.5, umap-learn == 0.5.1, scikit-learn >= 0.23.2, tqdm 

You can install the package and necessary dependencies with `pip` by,
```
pip install delve-fs
```

Alternatively, you can clone the git repository and install the necessary dependencies using the provided yml file. First clone the repository by, 
```
git clone https://github.com/jranek/delve.git
```

Then change the working directory as, 
```
cd delve
```

You can then create the conda environment using the provided yml file. 

```
conda env create -f venv_delve.yml
```

Once the environment is created, you can activate it by,
```
conda activate venv_delve
```

## Data access
You can download all of the preprocessed single-cell datasets (`.h5ad` files) from the [Zenodo](https://zenodo.org/records/10534873) repository.

## Example usage
To perform trajectory-preserving feature selection with DELVE, first read in a preprocessed `.h5ad` object. This `.h5ad` object contains a sample profiled with a single-cell technology (i.e. protein iterative indirect immunofluorescence imaging data).

```python
import anndata
import os
adata = anndata.read_h5ad(os.path.join('data', 'adata_RPE.h5ad'))
```

Then simply perform DELVE feature selection by,

```python
# Inputs:
# adata: annotated data object (dimensions = cells x features)
# k: number of nearest neighbors in the between-cell kNN affinity graph
# n_pcs: number of principal components. If None (default): will construct a between-cell affinity graph by computing pairwise Euclidean distances according to adata.X. Else: according to PCA of adata.X 
# num_subsamples: number of representative cellular neighborhoods. Neighborhoods are subsampled using kernel herding sketching (see https://dl.acm.org/doi/abs/10.1145/3535508.3545539, https://github.com/CompCy-lab/SketchKH)  
# n_clusters: number of feature modules
# n_random_state: number of random KMeans clustering initializations when identifying dynamic feature modules
# random_state: random state parameter 
# n_jobs: number of tasks
# -----------------------
    
# Returns:
# delta_mean: average pairwise change in expression across prototypical cellular neighborhoods (dimensions = num_subsamples x features)
# modules: dataframe containing feature-cluster assignments and permutation p-values (dimensions = features x 2)
# ranked_features: ranked set of features that best preserve the local trajectory structure (dimensions = features x 1)
# -----------------------
from delve import *
delta_mean, modules, ranked_features = delve_fs(adata = adata, k = 10, num_subsamples = 1000, n_clusters = 5, random_state = 0, n_jobs = -1)
```

## License
This software is licensed under the MIT license (https://opensource.org/licenses/MIT).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jranek/delve",
    "name": "delve-fs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "trajectory inference,feature selection,single-cell bioinformatics,computational biology",
    "author": "Jolene Ranek",
    "author_email": "ranekjs@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/50/2c/3325889402567d74681df7395bb752129fac423c0e22d25503a09ead588a/delve-fs-0.1.4.tar.gz",
    "platform": null,
    "description": "# DELVE\nDynamic selection of locally covarying features\n\n## Introduction\n\nDELVE is an unsupervised feature selection method for identifying a representative subset of dynamically-expressed molecular features that recapitulate cellular trajectories from single-cell data (e.g. single-cell RNA sequencing, protein iterative immunofluorescence imaging). In contrast to previous work, DELVE uses a bottom-up approach to mitigate the effect of unwanted sources of feature variation confounding inference, and instead models cell states from dynamic feature modules that constitute core regulatory complexes. For more details on the method, please read the associated preprint: [Ranek JS, Stallaert W, Milner J, Stanley N, and Purvis JE. Feature selection for preserving biological trajectories in single-cell data. _bioRxiv_. 2023](https://www.biorxiv.org/content/10.1101/2023.05.09.540043v1).\n\n<p>\n  <img src=\"https://github.com/jranek/delve/blob/main/pipeline.png?raw=True\" />\n</p>\n\nFor a comparison of alternative feature selection methods and the overall benchmarking pipeline, please see [delve_benchmark](https://github.com/jranek/delve_benchmark). \n\n## Installation\nDependencies \n* Python >= 3.6, sketchKH == 0.1.1, anndata >= 0.7.6, numpy >= 1.19.5, scipy >= 1.7.1, pandas >= 1.1.5, umap-learn == 0.5.1, scikit-learn >= 0.23.2, tqdm \n\nYou can install the package and necessary dependencies with `pip` by,\n```\npip install delve-fs\n```\n\nAlternatively, you can clone the git repository and install the necessary dependencies using the provided yml file. First clone the repository by, \n```\ngit clone https://github.com/jranek/delve.git\n```\n\nThen change the working directory as, \n```\ncd delve\n```\n\nYou can then create the conda environment using the provided yml file. \n\n```\nconda env create -f venv_delve.yml\n```\n\nOnce the environment is created, you can activate it by,\n```\nconda activate venv_delve\n```\n\n## Data access\nYou can download all of the preprocessed single-cell datasets (`.h5ad` files) from the [Zenodo](https://zenodo.org/records/10534873) repository.\n\n## Example usage\nTo perform trajectory-preserving feature selection with DELVE, first read in a preprocessed `.h5ad` object. This `.h5ad` object contains a sample profiled with a single-cell technology (i.e. protein iterative indirect immunofluorescence imaging data).\n\n```python\nimport anndata\nimport os\nadata = anndata.read_h5ad(os.path.join('data', 'adata_RPE.h5ad'))\n```\n\nThen simply perform DELVE feature selection by,\n\n```python\n# Inputs:\n# adata: annotated data object (dimensions = cells x features)\n# k: number of nearest neighbors in the between-cell kNN affinity graph\n# n_pcs: number of principal components. If None (default): will construct a between-cell affinity graph by computing pairwise Euclidean distances according to adata.X. Else: according to PCA of adata.X \n# num_subsamples: number of representative cellular neighborhoods. Neighborhoods are subsampled using kernel herding sketching (see https://dl.acm.org/doi/abs/10.1145/3535508.3545539, https://github.com/CompCy-lab/SketchKH)  \n# n_clusters: number of feature modules\n# n_random_state: number of random KMeans clustering initializations when identifying dynamic feature modules\n# random_state: random state parameter \n# n_jobs: number of tasks\n# -----------------------\n    \n# Returns:\n# delta_mean: average pairwise change in expression across prototypical cellular neighborhoods (dimensions = num_subsamples x features)\n# modules: dataframe containing feature-cluster assignments and permutation p-values (dimensions = features x 2)\n# ranked_features: ranked set of features that best preserve the local trajectory structure (dimensions = features x 1)\n# -----------------------\nfrom delve import *\ndelta_mean, modules, ranked_features = delve_fs(adata = adata, k = 10, num_subsamples = 1000, n_clusters = 5, random_state = 0, n_jobs = -1)\n```\n\n## License\nThis software is licensed under the MIT license (https://opensource.org/licenses/MIT).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Feature selection for preserving biological trajectories from single-cell data",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/jranek/delve"
    },
    "split_keywords": [
        "trajectory inference",
        "feature selection",
        "single-cell bioinformatics",
        "computational biology"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aadc541c14ea708c358624a380b2879c00f0e61899cd46829a0b1898e70b780a",
                "md5": "8b23f3130541d7cb56ad6d526c7e9426",
                "sha256": "ad2ed242c56a51481414f0d10c6886e22860a525bab1e2509cd088a552ce6356"
            },
            "downloads": -1,
            "filename": "delve_fs-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8b23f3130541d7cb56ad6d526c7e9426",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 9101,
            "upload_time": "2024-02-14T17:37:30",
            "upload_time_iso_8601": "2024-02-14T17:37:30.926398Z",
            "url": "https://files.pythonhosted.org/packages/aa/dc/541c14ea708c358624a380b2879c00f0e61899cd46829a0b1898e70b780a/delve_fs-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "502c3325889402567d74681df7395bb752129fac423c0e22d25503a09ead588a",
                "md5": "40d16809d7facc2946d321dceefe994a",
                "sha256": "18e4ad53955637dac722d2d374a84fdcf40f661d16191da08010f7ad547d6ec8"
            },
            "downloads": -1,
            "filename": "delve-fs-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "40d16809d7facc2946d321dceefe994a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 10383,
            "upload_time": "2024-02-14T17:37:32",
            "upload_time_iso_8601": "2024-02-14T17:37:32.342283Z",
            "url": "https://files.pythonhosted.org/packages/50/2c/3325889402567d74681df7395bb752129fac423c0e22d25503a09ead588a/delve-fs-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-14 17:37:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jranek",
    "github_project": "delve",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "delve-fs"
}
        
Elapsed time: 0.18896s