GithubHelp home page GithubHelp logo

hmmerge's Introduction

HMMerge


Do you want to merge multiple profile HMMs into one?

How to Run


There are 2 ways to run HMMerge depending on the input data available. Regardless of which way is used, the output file will be available at <Output directory>/HMMerge.aligned.fasta.

  1. Most users fall into this category. Required Inputs:
  • Backbone alignment in FASTA format
  • Backbone tree in NEWICK format
  • Sequences to align in FASTA format
python <git root>/decompose_fasta_version.py --input-tree <Backbone tree> --sequence-file <Backbone alignment> --output-prefix <Output folder for decomposed alignments>/input_ --maximum-size <Decompose size>

pushd <Folder with decomposed alignments>
for f in *.fasta
do
    trimal -in ${f} -out ${f} -noallgaps
done
popd

python <git root>/main.py --input-dir <Folder with decomposed alignments> --backbone-alignment <Backbone alignment> --query-sequence-file <Query sequences> --output-prefix <Output directory> --num-processes <Num cpus> --model {dna|amino}
  1. No backbone tree, only backbone alignment and query sequences Required Inputs:
  • Backbone alignment in FASTA format
  • Sequences to align in FASTA format
  • Directory containing decomposed backbone alignment in FASTA format

Note: Make sure that the directory containing decomposed backbone alignment follows these two rules. a. The files need to follow the naming format input_<integer starting from 0>.fasta b. The fasta files must not have columns that are all gaps. If so, use trimal or other equivalent utilities to remove columns with all gaps.

python <git root>/main.py --input-dir <Folder with decomposed alignments> --backbone-alignment <Backbone alignment> --query-sequence-file <Query sequences> --output-prefix <Output prefix> --num-processes <num cpus> --model {dna|amino}

Requirements


  • biopython
  • click
  • dendropy (if using a backbone tree)
  • numpy
  • pyhmmer-sepp
  • pytest (for testing)
  • scipy

Testing


git clone https://github.com/MinhyukPark/HMMerge.git
cd HMMerge
pytest test.py

What HMMerge does


HMMerge, given a backbone alignment, its decomposition, and a set of query sequences, builds an HMM on each of the decomposed subset backbone alignments, assigns probability weights on each HMM based on the likelihood of havingt emitted the query sequence, merges all the HMMs based on the weights, and aligns the query sequence using the merged HMM. Individual query sequences are aligned independently onto the backbone alignment and merged at the end using transitivity to the backbone alignment.

hmmerge's People

Contributors

minhyukpark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

c5shen

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.