Metadata-Version: 2.1
Name: scsurv
Version: 0.1.0
Summary: a deep generative model for single-cell survival analysis
Author-email: Chikara Mizukoshi <mizucoscos@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Chikara Mizukoshi
        
        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.
        
Project-URL: Homepage, https://github.com/3254c/scSurv
Project-URL: Issues, https://github.com/3254c/scSurv/issues
Keywords: bioinformatics,single-cell
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8.16
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=1.13.1
Requires-Dist: lifelines>=0.27.8
Requires-Dist: scanpy>=1.9.5
Requires-Dist: pandas>=1.5.3
Requires-Dist: numpy>=1.23.5
Requires-Dist: matplotlib>=3.7.2
Requires-Dist: scipy>=1.10.1

# scSurv (a deep generative model for single-cell survival analysis)
scSurv is a novel method for single-cell survival analysis.

[Teppei Shimamura's lab](https://www.shimamlab.info/), Institute of Science Tokyo at Tokyo and Nagoya University at Nagoya

[Yasuhiro Kojima's lab](https://www.ncc.go.jp/jp/ri/division/computational_life_science),   National Cancer Center Research Institute at Tokyo

Developed by Chikara Mizukoshi

# Instalation
You can use the latest development version from GitHub.
```
!git clone https://github.com/3254c/scSurv.git
```

# Dependencies
Python >= 3.8.16

torch >= 1.13.1

lifelines >= 0.27.8

scanpy >= 1.9.5

pandas >= 1.5.3

numpy >= 1.23.5

matplotlib >= 3.7.2

scipy >= 1.10.1

# Usage
You need to prepare reference scRNA-seq data and bulk RNA-seq data linked to clinical outcome. For instance, TCGA bulk RNA-seq data is available from the Genomic Data Commons (GDC) Data Portal (https://portal.gdc.cancer.gov/). For examples of reference scRNA-seq data, please refer to our paper. 

In the tutorial, we demonstrate the usage of scSurv using simulated data.
The bulk_adata.obs must contain the survival outcome data and the event indicators (censoring status).
The scRNA-seq and bulk RNA-seq data must be raw counts.
Please specify the batch_key parameter to indicate the sample origin annotation for each cell.
```
batch_key = 'orig.ident'
exp_name = 'tutolial_simulation.pt'
epoch = 10000

sc_adata, bulk_adata, model_params_dict, spatial_adata, scsurv_exp = workflow.run_scSurv(sc_adata, bulk_adata, exp_name, epoch, batch_key)
```
![visualization celltype annotation](umap_celltype_minor.png)
![visualization setting and estimated contribution](umap_setting_and_estimated_beta.png)
