A tool for computing the coding potential of RNA transcript sequences using deep learning.
Project description
- Overview
- Documentation
- Installation
- Download the pre-trained models
- Usage
- Examples
- Using the Docker image
- Citation
Overview
RNAsamba is a tool for computing the coding potential of RNA sequences using a neural network classification model. A description of the algorithm and benchmarks comparing RNAsamba to other tools can be found in our article.
Web version
RNAsamba can be used through a minimal web interface that is freely available online at https://rnasamba.lge.ibi.unicamp.br/.
Documentation
A complete documentation for RNAsamba can be found at https://apcamargo.github.io/RNAsamba/.
Installation
There are two ways to install RNAsamba:
- Using pip:
pip install rnasamba
- Using conda:
conda install -c bioconda rnasamba
Download the pre-trained models
We provide two HDF5 files containing the weights of classification models trained with human trancript sequences. The first model (full_length_weights.hdf5
) was trained exclusively with full-length transcripts and can be used in datasets comprised mostly or exclusively of complete transcript sequences. The second model (partial_length_weights.hdf5
) was trained with both complete and truncated transcripts and is prefered in cases where there is a significant fraction of partial-length sequences, such as transcriptomes assembled using de novo approaches.
Both models achieves high classification performance in transcripts from a variety of different species (see reference).
You can download the files by executing the following commands:
curl -O https://raw.githubusercontent.com/apcamargo/RNAsamba/master/data/full_length_weights.hdf5
curl -O https://raw.githubusercontent.com/apcamargo/RNAsamba/master/data/partial_length_weights.hdf5
In case you want to train your own model, you can follow the steps shown in the Examples section.
Usage
RNAsamba provides two commands: rnasamba train
and rnasamba classify
.
rnasamba train
rnasamba train
is the command for training a new classification model from a training dataset and saving the network weights into an HDF5 file. The user can specify the batch size (--batch_size
) and the number of training epochs (--epochs
). The user can also choose to activate early stopping (--early_stopping
), which reduces training time and can help avoiding overfitting.
usage: rnasamba train [-h] [-s EARLY_STOPPING] [-b BATCH_SIZE] [-e EPOCHS]
[-v {0,1,2,3}]
output_file coding_file noncoding_file
Train a new classification model.
positional arguments:
output_file output HDF5 file containing weights of the newly
trained RNAsamba network.
coding_file input FASTA file containing sequences of protein-
coding transcripts.
noncoding_file input FASTA file containing sequences of noncoding
transcripts.
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-s EARLY_STOPPING, --early_stopping EARLY_STOPPING
number of epochs after lowest validation loss before
stopping training (a fraction of 0.1 of the training
set is set apart for validation and the model with the
lowest validation loss will be saved). (default: 0)
-b BATCH_SIZE, --batch_size BATCH_SIZE
number of samples per gradient update. (default: 128)
-e EPOCHS, --epochs EPOCHS
number of epochs to train the model. (default: 40)
-v {0,1,2,3}, --verbose {0,1,2,3}
print the progress of the training. 0 = silent, 1 =
current step, 2 = progress bar, 3 = one line per
epoch. (default: 0)
rnasamba classify
rnasamba classify
is the command for computing the coding potential of transcripts contained in an input FASTA file and classifying them into coding or non-coding. Optionally, the user can specify an output FASTA file (--protein_fasta
) in which RNAsamba will write the translated sequences of the predicted coding ORFs. If multiple weight files are provided, RNAsamba will ensemble their predictions into a single output.
usage: rnasamba classify [-h] [-p PROTEIN_FASTA] [-v {0,1}]
output_file fasta_file weights [weights ...]
Classify sequences from a input FASTA file.
positional arguments:
output_file output TSV file containing the results of the
classification.
fasta_file input FASTA file containing transcript sequences.
weights input HDF5 file(s) containing weights of a trained
RNAsamba network (if more than a file is provided, an
ensembling of the models will be performed).
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-p PROTEIN_FASTA, --protein_fasta PROTEIN_FASTA
output FASTA file containing translated sequences for
the predicted coding ORFs. (default: None)
-v {0,1}, --verbose {0,1}
print the progress of the classification. 0 = silent,
1 = current step. (default: 0)
Examples
- Training a new classification model using Mus musculus data downloaded from GENCODE:
rnasamba train -v 2 mouse_model.hdf5 gencode.vM21.pc_transcripts.fa gencode.vM21.lncRNA_transcripts.fa
- Classifying sequences using our pre-trained model (
partial_length_weights.hdf5
) and saving the predicted proteins into a FASTA file:
rnasamba classify -p predicted_proteins.fa classification.tsv input.fa partial_length_weights.hdf5
head classification.tsv
sequence_name coding_score classification
ENSMUST00000054910 0.99022 coding
ENSMUST00000059648 0.84718 coding
ENSMUST00000055537 0.99713 coding
ENSMUST00000030975 0.85189 coding
ENSMUST00000050754 0.02638 noncoding
ENSMUST00000008011 0.14949 noncoding
ENSMUST00000061643 0.03456 noncoding
ENSMUST00000059704 0.89232 coding
ENSMUST00000036304 0.03782 noncoding
Using the Docker image
docker pull antoniopcamargo/rnasamba
# Training example:
docker run -ti --rm -v "$(pwd):/app" antoniopcamargo/rnasamba train -v 2 mouse_model.hdf5 gencode.vM21.pc_transcripts.fa gencode.vM21.lncRNA_transcripts.fa
# Classification example:
docker run -ti --rm -v "$(pwd):/app" antoniopcamargo/rnasamba classify -p predicted_proteins.fa classification.tsv input.fa full_length_weights.hdf5
Citation
Camargo, Antonio P., Vsevolod Sourkov, and Marcelo F. Carazzolle. "RNAsamba: coding potential assessment using ORF and whole transcript sequence information" BioRxiv (2019).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for rnasamba-0.2.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6efc90f64c2424f90d47c9bd69e1bb7d0a49328f216f4787dbafbba63ad0e86 |
|
MD5 | ac465088562e8b2010e0e95b3c550622 |
|
BLAKE2b-256 | 4c09bf7f018a4839b098fbfd50383c36d655ff0d0c4b508fcf1ff50fb239e1b9 |
Hashes for rnasamba-0.2.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 368fccd6e0f28bb9213fd16ed8da2b1803319e1a86dba5c5dc6a8e8a6a14f2b9 |
|
MD5 | 4ded07123e1692b71eb466236d9a7f5b |
|
BLAKE2b-256 | 561fef3ed52bef5f7384f0591e4fb8374de1899b53f1c1fb9be8b728cc46f157 |
Hashes for rnasamba-0.2.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f56df8f0f81914d534608af4c218b6000ed82535bdd22cb6ebf0bb6faa7fada3 |
|
MD5 | e0e82967e01ea1404ca44742c9be6075 |
|
BLAKE2b-256 | 6410f2d8881e6e6b5654aff05bf8a96ee5a9dd54765eab6dc83fb74aa1720c05 |
Hashes for rnasamba-0.2.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57b8a4e1967a9c270019b24cd58b2aaab5af0b4be528c2e3c4dff19b1ae4ac6e |
|
MD5 | b47b875126a8cee4192887aa9933a459 |
|
BLAKE2b-256 | 7c2dc06c83dd29bb7753cbc837173118f56df0056106296c6e235fc2a3950fbd |
Hashes for rnasamba-0.2.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ad6cce29cc5b4c1b2c90a35eab9fe927455ff82b74e9c8d63b861d3f9c33203 |
|
MD5 | 357ba99ae8637b77d113e4d91a753a68 |
|
BLAKE2b-256 | ecbffa83b71220a7692c64ee7d055ccb0663cbec3607e751d1a6c53596abbf2d |
Hashes for rnasamba-0.2.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3973a562a074fcba68c46b5defd4a100a2a5ef2b1d529ca4fbc1e97891b9f7b9 |
|
MD5 | cdec583c3f164b7308d51cab1ba03412 |
|
BLAKE2b-256 | 4fc268d51b4ce59858e22aef4c326e366fea5ff978ba71a80fc2c97e2ce31549 |
Hashes for rnasamba-0.2.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85f367d5cc94761ab35b5b44789b60ac97498e798b80aeb0a0dd9c7e9bc3a060 |
|
MD5 | 9c2562578ab270ffbe60f57bcb99faf2 |
|
BLAKE2b-256 | 899433fc1639706add766626ae6d14a52a74dddf47e5197e958ffc76dd46dd70 |
Hashes for rnasamba-0.2.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee94573633bc92dba116b5ea21644e40ba1f2f0299d9396fcf71d5c22794e2ff |
|
MD5 | 72a85204fe28e53123e20439f16a6aa4 |
|
BLAKE2b-256 | 269bbda73c3277ec97969c9dbb1cf2a76a6e1a00c90f6ba44d75c7e4a5a6ea8e |
Hashes for rnasamba-0.2.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1faccaf0fd5698ff4781c9ce7c0ef58a507b35d146ef74846d7d67db03dd17c |
|
MD5 | 9d1d646bdd0a2877672b5852da54ff50 |
|
BLAKE2b-256 | 5a206a77dc4eff2db810cba404a69c55d0ed7e78cbf90982fc980aeaeb853ac0 |