Skip to content

Commit

Permalink
Use default tree repo
Browse files Browse the repository at this point in the history
  • Loading branch information
seppinho committed Jun 5, 2024
1 parent f73e2fb commit 61df6c4
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
package genepi.haplogrep3.commands;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

import genepi.haplogrep3.config.Configuration;
import genepi.haplogrep3.App;
import genepi.haplogrep3.haplogrep.io.HaplogroupClustering;
import genepi.haplogrep3.model.Phylotree;
import genepi.haplogrep3.model.PhylotreeRepository;
import picocli.CommandLine.Option;

public class ClusterHaplogroupsCommand extends AbstractCommand {

public static String CONFIG_FILE = "haplogrep3.yaml";

@Option(names = { "--tree" }, description = "tree name", required = true)
String tree;

Expand Down Expand Up @@ -51,12 +48,10 @@ public Integer call() throws Exception {

return 0;

}
}

public Phylotree loadPhylotree(String id) throws FileNotFoundException, IOException {
PhylotreeRepository repository = new PhylotreeRepository();
Configuration configuration = Configuration.loadFromFile(new File(CONFIG_FILE), "");
repository.loadFromConfiguration(configuration);
PhylotreeRepository repository = App.getDefault().getTreeRepository();
return repository.getById(id);
}

Expand Down

0 comments on commit 61df6c4

Please sign in to comment.