private static Log log = Log.getInstance(CramTools.class);
public static void main(String[] args) throws Exception {
Params params = new Params();
JCommander jc = new JCommander(params);
jc.setProgramName("cramtools");
Cram2Bam.Params cram2BamParams = new Cram2Bam.Params();
Bam2Cram.Params bam2CramParams = new Bam2Cram.Params();
CramIndexer.Params indexParams = new CramIndexer.Params();
Merge.Params mergeParams = new Merge.Params();
jc.addCommand(CRAM2BAM_COMMAND, cram2BamParams);
jc.addCommand(BAM2CRAM_COMMAND, bam2CramParams);
jc.addCommand(INDEX_COMMAND, indexParams);
jc.addCommand(MERGE_COMMAND, mergeParams);
jc.parse(args);
String command = jc.getParsedCommand();
if (command == null || params.help) {
StringBuilder sb = new StringBuilder();
sb.append("\n");
jc.usage(sb);
System.out.println("Version "
+ CramTools.class.getPackage().getImplementationVersion());
System.out.println(sb.toString());
return;