From d7f44b031614cececa35dd9a99c5feeb64b4c7a7 Mon Sep 17 00:00:00 2001 From: Will Rowe Date: Tue, 15 Sep 2026 16:47:11 +0100 Subject: [PATCH 1/2] fix: add github actions ci and main links --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ README.md | 4 ++-- cmd/get.go | 2 +- docs/tutorial.md | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0fdeb23 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI + +on: + push: + branches: + - master + - main + - bug-fixes + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.27' + cache: true + + - name: Download dependencies + run: go get -d -t -v ./... + + - name: Run tests + run: go test -v ./... + + - name: Build + run: go build -v ./... diff --git a/README.md b/README.md index a6b26b9..9f5fdea 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ groot-logo

Graphing Resistance Out Of meTagenomes


- gitlab-ci + github-actions Documentation Status reportcard - License + License DOI gitter bioconda diff --git a/cmd/get.go b/cmd/get.go index b5ed620..ea9075e 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/main/db/clustered-ARG-databases/%v/", version.GetBaseVersion()) // the command line arguments var ( diff --git a/docs/tutorial.md b/docs/tutorial.md index 135a314..39666bf 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -284,7 +284,7 @@ Now we have a set of ARGs we know are present in one or more samples, we might w Download the full ARG-ANNOT set of genes and then index with samtools: ```bash -wget https://github.com/will-rowe/groot/raw/master/db/full-ARG-databases/arg-annot-db/argannot-args.fna +wget https://github.com/will-rowe/groot/raw/main/db/full-ARG-databases/arg-annot-db/argannot-args.fna samtools faidx argannot-args.fna ``` From e17b22f4230ea519db37e5c93c661f8408ac36dc Mon Sep 17 00:00:00 2001 From: Will Rowe Date: Tue, 15 Sep 2026 14:27:33 +0100 Subject: [PATCH 2/2] Update addWindow function to track maxSpan Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/graph/graph.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/graph/graph.go b/src/graph/graph.go index 4c22e69..3b2e8c1 100644 --- a/src/graph/graph.go +++ b/src/graph/graph.go @@ -252,7 +252,10 @@ func (GrootGraph *GrootGraph) WindowGraph(windowSize, kmerSize, sketchSize int) } windowLookup := make(map[windowLocation]lshe.Keys) - addWindow := func(window lshe.Key) { +addWindow := func(window lshe.Key) { + if window.MergeSpan > GrootGraph.maxSpan { + GrootGraph.maxSpan = window.MergeSpan + } key := windowLocation{graphID: window.GraphID, node: window.Node, offset: window.OffSet} if existingWindowLocation, ok := windowLookup[key]; ok {