Reduce memory use, Limit goroutines when exporting numpy.
[lightning.git] / ref2genome.go
index 79ea29de21802e2506b7d6c9e1ff663ee6324d65..058de169fb67612d01882f70f346c521c799f432 100644 (file)
@@ -1,4 +1,4 @@
-package main
+package lightning
 
 import (
        "bufio"
@@ -67,6 +67,7 @@ func (cmd *ref2genome) RunCommand(prog string, args []string, stdin io.Reader, s
                        ProjectUUID: cmd.projectUUID,
                        RAM:         1 << 30,
                        Priority:    *priority,
+                       VCPUs:       1,
                }
                err = runner.TranslatePaths(&cmd.refFile)
                if err != nil {
@@ -78,7 +79,7 @@ func (cmd *ref2genome) RunCommand(prog string, args []string, stdin io.Reader, s
                if err != nil {
                        return 1
                }
-               fmt.Fprintln(stdout, output)
+               fmt.Fprintln(stdout, output+"/ref.genome")
                return 0
        }
 
@@ -114,6 +115,7 @@ func (cmd *ref2genome) RunCommand(prog string, args []string, stdin io.Reader, s
                                fmt.Fprintf(out, "%s\t%d\n", label, seqlen)
                        }
                        label = strings.TrimSpace(string(buf[1:]))
+                       label = strings.SplitN(label, " ", 2)[0]
                        seqlen = 0
                } else {
                        seqlen += len(bytes.TrimSpace(buf))