19566: Test p-value vs. Python.
[lightning.git] / cmd.go
diff --git a/cmd.go b/cmd.go
index a4df2e0fcbef5ce3a5a4e28786143daed0601fda..2b34b0ccaa4e1434b8ebfb333e083ddf89debe2b 100644 (file)
--- a/cmd.go
+++ b/cmd.go
@@ -10,6 +10,8 @@ import (
        "io/ioutil"
        "os"
        "os/exec"
+       "runtime/debug"
+       "strings"
 
        "git.arvados.org/arvados.git/lib/cmd"
        "github.com/mattn/go-isatty"
@@ -30,23 +32,36 @@ var (
                "export-numpy":       &exportNumpy{},
                "flake":              &flakecmd{},
                "slice":              &slicecmd{},
+               "slice-numpy":        &sliceNumpy{},
+               "tiling-stats":       &tilingStats{},
+               "anno2vcf":           &anno2vcf{},
                "numpy-comvar":       &numpyComVar{},
                "filter":             &filtercmd{},
                "build-docker-image": &buildDockerImage{},
-               "pca-go":             &goPCA{},
-               "pca-py":             &pythonPCA{},
                "plot":               &pythonPlot{},
                "diff-fasta":         &diffFasta{},
                "stats":              &statscmd{},
                "merge":              &merger{},
+               "dump":               &dump{},
                "dumpgob":            &dumpGob{},
+               "choose-samples":     &chooseSamples{},
        })
 )
 
+func init() {
+       if os.Getenv("GOGC") == "" {
+               debug.SetGCPercent(30)
+       }
+}
+
 func Main() {
        if !isatty.IsTerminal(os.Stderr.Fd()) {
                logrus.StandardLogger().Formatter = &logrus.TextFormatter{DisableTimestamp: true}
        }
+       if len(os.Args) >= 2 && !strings.HasSuffix(os.Args[1], "version") {
+               // print version (then run subcommand)
+               cmd.Version.RunCommand("lightning", nil, nil, os.Stderr, os.Stderr)
+       }
        os.Exit(handler.RunCommand(os.Args[0], os.Args[1:], os.Stdin, os.Stdout, os.Stderr))
 }