Skip to main content

A framework for deep learning with LINCS L1000 Data

Project description


A deep learning wrapper around Keras for Lincs L1000 expression data.

Check out the documentation here.


$ pip install deep-lincs

Getting started

The data for 1.3 million L1000 profiles are availabe on GEO. The script fetches the Level 3 data along with all metadata available. The largest file is quite big (~50Gb) so please be patient.

$ git clone && cd deep_lincs
$ source # 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

# Chainable methods
subset = dataset.sample_rows(5000).filter_rows(pert_id=["ctl_vehicle", "ctl_untrt"])


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.compile_model([128, 128, 64, 32], dropout_rate=0.1)

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.compile_model(hidden_layers=[128, 128, 64, 32])

model.evaluate() # Evaluates on isntance test Dataset
model.evaluate(subset) # Evalutates model on user-defined Dataset


from deep_lincs.models import AutoEncoder

model = AutoEncoder(dataset)
model.compile_model(hidden_layers=[128, 32, 128], l1_reg=0.01)

model.encoder.predict() # Gives encodings for instance test Dataset
model.encoder.predict(subset) # Gives encodings for user-defined Dataset

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for deep-lincs, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size deep_lincs-0.0.3-py3-none-any.whl (30.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size deep_lincs-0.0.3.tar.gz (22.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page