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 ``` 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 {