Skip to content

Commit

Permalink
Github workflows added
Browse files Browse the repository at this point in the history
  • Loading branch information
agudys committed Sep 5, 2024
1 parent b9a8802 commit f9725b7
Show file tree
Hide file tree
Showing 67 changed files with 38,398 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Deploy

on:
release:
types:
- created

jobs:


########################################################################################
checkout:
name: Checkout
strategy:
matrix:
machine: [x64_linux, x64_mac, arm64_linux, arm64_mac]
runs-on: [self-hosted, lz-ani, '${{ matrix.machine }}']

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

########################################################################################
make:
name: Make
needs: checkout
strategy:
fail-fast: false
matrix:
machine: [x64_linux, arm64_linux, x64_mac, arm64_mac]

runs-on: [self-hosted, lz-ani, '${{ matrix.machine }}']

steps:
- name: make
run: |
make clean
make -j32 CXX=g++-12
- name: tar artifacts
run: tar -cvzf lz-ani.tar.gz lz-ani LICENSE


########################################################################################
help:
name: Print usage
needs: make
strategy:
fail-fast: false
matrix:
machine: [x64_linux, x64_mac, arm64_linux, arm64_mac]
runs-on: [self-hosted, lz-ani, '${{ matrix.machine }}']

steps:
- name: help
run: ./lz-ani

########################################################################################
upload:
name: Upload
needs: help
strategy:
fail-fast: false
matrix:
machine: [x64_linux, x64_mac, arm64_linux, arm64_mac]
runs-on: [self-hosted, lz-ani, '${{ matrix.machine }}']

steps:
- name: deploy
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./lz-ani.tar.gz
asset_name: lz-ani-${{ github.event.release.tag_name }}-${{matrix.machine}}.tar.gz
asset_content_type: application/gzip
62 changes: 62 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: GitHub Actions CI

on:
push:
branches: [ master, develop, main]
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:

########################################################################################
make:
name: Make
strategy:
fail-fast: false
matrix:
machine: [ubuntu-latest, macOS-12]
runs-on: ['${{ matrix.machine }}']

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: make
run: |
g++ --version
make -j CXX=g++-12
- name: tar artifacts
run: tar -cvf lz-ani.tar ./lz-ani ./test

- uses: actions/upload-artifact@v4
with:
name: executable-artifact-${{ matrix.machine }}
path: ./lz-ani.tar

########################################################################################
vir61:
needs: make
name: Virus data
strategy:
fail-fast: false
matrix:
machine: [ubuntu-latest, macOS-12]
runs-on: ['${{ matrix.machine }}']

steps:
- uses: actions/download-artifact@v4
with:
name: executable-artifact-${{ matrix.machine }}
path: ./

- name: untar artifacts
run: |
tar -xf lz-ani.tar
- name: build
run: |
./lz-ani all2all --in-dir ./test/vir61 --out ani.tsv
cmp ani.tsv ./test/vir61.ani.tsv
83 changes: 83 additions & 0 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Self-hosted CI

on:
pull_request:
branches: [ master, develop, main ]
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:

########################################################################################
checkout:
name: Checkout
strategy:
matrix:
machine: [tripper, arm64_linux, mac-i7, mac-m1]
runs-on: [self-hosted, lz-ani, '${{ matrix.machine }}']

steps:
- uses: actions/checkout@v4
with:
submodules: recursive


########################################################################################
make:
name: Make
needs: checkout
strategy:
fail-fast: false
matrix:
machine: [tripper, arm64_linux, mac-i7, mac-m1]
compiler: [12]
runs-on: [self-hosted, lz-ani, '${{ matrix.machine }}']

steps:
- name: make (g++-${{matrix.compiler}})
run: |
make -j32 CXX=g++-${{matrix.compiler}}
cp ./lz-ani ./lz-ani-${{matrix.compiler}}
make clean
########################################################################################
help:
name: Print usage
needs: make
strategy:
fail-fast: false
matrix:
machine: [tripper, arm64_linux, mac-i7, mac-m1]
compiler: [12]
runs-on: [self-hosted, lz-ani, '${{ matrix.machine }}']

env:
EXEC: ./lz-ani-${{matrix.compiler}}

steps:
- name: help (g++-${{matrix.compiler}})
run: |
${EXEC}
########################################################################################
vir61:
name: Vir61
needs: help
strategy:
fail-fast: false
matrix:
machine: [tripper, arm64_linux, mac-i7, mac-m1]
compiler: [12]
runs-on: [self-hosted, lz-ani, '${{ matrix.machine }}']

env:
EXEC: ./lz-ani-${{matrix.compiler}}

steps:

- name: all2all
run: |
${EXEC} all2all --in-dir ./test/vir61 --out ani.tsv
cmp ani.tsv ./test/vir61.ani.tsv
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# LZ-ANI

![version](https://img.shields.io/badge/version-1.1.0-blue.svg)
[![GitHub Actions CI](../../workflows/GitHub%20Actions%20CI/badge.svg)](../../actions/workflows/main.yml)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

LZ-ANI is a fast and memory-efficient tool for determining average nucleotide identity (ANI) in large sets of genomic sequences. The tool uses Lempel-Ziv parsing, achieving high sensitivity in discerning matched and mismatched nucleotides, thereby enabling accurate determination of ANI. Its efficiency stems from a simplified indel handling model, making LZ-ANI magnitudes faster than alignment-based tools (e.g., BLASTn, MegaBLAST) while maintaining accuracy comparable to the most sensitive BLASTn searches.

LZ-ANI is a key component of [Vclust](https://github.com/refresh-bio/vclust), a tool for comparing and clustering virus genomes. Although optimized for virus genomes, LZ-ANI's parameters can be customized for longer genomes, such as those of bacteria and archaea.
Expand Down
62 changes: 62 additions & 0 deletions test/vir61.ani.ids.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
id seq_len no_parts
NC_020483.1 42084 1
NC_028800.1 41698 1
NC_023005.1 41386 1
NC_011043.1 41181 1
NC_028661.1 41149 1
NC_013647.1 41119 1
NC_028977.1 41054 1
NC_015264.1 40973 1
NC_015719.1 40940 1
NC_028822.1 40829 1
NC_028863.1 40477 1
NC_024362.1 40472 1
NC_031943.1 40470 1
NC_023736.1 40411 1
NC_021062.1 40192 1
NC_028688.1 40114 1
NC_001604.1 39937 1
NC_022744.1 39860 1
NC_011040.1 39816 1
NC_007456.1 39704 1
NC_031258.1 39696 1
NC_023548.1 39651 1
NC_031115.1 39616 1
NC_001271.1 39600 1
NC_015208.1 39562 1
NC_007149.1 39503 1
NC_011534.1 39472 1
NC_031123.1 39444 1
NC_031066.1 39434 1
NC_019510.1 39282 1
NC_031018.1 39274 1
NC_015249.1 39270 1
NC_011042.1 39252 1
NC_028655.1 39235 1
NC_031114.1 39235 1
NC_023576.1 39207 1
NC_027292.1 39167 1
NC_015159.1 39162 1
NC_031092.1 39158 1
NC_028772.1 39133 1
NC_024379.1 39093 1
NC_031937.1 38979 1
NC_023558.1 38966 1
NC_011045.1 38841 1
NC_010807.1 38815 1
NC_027387.1 38810 1
NC_011038.1 38677 1
NC_025451.1 38646 1
NC_028880.1 38625 1
NC_023715.1 38616 1
NC_008694.1 38564 1
NC_019416.1 38513 1
NC_013651.1 38497 1
NC_011085.3 38457 1
NC_015271.1 38368 1
NC_003298.1 38208 1
NC_028702.1 38084 1
NC_004777.1 37555 1
NC_004665.1 37359 1
NC_029102.1 36051 1
NC_028795.1 31522 1
Loading

0 comments on commit f9725b7

Please sign in to comment.