phyloviz_input

1.0.2 • Public • Published

PHYLOViZ INPUT

This package allows creation of PHYLOViZ graph input object that is then used in phyloviz_graph

#INPUT

The package uses as input an object that is returned after computation of links between profiles using goeBURST. It has the following attributes:

PHYLOViZ_prev_graph = {
	name: "datasetName", //Name for the data set
	key:"ID", //Key used to link metadata to profiles
	data_type: "profile", //type of data used
	profiles: [{"ID": "ST1","A":"1","B":"3"},{"ID": "ST2","A":"2", "B":"1"}], //profiles format. One ID per profile and the 
	schemegenes: ["ID","A","B"], //ID of profiles and id of each position of the profile
	metadata: ["ID", "From"], //ID of each metadata and each field of the metadata
	isolates: [{"ID":"ST1", "From":"Japan"}, {"ID":"ST2", "From":"USA"}, {"ID":"ST2", "From":"Portugal"}], //information to link to the tree. 
	newick: undefined, //used for newick visualization. undefined by default
	linkMethod: 'isolates', //link method that is being used. By profile or by isolates
	propertyIndex: 1 //Index of the field in metadata that is being used to link colours to the tree.
	distanceMatrix: [[0,1]] //distances between profiles,
	links: [{source:"ST1", target:"ST2", value: 2}]
	positions:{}
}

#Usage example

var phyloviz_input = require('phyloviz_input');

phyloviz_input(PHYLOViZ_prev_graph, function(PHYLOViZ_to_graph){
	console.log(PHYLOViZ_to_graph); //Object to construct the graph
});

Readme

Keywords

none

Package Sidebar

Install

npm i phyloviz_input

Weekly Downloads

0

Version

1.0.2

License

ISC

Last publish

Collaborators

  • bfrgoncalves