From 242ba69ade7628eb30a04c5c074f13c1c2c61212 Mon Sep 17 00:00:00 2001 From: Will Rowe Date: Fri, 24 Apr 2020 13:56:00 +0100 Subject: [PATCH] fixing previous botched commit --- cmd/align.go | 6 +++--- cmd/get.go | 2 +- cmd/index.go | 4 ++-- cmd/report.go | 2 +- cmd/version.go | 2 +- src/graph/graphio.go | 2 +- src/pipeline/1_pipeline_test.go | 2 +- src/pipeline/boss.go | 2 +- src/pipeline/haplotype.go | 2 +- src/version/version.go | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cmd/align.go b/cmd/align.go index 3cb6442..bfa0187 100644 --- a/cmd/align.go +++ b/cmd/align.go @@ -74,7 +74,7 @@ func runSketch() { // start the sketch sub command start := time.Now() - log.Printf("i am groot (version %s)", version.GetVersion) + log.Printf("i am groot (version %s)", version.GetVersion()) log.Printf("starting the sketch subcommand") // check the supplied files and then log some stuff @@ -91,8 +91,8 @@ func runSketch() { log.Print("loading the index information...") info := new(pipeline.Info) misc.ErrorCheck(info.Load(*indexDir + "/groot.gg")) - if info.Version != version.GetVersion { - misc.ErrorCheck(fmt.Errorf("the groot index was created with a different version of groot (you are currently using version %v)", version.GetVersion)) + if info.Version != version.GetVersion() { + misc.ErrorCheck(fmt.Errorf("the groot index was created with a different version of groot (you are currently using version %v)", version.GetVersion())) } log.Printf("\tk-mer size: %d\n", info.KmerSize) log.Printf("\tsketch size: %d\n", info.SketchSize) diff --git a/cmd/get.go b/cmd/get.go index d2d51c2..4b8cd23 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -46,7 +46,7 @@ var md5sums = map[string]string{ } // dbUrl to download databases from -var dbURL = fmt.Sprintf("https://github.com/will-rowe/groot/raw/master/db/clustered-ARG-databases/%v/", version.GetBaseVersion) +var dbURL = fmt.Sprintf("https://github.com/will-rowe/groot/raw/master/db/clustered-ARG-databases/%v/", version.GetBaseVersion()) // the command line arguments var ( diff --git a/cmd/index.go b/cmd/index.go index c3c0041..4800dc4 100644 --- a/cmd/index.go +++ b/cmd/index.go @@ -77,7 +77,7 @@ func runIndex() { // start the index sub command start := time.Now() - log.Printf("i am groot (version %s)", version.GetVersion) + log.Printf("i am groot (version %s)", version.GetVersion()) log.Printf("starting the index subcommand") // check the supplied files and then log some stuff @@ -92,7 +92,7 @@ func runIndex() { // record the runtime information for the index sub command info := &pipeline.Info{ - Version: version.GetVersion, + Version: version.GetVersion(), KmerSize: *kmerSize, SketchSize: *sketchSize, WindowSize: *windowSize, diff --git a/cmd/report.go b/cmd/report.go index e7412ed..a2c911d 100644 --- a/cmd/report.go +++ b/cmd/report.go @@ -110,7 +110,7 @@ func runReport() { logFH := misc.StartLogging(*logFile) defer logFH.Close() log.SetOutput(logFH) - log.Printf("i am groot (version %s)", version.GetVersion) + log.Printf("i am groot (version %s)", version.GetVersion()) log.Printf("starting the report subcommand") // check the supplied files and then log some stuff log.Printf("checking parameters...") diff --git a/cmd/version.go b/cmd/version.go index 10c9853..8b46b34 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -33,7 +33,7 @@ var versionCmd = &cobra.Command{ Short: "Prints current version number and exits", Long: `Prints current version number and exits`, Run: func(cmd *cobra.Command, args []string) { - fmt.Println(version.GetVersion) + fmt.Println(version.GetVersion()) }, } diff --git a/src/graph/graphio.go b/src/graph/graphio.go index 145a8c5..4cffcd1 100644 --- a/src/graph/graphio.go +++ b/src/graph/graphio.go @@ -20,7 +20,7 @@ func (GrootGraph *GrootGraph) SaveGraphAsGFA(fileName string, totalKmers int) (i // a flag to prevent dumping graphs which had no reads map graphUsed := false t := time.Now() - stamp := fmt.Sprintf("variation graph created by groot (version %v) at: %v", version.GetVersion, t.Format("Mon Jan _2 15:04:05 2006")) + stamp := fmt.Sprintf("variation graph created by groot (version %v) at: %v", version.GetVersion(), t.Format("Mon Jan _2 15:04:05 2006")) msg := fmt.Sprintf("this graph is approximately weighted using k-mer frequencies from projected read sketches (total k-mers projected across all graphs: %d)", totalKmers) // create a GFA instance newGFA := gfa.NewGFA() diff --git a/src/pipeline/1_pipeline_test.go b/src/pipeline/1_pipeline_test.go index 5f52dce..824f3bf 100644 --- a/src/pipeline/1_pipeline_test.go +++ b/src/pipeline/1_pipeline_test.go @@ -31,7 +31,7 @@ TEST PARAMETERS */ var testParameters = &Info{ NumProc: 1, - Version: version.GetVersion, + Version: version.GetVersion(), KmerSize: 31, SketchSize: 30, WindowSize: 100, diff --git a/src/pipeline/boss.go b/src/pipeline/boss.go index 543fae8..6c85d06 100644 --- a/src/pipeline/boss.go +++ b/src/pipeline/boss.go @@ -55,7 +55,7 @@ func (theBoss *theBoss) mapReads() error { theBoss.alignments = make(chan *sam.Record, BUFFERSIZE) // get program info for SAM header (unique ID, name, command, previous program ID, version) - programInfo := sam.NewProgram("1", "groot", "groot align", "", version.GetVersion) + programInfo := sam.NewProgram("1", "groot", "groot align", "", version.GetVersion()) // get some readgroup information TODO: set this properly rg, err := sam.NewReadGroup("readsID", "", "", "", "groot align", "illumina", "", "sampleID", "", "", time.Now(), 1000) diff --git a/src/pipeline/haplotype.go b/src/pipeline/haplotype.go index 70bb2a9..7cc0322 100644 --- a/src/pipeline/haplotype.go +++ b/src/pipeline/haplotype.go @@ -165,7 +165,7 @@ func (proc *HaplotypeParser) Run() { log.Printf("\t- [%v (abundance: %.3f)]", path, abundances[i]) keptPaths = append(keptPaths, path) } - g.GrootVersion = version.GetVersion + g.GrootVersion = version.GetVersion() keptGraphs[g.GraphID] = g } proc.info.Store = keptGraphs diff --git a/src/version/version.go b/src/version/version.go index d1cc143..385ab84 100644 --- a/src/version/version.go +++ b/src/version/version.go @@ -11,7 +11,7 @@ const minor = 0 // patch is the patch version number const patch = 1 -// GetVersion returns the full version string for the current GROOT software +// GetVersion() returns the full version string for the current GROOT software func GetVersion() string { return fmt.Sprintf("%d.%d.%d", major, minor, patch) }