X-Git-Url: https://git.arvados.org/lightning.git/blobdiff_plain/f1cff36f8beba7ef4b494120f1577224417c125b..5435c35e1d163adf5a79597721016c253e7c7e1d:/plot.go diff --git a/plot.go b/plot.go index 9723c91c88..0367b1241a 100644 --- a/plot.go +++ b/plot.go @@ -1,4 +1,8 @@ -package main +// Copyright (C) The Lightning Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + +package lightning import ( "flag" @@ -24,6 +28,7 @@ func (cmd *pythonPlot) RunCommand(prog string, args []string, stdin io.Reader, s inputFilename := flags.String("i", "-", "input `file`") sampleCSVFilename := flags.String("labels-csv", "", "use first two columns of `labels.csv` as id->color mapping") sampleFastaDirname := flags.String("sample-fasta-dir", "", "`directory` containing fasta input files") + priority := flags.Int("priority", 500, "container request priority") err = flags.Parse(args) if err == flag.ErrHelp { err = nil @@ -36,8 +41,9 @@ func (cmd *pythonPlot) RunCommand(prog string, args []string, stdin io.Reader, s Name: "lightning plot", Client: arvados.NewClientFromEnv(), ProjectUUID: *projectUUID, - RAM: 1 << 30, + RAM: 4 << 30, VCPUs: 1, + Priority: *priority, Mounts: map[string]map[string]interface{}{ "/plot.py": map[string]interface{}{ "kind": "text", @@ -114,7 +120,10 @@ if sys.argv[2]: 'PJL': 'blueviolet', } for fnm in sorted(labels.keys()): - colors.append(labelcolors[labels[fnm]]) + if labels[fnm] in labelcolors: + colors.append(labelcolors[labels[fnm]]) + else: + colors.append('black') from matplotlib.figure import Figure from matplotlib.patches import Polygon