
function createInput(dataToGraph, callback){

	var dataset = dataToGraph[0];
	var newickParser = require('newick_parser');
	var isNewick = false;

	if (dataset.newick != undefined) isNewick = true;
	//console.log(typeof dataset.newick);

	if (isNewick){
		var newickParser = require('./parsers/newickParser');
		
		newickParser(dataset, function(graph){
				callback(graph);
	    });
	}
	else{
		var profileParser = require('./parsers/profileParser');
		profileParser(dataset, function(graph){
			callback(graph);
		});
	}
}


module.exports = function(dataToGraph, callback){

	createInput(dataToGraph, function(graph){
		callback(graph);
	});
}
