Metadata-Version: 2.1
Name: tl_igenecombo
Version: 1.0.0
Summary: TL-iGeneCombo: Transfer Learning for Synthetic Lethality
Home-page: https://github.com/BirkanGokbag/TL-iGeneCombo
Author: Birkan Gökbağ
Author-email: birkan.gokbag@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

# Transfer Learning for Synthetic Lethality (SLTL)

# Paper & Data

[Pending Publication]

Data & initial code release are stored under Zenodo:

 [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.22889898.svg)](https://doi.org/10.5281/zenodo.22889898)

## Introduction

TL-iGeneCombo is a transfer learning paradigm built on Synlethic Lethality Knowledge Base [(SLKB)](https://slkb.osubmi.org/).

TL-iGeneCombo supports four transfer learning approaches:

* Finetuning method

* Freeze first layer method (based on feature extraction)

* Freeze high parameters method (* New, see paper)

* Freeze Shapley method (* New, see paper)

TL-iGeneCombo can be applied to any dataset, but supports synthetic lethality contexts for following scenarios:

* Same genes and different cells

* Same cell and different genes

* Similar mechanisms

* Big data to small data

## Package Installation

### Installing from PyPI (Recommended - Upon Release)

When released, SLKB pipeline can be installed through PyPI.

```
pip install SLTL
```

### Creating from source

```
python setup.py sdist
pip install dist/SLTL-1.0.0.tar.gz --user
```

Torch v2.1.2 was used in the study.

## Getting started

## Downloading data

In order to replicate TL-iGeneCombo results, input datasets can be obtained from Zenodo [repo](https://doi.org/10.5281/zenodo.22889898).

Alternatively, you may download the data from the following:

Omics profiles: From DepMap [(Depmap Q4 2023)](https://plus.figshare.com/articles/dataset/DepMap_23Q4_Public/24667905) -> Download all omics

[XDeathDB](https://pcm2019.shinyapps.io/XDeathDB/) Gene Sets: Under 'Cell Death Engine' navitagion bar, 'Complete' tab, and Cell death modes and Disease set to 'All' -> Click Download

[MSigDB](https://www.gsea-msigdb.org/gsea/msigdb/index.jsp) Gene Sets: Under accession v2023.2 -> Download all gene sets in json format

Synthetic Lethality (SL) data of [SLKB](https://slkb.osubmi.org/): Under 'Download & Contact' -> Raw SL Data.

Gene Combinatorial Effect (GCE) data of [SLKB](https://slkb.osubmi.org/): Generated from FigShare at the following [link.](https://figshare.com/s/a37688a2dbb223a5bc1f)

### Rerunning transfer learning experiments

Following SLTL installation, proceed to run the following command in Python:

```
SLTL.extract_SLTL_notebook(location = os.getcwd())
```

This will result in the TL-iGeneCombo notebook to appear in your working directory. The whole notebook can be ran to obtain TL results. 

### Running transfer learning experiments on new data

Following SLTL installation, proceed to run the following command in Python:

```
SLTL.extract_template_notebook(location = os.getcwd())
```

This will result in a template notebook to appear in your working directory. This notebook can be modified to allow TL applications on new datasets.

Furthermore, both notebooks can be converted into python scripts to allow for CLI access by using the following command:

```
jupyter nbconvert --to script *.ipynb
```

Then, each Python file can run like the following:

```
# run once to obtain the results
python SLTL_notebook.py --seed=1 --re_evaluate=0 --re_save=0
# run again with re_evaluate being on for ensemble results
python SLTL_notebook.py --seed=1 --re_evaluate=1 --re_save=0
```

## Pipeline and Documentation

When released, you can access the full documentation at the following [link.](https://birkangokbag.github.io/TL-iGeneCombo)

Alternatively, documentation is available under 'docs/' folder in this repository and can be accessed using mkdocs with the following command:

```
mkdocs serve
```

Note: mkdocs installation is required.

## Contact

For any questions or requests, contact [Prof. Lang Li](https://cancer.osu.edu/find-a-researcher/search-researcher-directory/lang-li) at Lang.Li@osumc.edu.

