-
Notifications
You must be signed in to change notification settings - Fork 0
/
svync.go
68 lines (64 loc) · 1.7 KB
/
svync.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package main
import (
"log"
"os"
"github.com/nvnieuwk/svync/svync_api"
cli "github.com/urfave/cli/v2"
)
func main() {
app := &cli.App{
Name: "svync",
Usage: "A tool to standardize VCF files from structural variant callers",
HideHelpCommand: true,
Version: "0.1.2",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "nodate",
Aliases: []string{"nd"},
Usage: "Don't add the current date to the output VCF header",
Category: "Optional",
},
&cli.StringFlag{
Name: "output",
Aliases: []string{"o"},
Usage: "The location to the output VCF file, defaults to stdout",
Category: "Optional",
},
// TODO re-add this when conversion is implemented
// &cli.BoolFlag{
// Name: "to-breakpoint",
// Aliases: []string{"tb"},
// Usage: "Convert pairs of breakends to a single breakpoint variant. WARNING: this will cause some loss of data.",
// Category: "Optional",
// },
&cli.BoolFlag{
Name: "mute-warnings",
Aliases: []string{"mw"},
Usage: "Mute all warnings.",
Category: "Optional",
},
&cli.StringFlag{
Name: "config",
Aliases: []string{"c"},
Usage: "Configuration file (YAML) used for standardizing the VCF",
Required: true,
Category: "Required",
},
&cli.StringFlag{
Name: "input",
Aliases: []string{"i"},
Usage: "The input VCF file to standardize",
Required: true,
Category: "Required",
},
},
Action: func(Cctx *cli.Context) error {
config := svync_api.ReadConfig(Cctx)
svync_api.Execute(Cctx, config)
return nil
},
}
if err := app.Run(os.Args); err != nil {
log.New(os.Stderr, "", 0).Fatal(err)
}
}