Package edu.msu.cme.rdp.taxatree.utils

Examples of edu.msu.cme.rdp.taxatree.utils.NewickTreeBuilder


    }

    private static UnifracTree parseNewickTree(String treeFile, Map<String, UnifracSample> sampleMap) throws IOException {
        UnifracTree unifracTree = new UnifracTree();

        NewickTreeBuilder builder = new NewickTreeBuilder(unifracTree, new FileInputStream(treeFile),
                new NewickTaxonFactory<MCTaxon>() {

                    public MCTaxon buildTaxon(int taxid, String name, float distance) {
                        return new UnifracTaxon(taxid, name, "", distance);
                    }
                });


        for (String seqName : sampleMap.keySet()) {
            UnifracSample sample = sampleMap.get(seqName);
            Integer taxid = builder.getTaxidByName(seqName);
            if (taxid == null) {
                System.err.println("Couldn't find " + seqName + " in the tree");
                continue;
            }
View Full Code Here

TOP

Related Classes of edu.msu.cme.rdp.taxatree.utils.NewickTreeBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.