Skip to main content

Incorporating network diffusion and peak location information for better single-cell ATAC-seq data analysis

Project description


SCARP method for scATAC-seq data analysis

Incorporating network diffusion and peak location information for better single-cell ATAC-seq data analysis

Authors

Pipeline

Logo


Installation

We recommend to create a new environment with Python 3.10:

conda create -n py310 python=3.10
conda activate py310

The scarp package can be installed via pip:

pip install scarp

Dependencies

scanpy (>=1.9.5)
numpy (>=1.25.2)
scipy (>=1.11.3)
pandas (>=2.1.1)

Usage

Please checkout the tutorials at here.

1. Preparing your scATAC-seq data in h5ad format

You can downloaded a example data from here.

import scanpy as sc
data_name = 'Leukemia'
data = sc.read_h5ad('./Example_data/Leukemia.h5ad')

2. Running SCARP easily in one step

from scarp import model
Cells_df = model.SCARP(adata=data,
                       data_name=data_name,
                       plot_SD=True,
                       verbose=True
                       )

parameter descriptions:

parameter name description type default
adata input scATAC-seq data h5ad None
data_name name of this dataset str None
m parameter to control NR diffusion intensity float 1.5
gamma parameter to control the threshold for merging adjacent chromosomes int 3000
beta parameter to control the extent to which prior edge weight decays int 5000
return_shape shape of the returned matrix str 'CN'
peak_loc use peak location prior information or not bool True
parallel parallel computing or not. 0 means automatically determined int 0
plot_SD plot the SDs of PCs or not bool True
fig_size figure size of the SD plot tuple (4,3)
save_file if plot_std is True, the file path you want to save str None
verbose print the process or not bool True

3. Or you can run SCARP step by step

(1) Obtaining the NR diffused matrix

t, diffusion_mat = model.SCARP_diffusion_mat(adata=data)

(2) Computing the retained dimension

k = model.SCARP_SD_plot(data=diffusion_mat,
                        peaks_num=Peaks_num,
                        title=data_name,
                        plot_SD=True)

(3) Dimensional reduction

Cell_embedding = model.SCARP_cell_embedding(diffusion_mat=diffusion_mat,
                                            kept_comp=k)

Reproduce results

For reproducibility, we provide all the necessary scripts and data here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scarp-1.0.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scarp-1.0.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file scarp-1.0.0.tar.gz.

File metadata

  • Download URL: scarp-1.0.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for scarp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e99a1f881cb01ebd316eb19dd2ab9dea973a492e0cc289ee44a20e0961cf9a21
MD5 7765e0a37cf9b6e18ec83ab7d1093570
BLAKE2b-256 88f3819e6e72d7932f3ee939d94abbedeefc7ef5e2296b02245bacd1b11829ee

See more details on using hashes here.

File details

Details for the file scarp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: scarp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for scarp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78a854bc4087c83801bb5cc078c8369f6b9b2482485a2e3caaefd8fa30f72e7d
MD5 b7ea213a022bbd3d04ec9f84c06ff449
BLAKE2b-256 4beb4c1779734e75c8b81d851cceded0f362b562a83f4515772cab33476d5f99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page