0.1.2 • Published 8 years ago

molphylo v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

MolPhylo

NPM version

MolPhylo: a molecular phylogenetic toolkit using node.js

MolPhylo LOGO

CONTENTS



Click on Demo to get full length video

Demo Video


Getting Started

Install the module with:

npm install molphylo

Usage

Require module:

var molphylo = require('./MolPhylo.js')

ensure executables are in your $PATH


Get fastA Sequences

Sequence Accession Numbers are collected from the commandline separated by a space (not a comma)

Node uses NCBI e-utilities to download sequences in fastA format:

molphylo.fasta(process.argv, molphylo.renameFile)

Basic usage: node index.js inputfile list of space separated accession numbers

node index.js NM_001028053.2 AF032112.1

Get Sequence information in JSON format

Sequence Accession Numbers are collected as per fastA sequences above using the genbank_json method:

molphylo.genbank_json(process.argv)

Basic usage: node index.js inputfile list of space separated accession numbers

node index.js NM_001028053.2 AF032112.1

PhyML

Download PhyML using this command

molphylo.getphyml()

Run phyml program

molphylo.Ml(process.argv[2], process.argv)

Basic usage: node index.js inputfile insert any flags (from flags below)

node index.js example_PhyML.phy -q -d aa -m JTT -c 4 -a e
FLAGFIELD
-ddata_type
-q
-nnb_data_sets
-bint
-mmodel
-fed'fA fC fG fT'
-tts/tv_ratio
-vprop_invar
-cnb_subst_cat
-agamma
-smove
-uuser_tree_file
-o'tlr''tl''tr''l''r''n'
--rand_start
--n_rand_startsnum
--r_seednum
--print_site_lnl
--print_trace

Primer3

collect input file name

var inPut = process.argv[2]

Run Primer3 program

molphylo.primer3_run(inPut, process.argv, molphylo.primers)

Basic usage: node index.js filename -flags (from table below)

node index.js example_p3 -format_output
FLAGS
-format_output
-default_version=1-default_version=2
-io_version=4
-p3_settings_file= file_path
-echo_settings_file
-strict_tags
-output= file_path
-error= file_path

MUSCLE

Download muscle executable

molphylo.getmuscle()

get Path for output

var outFile = './Output/Musle_Result.aln

Run MUSCLE program

molphylo.run_muscle(process.argv[2], outFile, process.argv, molphylo.muscle)

Basic usage: node index.js inputfile insert any flags preceeded by '-' sign and seperated by a space (from flags below)

node index.js DNA.fasta -msf -html
FLAGFUNCTION
-diagsFind diagonals (faster for similar sequences)
-htmlWrite output in HTML format (default FASTA)
-msfWrite output in GCG MSF format (default FASTA)
-clwWrite output in CLUSTALW format (default FASTA)
-clwstrictAs -clw, with 'CLUSTAL W (1.81)' header
-quietDo not write progress messages to stderr

Clustal Omega

Download Clustal Omega executable

molphylo.getclustal()

get Path for output

var outFile = './Output/Clustal_Result.aln

Run Clustal Omega program

molphylo.run_clustal(process.argv[2], outFile, process.argv, molphylo.clustal)

Basic usage: node index.js inputfile insert any flags preceeded by '--' sign and seperated by a space

node index.js DNA.fasta --outfmt phy
FLAGFUNCTION
--fullUse full distance matrix for guide-tree calculation (slow; mBed is default)
--full-iterUse full distance matrix for guide-tree calculation during iteration (mBed is default)
--cluster-sizeWrite output in GCG MSF format (default FASTA)
--use-kimurause Kimura distance correction for aligned sequences (default no)
--percent-idconvert distances into percent identities (default no)
--outfmt{a2m=fasta,clustal,msf,phylip,selex,stockholm,vienna}
--resnoin Clustal format print residue numbers (default no)
--wrapnumber of residues before line-wrap in output
--output-order{input-order,tree-order}
--iterNumber of (combined guide tree/HMM) iterations
--max-guidetree-iterationsMaximum guide tree iterations
--max-hmm-iterationsMaximum number of HMM iterations

Pipes

Commands can be chained in series to pipe data between applications:

var shell = require('molphylo_pipes');

pipes dir contains the module for piping as well as example files. To execute example:

node pipe_example.js

pipe_example.js pipes the output from an NCBI fetch API call into the alignment software MUSCLE and aligns the DNA using default settings

Note: must have MUSCLE in $PATH for pipe example


Testing

MolPhylo was successfully tested on: 1. Microsoft Windows 7 Enterprise ver.6.1 2. MacOSX El Capitan ver.10.11.5 3. Linux Ubuntu 64-bit ver.14.04 LTS

To perform tests:

npm test

To ensure all developmental dependencies are installed:

npm install --dev

Note: if you get a permission error when runnning tests you may have to chmod mocha

chmod 0777 mocha

Documentation

  1. New Algorithms and Methods to Estimate Maximum-Likelihood Phylogenies: Assessing the Performance of PhyML 3.0.Guindon S., Dufayard J.F., Lefort V., Anisimova M., Hordijk W., Gascuel O. Systematic Biology, 59(3):307-21, 2010

  2. Untergasser A, Cutcutache I, Koressaar T, Ye J, Faircloth BC, Remm M and Rozen SG.Primer3--new capabilities and interfaces.Nucleic Acids Res. 2012 Aug 1;40(15):e115

  3. Edgar, R.C. (2004) MUSCLE: multiple sequence alignment with high accuracy and high throughput. Nucleic Acids Res. 32(5):1792-1797

  4. Edgar, R.C. (2004) MUSCLE: a multiple sequence alignment method with reduced time and space complexity. BMC Bioinformatics, (5) 113

  5. Sievers F, Wilm A, Dineen DG, Gibson TJ, Karplus K, Li W, Lopez R, McWilliam H, Remmert M, Söding J, Thompson JD, Higgins DG (2011). Fast, scalable generation of high-quality protein multiple sequence alignments using Clustal Omega. Molecular Systems Biology 7:539


Contributing

All contributions are welcome.


Support

If you have any problem or suggestion please open an issue here.


License

The MIT License

Copyright (c) 2016, dohalloran

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.