Descartes
[DEtection of Spatial Chromatin Accessibility patteRns with inTEr-cellular correlationS]
abstract
Installation
Environment setup
-
We recommend you to build a python virtual environment with Anaconda. If Anaconda (or miniconda) is already installed with Python3, skip to 2.
-
Create and activate a new virtual environment:
$ conda create -n descartes python=3.8
$ conda activate descartes
Package installation
Python packages required by Cofea are listed below:
1. Python 3.8.18
2. Packages for Descartes and tutorial
anndata >= 0.9.2
matplotlib >= 3.7.4
numpy >= 1.22.4
pandas >= 1.4.3
scanpy == 1.9.6
scikit-learn >= 1.3.0
scipy >= 1.8.0
seaborn >= 0.12.2
Install the package and other requirements:
Package installation:
$ git clone https://github.com/likeyi19/Descartes
$ cd Descartes
$ pip install -r requirements.txt
Tutorial
Demo
We provide a quick-start notebook which describes the fundamentals in detail and reproduces the results of Cofea.
Descartes
Sixteen parameters are necessary, including the path of dataset, the save path for results, the chosen number of peaks, the random seed, the TF-IDF computation method, the number of principal components (PC), the quantity of K means, the similarity calculation method, the iteration count, the spatial neighborhood selection approach, the number of neighbors, the spatial strategy for score calculation, the peak filtering method, the quantity of peak filtering, the distance calculation method, and the data synthesis ratio.
For exsample:
$ cd code/
$ python descartes.py -fp ../data/scanpy.h5ad -sp ../result -n 10000 -sb 1 -pc 10 -k 20 -iter 4 -nb 5 -r 0.4
$ cd ..
Or you can get help in this way:
$ python code/descartes.py -h
usage: descartes.py [-h] [-fp FILE_PATH] [-sp SAVE_PATH] [-n NUM_SELECT_PEAK]
[-sb SEED_BASE] [-tf TF_IDF] [-pc PC_NUMBER] [-k K_NUMBER]
[-s SIMILARITY] [-iter ITER_TIME] [-spm SP_METHOD]
[-nb NEIGHBOR] [-spd SP_DIST] [-ps PRE_SELECT]
[-pn PEAKS_NUM] [-d DISTANCE] [-r RATIO]
optional arguments:
-h, --help show this help message and exit
-fp FILE_PATH, --file_path FILE_PATH
The path of dataset
-sp SAVE_PATH, --save_path SAVE_PATH
The save path for results
-n NUM_SELECT_PEAK, --num_select_peak NUM_SELECT_PEAK
The chosen number of peaks, defaults to 10000
-sb SEED_BASE, --seed_base SEED_BASE
The random seed
-tf TF_IDF, --TF_IDF TF_IDF
The TF-IDF computation method
-pc PC_NUMBER, --pc_number PC_NUMBER
The number of principal components
-k K_NUMBER, --k_number K_NUMBER
The quantity of K means
-s SIMILARITY, --similarity SIMILARITY
The similarity calculation method
-iter ITER_TIME, --iter_time ITER_TIME
The iteration count, defaults to 4
-spm SP_METHOD, --sp_method SP_METHOD
The spatial neighborhood selection approach
-nb NEIGHBOR, --neighbor NEIGHBOR
The number of neighbors
-spd SP_DIST, --sp_dist SP_DIST
The spatial strategy for score calculation
-ps PRE_SELECT, --pre_select PRE_SELECT
Peak filtering method
-pn PEAKS_NUM, --peaks_num PEAKS_NUM
The quantity of peak filtering
-d DISTANCE, --distance DISTANCE
The distance calculation method
-r RATIO, --ratio RATIO
Data synthesis ratio
Contact
If you have any questions, you can contact me from the email: lky23@mails.tsinghua.edu.cn
Release files for decare 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| decare-0.0.1.tar.gz | 14.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| decare-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.4 kB
Release files / decare-0.0.1.tar.gz
| Download URL | decare-0.0.1.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8f1411689d5779352abb6a3ce7f29cca30cd01e605514fd7d0cc73ba98c21f0
|
|
BLAKE2b-256 checksum How to use checksums |
7cf5c0e37911bbd26e191beecb9d902b50d5e9d3f0da0a3438f2dda75f766b34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|
Release files / decare-0.0.1-py3-none-any.whl
| Download URL | decare-0.0.1-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd20ccce14b293f17d48f1b18af1748d81e5aff0916ef8f001b823930c701900
|
|
BLAKE2b-256 checksum How to use checksums |
6ea7c24a6ba45ae875b6c05a98d5834063c8a8e27fcc1d9d43df4cc0ae6451ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|