Skip to main content

CONCISE (COnvolutional Neural for CIS-regulatory Elements) is a model for predicting PTR features like mRNA half-life from cis-regulatory elements using deep learning.

Project description

CONCISE

https://img.shields.io/pypi/v/concise.svg https://img.shields.io/pypi/pyversions/Concise.svg https://api.travis-ci.org/Avsecz/concise.svg Documentation Status

CONCISE (COnvolutional neural Network for CIS-regulatory Elements) is a model for predicting any quatitative outcome (say mRNA half-life) from cis-regulatory sequence using deep learning.

https://github.com/Avsecz/concise/blob/master/concise-figure1.png

Features

  • Very simple API

  • Serializing the model to JSON - allows to analyze the results in any langugage of choice

  • Helper function for hyper-parameter random search

  • CONCISE uses TensorFlow at its core and is hence able of using GPU computing

Installation

After installing the following prerequisites:

  1. Python (3.4 or 3.5) with pip (see Python installation guide and pip documentation)

  2. TensorFlow python package (see TensorFlow installation guide or Installing Tensorflow on AWS GPU-instance)

install CONCISE using pip:

pip install concise

Getting Started

import pandas as pd
import concise

# read-in and prepare the data
dt = pd.read_csv("./data/pombe_half-life_UTR3.csv")

X_feat, X_seq, y, id_vec = concise.prepare_data(dt,
                                                features=["UTR3_length", "UTR5_length"],
                                                response="hlt",
                                                sequence="seq",
                                                id_column="ID",
                                                seq_align="end",
                                                trim_seq_len=500,
                                              )

######
# Train CONCISE
######

# initialize CONCISE
co = concise.Concise(motif_length = 9, n_motifs = 2,
                     init_motifs = ("TATTTAT", "TTAATGA"))

# train:
# - on a GPU if tensorflow is compiled with GPU support
# - on a CPU with 5 cores otherwise
co.train(X_feat[500:], X_seq[500:], y[500:], n_cores = 5)

# predict
co.predict(X_feat[:500], X_seq[:500])

# get fitted weights
co.get_weights()

# save/load from a file
co.save("./Concise.json")
co2 = Concise.load("./Concise.json")

######
# Train CONCISE in 5-fold cross-validation
######

# intialize
co3 = concise.Concise(motif_length = 9, n_motifs = 2,
                      init_motifs = ("TATTTAT", "TTAATGA"))

cocv = concise.ConciseCV(concise_object = co3)

# train
cocv.train(X_feat, X_seq, y, id_vec,
           n_folds=5, n_cores=3, train_global_model=True)

# out-of-fold prediction
cocv.get_CV_prediction()

# save/load from a file
cocv.save("./Concise.json")
cocv2 = ConciseCV.load("./Concise.json")

Where to go from here:

History

0.1.0 (2016-09-15)

  • First release on PyPI.

0.1.1 (2016-09-17)

  • Minor documentation changes

  • Renamed some internal variables

0.2.0 (2016-09-21)

  • Introduced new feature: regress_out_feat

  • Major renaming of variables for concistency

0.3.0 (2016-11-30)

  • Added L-BFGS optimizer in addition to Adam. Use optimizer=”lbfgs” in Concise()

0.3.1 (2016-11-30)

  • New function: best_kmers for motif efficient initialization

0.4.0 (2017-02-07)

  • refactor: Removed regress_out feature

  • feature: multi-task learning

0.4.1 (2017-02-09)

  • bugfix: multi-task learning

0.4.2 (2017-02-09)

  • same as 0.4.1 (pypi upload failed for 0.4.1)

0.4.3 (2017-02-09)

  • feat: added early_stop_patience argument

0.4.4 (2017-02-10)

  • fix: When X_feat had 0 columns, loading its weights from file was failing.

  • feat: When training the global model in ConciseCV, use the average number of epochs yielding the best validation-set accuracy.

0.4.5 (2017-03-13)

  • Upload to pypi wasunsuccessful. Version Skipped.

0.4.6 (2017-03-13)

  • fix: Update tensorflow function (tf.op_scope -> tf.name_scope, initialize_all_variables -> tf.global_variables_initializer)

  • fix: tf.mul -> tf.multiply

  • feat: allow NaN’s in y_train

0.5.0 (2017-03-13)

  • feat: Implemented Concise as keras layers

Project details


Download files

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

Source Distribution

concise-0.5.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

concise-0.5.0-py2.py3-none-any.whl (54.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file concise-0.5.0.tar.gz.

File metadata

  • Download URL: concise-0.5.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for concise-0.5.0.tar.gz
Algorithm Hash digest
SHA256 588b482643a4937bc742e508a7ab3843da94b1e8c11bc49b8d9b2738db9c2870
MD5 2bd76b12335404201268b8966a735816
BLAKE2b-256 3d6bc2faeaa5b24546750e3fdc216e7edccee4e04c8f7972ee06ad877d4df6ec

See more details on using hashes here.

File details

Details for the file concise-0.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for concise-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 00e924458a2b1efbb4c2263981d45b0bab3cab062fed29b4c39b1355296b5bd7
MD5 e5407442854708c6fd7ad3adaf06bd1b
BLAKE2b-256 cd58730322bac7bf818b33de01f1d37491c8ad87051aa378aa6b6f5b05dc646b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page