npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

molphylo

v0.1.2

Published

MolPhylo: a molecular phylogenetic toolkit for node.js

Downloads

6

Readme

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] (http://www.ncbi.nlm.nih.gov/books/NBK25501/) 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

| FLAG | FIELD | | --------------------- |:---------------------------------------:| | -d | data_type | | -q | |
| -n | nb_data_sets | | -b | int | | -m | model | | -f | e | d | 'fA fC fG fT' | | -t | ts/tv_ratio | | -v | prop_invar | | -c | nb_subst_cat | | -a | gamma | | -s | move | | -u | user_tree_file | | -o | 'tlr' | 'tl' | 'tr' | 'l' | 'r' | 'n' | | --rand_start | | | --n_rand_starts | num | | --r_seed | num | | --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

| FLAG | FUNCTION | | ------------- |:----------------------------------------------:| | -diags | Find diagonals (faster for similar sequences) | | -html | Write output in HTML format (default FASTA) | | -msf | Write output in GCG MSF format (default FASTA) | | -clw | Write output in CLUSTALW format (default FASTA)| | -clwstrict | As -clw, with 'CLUSTAL W (1.81)' header | | -quiet | Do 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

| FLAG | FUNCTION | | -------------------------- |:--------------------------------------------------------------------------------------:| | --full | Use full distance matrix for guide-tree calculation (slow; mBed is default) | | --full-iter | Use full distance matrix for guide-tree calculation during iteration (mBed is default) | | --cluster-size | Write output in GCG MSF format (default FASTA) | | --use-kimura | use Kimura distance correction for aligned sequences (default no) | | --percent-id | convert distances into percent identities (default no) | | --outfmt | {a2m=fa[sta],clu[stal],msf,phy[lip],selex,st[ockholm],vie[nna]} | | --resno | in Clustal format print residue numbers (default no) | | --wrap | number of residues before line-wrap in output | | --output-order | {input-order,tree-order} | | --iter | Number of (combined guide tree/HMM) iterations | | --max-guidetree-iterations | Maximum guide tree iterations | | --max-hmm-iterations | Maximum 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.