Name | CNTools JSON |
Version |
0.0.0
JSON |
| download |
home_page | |
Summary | A package for identifying cellular neighborhoods |
upload_time | 2023-09-01 00:06:17 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2022 yctao7 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
cellular
neighborhoods
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# CNTools
## System requirements
The software denpendencies are listed in `env.yml`. The required operating systems are Linux, MacOS, and Windows. The version the software has been tested on is v1.1.0.
## Installation guide
Create the conda environment by `conda env create -f env.yml`.
## Instructions for use
### Loading data
Usage:
```
python load.py [-h] --df_path DF_PATH --name NAME --out_dir OUT_DIR [--ct_order_path CT_ORDER_PATH]
```
Description of arguments can be accessed by `python load.py -h`.
```
Preprocess the tabular data and make them into a dictionary dataset.
required arguments:
--df_path DF_PATH input tabular data (.csv) path
--name NAME user-defined data name
--out_dir OUT_DIR output directory
optional arguments:
--ct_order_path CT_ORDER_PATH
input CT order file (.json) path
```
### Identifying and smoothing cellular neighborhoods
Usage:
```
python identify.py [-h] --ds_path DS_PATH --out_dir OUT_DIR --n_cns N_CNS [--cns_path CNS_PATH] [--Naive s [n_neighbors ...]]
[--HMRF eps beta [max_neighbors max_iter max_iter_no_change ...]] [--seed SEED] [--verbose]
{CC,CFIDF,CNE,Spatial_LDA} ...
```
Description of general arguments for idenfication and smoothing can be accessed by `python identify.py -h`.
```
Identify and smooth CNs.
positional arguments:
{CC,CFIDF,CNE,Spatial_LDA}
identification method
required arguments:
--ds_path DS_PATH input dataset (.pkl) path
--out_dir OUT_DIR output directory
--n_cns N_CNS number of CNs
optional arguments:
--cns_path CNS_PATH only do smoothing using the CN file (.pkl) at the given path
--Naive s [n_neighbors ...]
Naive smoothing technique
s: minimum size of a CN instance
n_neighbors: effective only when input cell representions (feats) are None, number of nearest neighbors considered for building CC cell representations (default: 10)
--HMRF eps beta [max_neighbors max_iter max_iter_no_change ...]
HMRF smoothing technique
eps: pixel radius of neighborhoods
beta: weight of each neighbor in the same CN
max_neighbors: maximum number of neighbors considered, -1 for all (default: -1)
max_iter: the maximum number of iterations (default: 50)
max_iter_no_chanage: stop if the loss does not change for some iterations (default: 3)
--seed SEED seed for reproducibility
--verbose whether to print out metric values
```
Description of specific arguments for each idenfication method can be accessed by `python identify.py <method> -h`. Using CNE as an example,
```
usage: identify.py CNE [-h] [--eta ETA] [--max_neighbors MAX_NEIGHBORS] [--exclude_cts [EXCLUDE_CTS [EXCLUDE_CTS ...]]]
required arguments:
--eta ETA scale parameter of the Gaussian distribution's std
optional arguments:
--max_neighbors MAX_NEIGHBORS
maximum number of neighbors considered, -1 for all (default: -1)
--exclude_cts [EXCLUDE_CTS [EXCLUDE_CTS ...]]
list of CTs to exclude in CN identification (default: [])
```
### Analyzing cellular neighborhoods
Run jupyter notebooks under the `analysis` folder.
## Demo
```
sh run_load.sh
sh run_idenfity.sh
```
Expected CN outputs and run time are in the `cn/*/CNE` folder. Expected analysis outputs are in the `analysis_res/*/CNE` folder.
Raw data
{
"_id": null,
"home_page": "",
"name": "CNTools",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Yicheng Tao <yctao@umich.com>",
"keywords": "cellular neighborhoods",
"author": "",
"author_email": "Yicheng Tao <yctao@umich.com>",
"download_url": "https://files.pythonhosted.org/packages/a3/52/7dc91f7118ff4fd803559cf96b7caf4d24d8e4d72c385819e489d69cc1c0/CNTools-0.0.0.tar.gz",
"platform": null,
"description": "# CNTools\n\n## System requirements\nThe software denpendencies are listed in `env.yml`. The required operating systems are Linux, MacOS, and Windows. The version the software has been tested on is v1.1.0.\n\n## Installation guide\nCreate the conda environment by `conda env create -f env.yml`.\n\n## Instructions for use\n\n### Loading data\nUsage:\n```\npython load.py [-h] --df_path DF_PATH --name NAME --out_dir OUT_DIR [--ct_order_path CT_ORDER_PATH]\n```\nDescription of arguments can be accessed by `python load.py -h`.\n```\nPreprocess the tabular data and make them into a dictionary dataset.\n\nrequired arguments:\n --df_path DF_PATH input tabular data (.csv) path\n --name NAME user-defined data name\n --out_dir OUT_DIR output directory\n\noptional arguments:\n --ct_order_path CT_ORDER_PATH\n input CT order file (.json) path\n```\n\n### Identifying and smoothing cellular neighborhoods\nUsage:\n```\npython identify.py [-h] --ds_path DS_PATH --out_dir OUT_DIR --n_cns N_CNS [--cns_path CNS_PATH] [--Naive s [n_neighbors ...]]\n [--HMRF eps beta [max_neighbors max_iter max_iter_no_change ...]] [--seed SEED] [--verbose]\n {CC,CFIDF,CNE,Spatial_LDA} ...\n```\nDescription of general arguments for idenfication and smoothing can be accessed by `python identify.py -h`.\n```\nIdentify and smooth CNs.\n\npositional arguments:\n {CC,CFIDF,CNE,Spatial_LDA}\n identification method\n\nrequired arguments:\n --ds_path DS_PATH input dataset (.pkl) path\n --out_dir OUT_DIR output directory\n --n_cns N_CNS number of CNs\n\noptional arguments:\n --cns_path CNS_PATH only do smoothing using the CN file (.pkl) at the given path\n --Naive s [n_neighbors ...]\n Naive smoothing technique\n s: minimum size of a CN instance\n n_neighbors: effective only when input cell representions (feats) are None, number of nearest neighbors considered for building CC cell representations (default: 10)\n --HMRF eps beta [max_neighbors max_iter max_iter_no_change ...]\n HMRF smoothing technique\n eps: pixel radius of neighborhoods\n beta: weight of each neighbor in the same CN\n max_neighbors: maximum number of neighbors considered, -1 for all (default: -1)\n max_iter: the maximum number of iterations (default: 50)\n max_iter_no_chanage: stop if the loss does not change for some iterations (default: 3)\n --seed SEED seed for reproducibility\n --verbose whether to print out metric values\n```\nDescription of specific arguments for each idenfication method can be accessed by `python identify.py <method> -h`. Using CNE as an example,\n```\nusage: identify.py CNE [-h] [--eta ETA] [--max_neighbors MAX_NEIGHBORS] [--exclude_cts [EXCLUDE_CTS [EXCLUDE_CTS ...]]]\n\nrequired arguments:\n --eta ETA scale parameter of the Gaussian distribution's std\n\noptional arguments:\n --max_neighbors MAX_NEIGHBORS\n maximum number of neighbors considered, -1 for all (default: -1)\n --exclude_cts [EXCLUDE_CTS [EXCLUDE_CTS ...]]\n list of CTs to exclude in CN identification (default: [])\n```\n\n### Analyzing cellular neighborhoods\nRun jupyter notebooks under the `analysis` folder.\n\n## Demo\n```\nsh run_load.sh\nsh run_idenfity.sh\n```\nExpected CN outputs and run time are in the `cn/*/CNE` folder. Expected analysis outputs are in the `analysis_res/*/CNE` folder.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2022 yctao7 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A package for identifying cellular neighborhoods",
"version": "0.0.0",
"project_urls": {
"Repository": "https://github.com/liu-bioinfo-lab/CNTools"
},
"split_keywords": [
"cellular",
"neighborhoods"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7e60ac8deb4b670385640256676ea633422bde5d04f00babf274e318c001ede6",
"md5": "06a5c0c7675353df6b5c5ef700b8e694",
"sha256": "70e1a6cae4b5b7ad1408a38bf8641a0973cfd1a3edecaa8ae5a4acf4a257f68c"
},
"downloads": -1,
"filename": "CNTools-0.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "06a5c0c7675353df6b5c5ef700b8e694",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 16992,
"upload_time": "2023-09-01T00:06:16",
"upload_time_iso_8601": "2023-09-01T00:06:16.135413Z",
"url": "https://files.pythonhosted.org/packages/7e/60/ac8deb4b670385640256676ea633422bde5d04f00babf274e318c001ede6/CNTools-0.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a3527dc91f7118ff4fd803559cf96b7caf4d24d8e4d72c385819e489d69cc1c0",
"md5": "9b26fb4c681140045d259710059e58f5",
"sha256": "6efaa778c8e5ac3430e69c8aaf35f1b38c8f561baa8bd4cbef24cf2b67b47f87"
},
"downloads": -1,
"filename": "CNTools-0.0.0.tar.gz",
"has_sig": false,
"md5_digest": "9b26fb4c681140045d259710059e58f5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12617,
"upload_time": "2023-09-01T00:06:17",
"upload_time_iso_8601": "2023-09-01T00:06:17.739116Z",
"url": "https://files.pythonhosted.org/packages/a3/52/7dc91f7118ff4fd803559cf96b7caf4d24d8e4d72c385819e489d69cc1c0/CNTools-0.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-01 00:06:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "liu-bioinfo-lab",
"github_project": "CNTools",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cntools"
}