deep_lincs
A deep learning wrapper around Keras for Lincs L1000 expression data.
Check out the documentation here.
Installation
$ pip install deep-lincs
Getting started
The data for 1.3 million L1000 profiles are availabe on GEO. The script load_files.sh fetches the Level 3 data along with all metadata available. The largest file is quite big (~50Gb) so please be patient.
$ git clone https://github.com/manzt/deep_lincs.git && cd deep_lincs
$ source load_files.sh # download raw data from GEO
$ cd notebooks
$ jupyter lab # get started in a notebook
L1000 Dataset
The Dataset class is built with a variety of methods to load, subset, filter, and combine expression and metadata.
from deep_lincs import Dataset
# Select samples
cell_ids = ["VCAP", "MCF7", "PC3"]
pert_types = ["trt_cp", "ctl_vehicle", "ctl_untrt"]
# Loading a Dataset
dataset = Dataset.from_yaml("settings.yaml", cell_id=cell_ids, pert_type=pert_types)
# Normalizing the expression data
dataset.normalize_by_gene("standard_scale")
# Chainable methods
subset = dataset.sample_rows(5000).filter_rows(pert_id=["ctl_vehicle", "ctl_untrt"])
Models
Models interface with the Dataset class to make training and evaluating different arcitectures simple.
Single Classifier
from deep_lincs.models import SingleClassifier
model = SingleClassifier(dataset, target="cell_id")
model.prepare_tf_datasets(batch_size=64)
model.compile_model([128, 128, 64, 32], dropout_rate=0.1)
model.fit(epochs=10)
model.evaluate() # Evaluates on isntance test Dataset
model.evaluate(subset) # Evalutates model on user-defined Dataset
Multiple Classifier
from deep_lincs.models import MutliClassifier
targets = ["cell_id", "pert_type"]
model = MutliClassifier(dataset, target=targets)
model.prepare_tf_datasets(batch_size=64)
model.compile_model(hidden_layers=[128, 128, 64, 32])
model.fit(epochs=10)
model.evaluate() # Evaluates on isntance test Dataset
model.evaluate(subset) # Evalutates model on user-defined Dataset
Autoencoder
from deep_lincs.models import AutoEncoder
model = AutoEncoder(dataset)
model.prepare_tf_datasets(batch_size=64)
model.compile_model(hidden_layers=[128, 32, 128], l1_reg=0.01)
model.fit(epochs=10)
model.encoder.predict() # Gives encodings for instance test Dataset
model.encoder.predict(subset) # Gives encodings for user-defined Dataset
Metadata
Release files for deep-lincs 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deep_lincs-0.0.3.tar.gz | 22.2 kB | Without provenance | Details for deep_lincs-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deep_lincs-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for deep_lincs-0.0.3-py3-none-any.whl |
Total release size: 52.5 kB
Release files / deep_lincs-0.0.3.tar.gz
| Download URL | deep_lincs-0.0.3.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcaed96605c8fc42a5e6112b648bb3152f4e9fa007a4079f4376311f4f48de51
|
|
BLAKE2b-256 checksum How to use checksums |
6c0846d796308fd2e80c4d41b4c0806f2b504108306b87115222501166ec0ea6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Release files / deep_lincs-0.0.3-py3-none-any.whl
| Download URL | deep_lincs-0.0.3-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36dd7e6a70d123b8e548d416de30825643c21565e7b277419d8609e4331a086b
|
|
BLAKE2b-256 checksum How to use checksums |
44dd718eb6a672a95651c7b228cbdeea4c63aaa7ad8dafbb227c08590bb8aed6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for deep-lincs 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.