Fix some tests.
[lightning.git] / cmd.go
diff --git a/cmd.go b/cmd.go
index 3975bf7b0348aff8a84b99712e83758813a79ede..97bc8d30af38a2f5b74d220cef59cd352ae45db4 100644 (file)
--- a/cmd.go
+++ b/cmd.go
@@ -10,6 +10,7 @@ import (
        "io/ioutil"
        "os"
        "os/exec"
+       "runtime/debug"
        "strings"
 
        "git.arvados.org/arvados.git/lib/cmd"
@@ -31,24 +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{},
+               "pca-plot":           &pythonPlot{},
+               "manhattan-plot":     &manhattanPlot{},
                "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))
@@ -67,8 +80,9 @@ func (cmd *buildDockerImage) RunCommand(prog string, args []string, stdin io.Rea
 RUN DEBIAN_FRONTEND=noninteractive \
   apt-get update && \
   apt-get dist-upgrade -y && \
-  apt-get install -y --no-install-recommends bcftools bedtools samtools python2 python3-sklearn python3-matplotlib ca-certificates && \
-  apt-get clean
+  apt-get install -y --no-install-recommends bcftools bedtools samtools python2 python3-sklearn python3-matplotlib python3-pip ca-certificates && \
+  apt-get clean && \
+  pip3 install qmplot
 `), 0644)
        if err != nil {
                fmt.Fprint(stderr, err)