Giter VIP home page Giter VIP logo

bioseq2vec's Introduction

BioSeq2vec

Learning representation of biological sequences using LSTM Encoder-Decoder BioSeq2vec

Usage:

  • Load pretrained models to distill deep representations of amino acids and nucleic acids sequences

    from bioseq2vec import Seq2VecR2R
    
    BioSeq2vec_RNA = Seq2VecR2R()
    BioSeq2vec_protein = Seq2VecR2R()
    
    # char-level pretrained models
    BioSeq2vec_RNA.load_model("pretrained models/seq2vec_rna.model")
    BioSeq2vec_protein.load_model("pretrained models/seq2vec_protein.model")
    
    # or word-level pretrained models
    BioSeq2vec_RNA.load_model("pretrained models/seq2vec_rna_word.model")
    BioSeq2vec_protein.load_model("pretrained models/seq2vec_protein_word.model")
    
    # transform sequences
    bioseq2vec_RNA_feature = BioSeq2vec_RNA.transfrom(RNA_seqs)
    bioseq2vec_Protein_feature = BioSeq2vec_protein.transfrom(Protein_seqs)
  • Plug-and-Play

    from bioseq2vec import Seq2vecR2R
    
    BioSeq2vec = Seq2vecR2R(
       max_index=1000,
       max_length=100,
       latent_size=20,
       embedding_size=200,
       encoding_size=300,
       learning_rate=0.05
       )
    
    feature = BioSeq2vec.fit_transfrom(seqs)
  • Pretraining

    from bioseq2vec import Seq2VecR2R
    
    model = Seq2VecR2R(
       max_index=1000,
       max_length=100,
       latent_size=20,
       embedding_size=200,
       encoding_size=300,
       learning_rate=0.05
       )
    
    RNA_seq = [
       ['AUUCGACUCCAGGUAUUGC...CG'],
       ['UUAGCCGUUACGGCUAGGCU...G'],
       ['CUGAUAGGCUUAGGC......GCA'], 
       ......
    ]
    train_word = [
       ['AUUC', 'UUCG',.... 'UAGC', 'AGCG'],
       ['UUAG', 'UAGC',....,'GCAU', 'CAUG']
       ......
    ]
    train_char = [
       ['C', 'U', .... 'G', 'A'],
       ......
    ]
    
    model.fit(train_word)   # or train_char
    model.save_model('save model path')

Requirements

pip install -r requirements.txt

Code to reproduce the results

python main.py

Citation

Yi, H. C., You, Z. H., Su, X. R., Huang, D. S., & Guo, Z. H. (2020, October). A Unified Deep Biological Sequence Representation Learning with Pretrained Encoder-Decoder Model. In International Conference on Intelligent Computing (pp. 339-347). Springer, Cham.

Contact: haichengyi#gmail.com

bioseq2vec's People

Contributors

haichengyi avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.