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

exelixis-galaxy

v0.0.4

Published

Interactive phylogenetic tree viewer for the web

Downloads

11

Readme

exelixis

NPM version

Interactive and easy-to-use phylogenetic tree viewer for the web build on TnT.tree.

Getting Started

Install the module with: npm install exelixis and build it with npm run prepublish Have a look at the examples by starting the server with npm run sniper

var exe = require('exelixis');
var createTree = exe.createTree;
var updateTree = exe.updateTree;

Documentation

Default opts

Following default settings can be customized.

var opts = {
		el : document.getElementById("yourDiv"),
		tree : {
			data : "(homo_sapiens:12,(mus_musculus:12,(danio_rerio:13,(pan_troglodytes:9,(taeniopygia_guttata:10,callithrix_jacchus:11):12):12):10);",	
			width : 500,
			height : 12,
			scale : false,
			layoutInput : "vertical",
		},
		label : {
			fontsize : 12,
			usePics : false, 
			pics : {
				pictureSource : pics,
				pictureWidth : 30,
				pictureHeight : 40,
			},
		},
		nodes : {
			toggle : false, 
			select: false, 
			size : 5,
			fill : "grey",
			stroke : "black",
			selectedFill : "steelblue",
			selectedSize : 4,
		},
};

el

Change this to the div element you want to plot in your tree

tree

data (string) takes as input your newick string width (int) is the width of your tree height (int) is the height of your labels (currently under work) scale (boolean) scales the tree according to its branch lengths given in the newick string layoutInput ("vertical" or "radial") changes tree layout

label

fontsize (int) sets the fontsize usePics (boolean) use pictures in the label

pics

pictureSource (array) links to the png picture array you want to display. PicturesID has to be the same as the taxa names in the newick string. pictureWidth (int) sets the width of the picture pictureHeight (int) sets the picture height

nodes

toggle (boolean) clicking nodes will toggle its subtree select (boolean) change node to color selectedFill and size selectedSize when clicked fill (color) nodefill color stroke (color) nodestroke color

.createTree(opts)

Parameter: opts a json containing settings

The 'createTree' method returns a phylogenetic tree.

How to use this method

var tree = createTree();

not using any opts creates a tree with default opts

.updateTree(tree,opts)

Parameter: tree a tree object returned by createTree() , opts a json containing settings

The 'updateTree' method updates all opts properties which are given in opts with animations on runtime and saves its opts. All opts properties which are not mentioned stays the same as previously.

How to use this method

updateTree(tree, {tree:{data: "(Ape,(Bear,(Clown,Dolphin)))", width: 300, heigth: 20}});

Contributing

All contributions are welcome.

Support

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

License

This software is licensed under the Apache 2 license, quoted below.

Copyright (c) 2015, David

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.