Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .github/workflows/test_utils.yaml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Kit tests

on:
pull_request:
branches:
- main

jobs:
get-changed-kits:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files in root directories
uses: tj-actions/changed-files@v47.0.5
id: changed-files
with:
dir_names: "true"
dir_names_max_depth: 1
files: |
*/**
files_ignore: |
.github/**
base_sha: ${{ github.event.pull_request.base.ref }}

- name: Set matrix
id: set-matrix
run: |
kits="${{ steps.changed-files.outputs.all_changed_files }}"
# Convert space-separated string to JSON array (single line)
MATRIX=$(echo $kits | jq -cR 'split(" ") | map(select(length > 0))')
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT

test-kit:
name: Test ${{ matrix.module }}
needs: [get-changed-kits]
if: ${{ needs.get-changed-kits.outputs.matrix != '[]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module: ${{ fromJson(needs.get-changed-kits.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run kit test
run: |
cd ${{ matrix.module }} && make test
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Genomics Kit integrates the utilities for bioinformatics analysis
2. [spark-on-slurm](./spark-on-slurm/): Spark on SLURM cluster configuration, supported
3. [GLnexus](https://github.com/dnanexus-rnd/GLnexus): The joint variant calling for cohort vcf for deepvariant gvcf
4. [DPGT](https://github.com/BGI-flexlab/DPGT): DPGT is a distributed population genetics analysis tool which enabled joint calling on millions of WGS(whole genome sequencing) samples.
5. [Hail](https://hail.is/): Powering genomic analysis, at every scale
1 change: 1 addition & 0 deletions common.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.PHONY: test
HOMEDIR:=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
${HOME}/.pixi/bin/pixi:
curl -sSL https://pixi.sh/install.sh | sh
2 changes: 2 additions & 0 deletions hail/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff
3 changes: 3 additions & 0 deletions hail/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pixi environments
.pixi/*
!.pixi/config.toml
47 changes: 47 additions & 0 deletions hail/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
include ../common.mk
SLURM_IMAGE:= nttg8100/river-slurm:1.1.0
.PHONY: setup example clean install

setup: ${HOME}/.pixi/bin/pixi
${HOME}/.pixi/bin/pixi install

start-slurm:
docker run \
-v ${HOMEDIR}:/tmp/gkit \
-v ${HOME}/.pixi:/root/.pixi \
--name slurm-dev \
-p 8081:22 \
--rm \
--privileged \
-d ${SLURM_IMAGE} || echo "Docker Slurm is already configured"

get-slurm:
@count=0; \
max=5; \
until [ $$count -ge $$max ]; do \
echo "Checking SLURM (attempt $$((count+1))/$$max)..." ; \
docker exec -w /home/river slurm-dev squeue && break; \
count=$$((count+1)); \
echo "SLURM not ready, retrying in 5 seconds..." ; \
sleep 5; \
done; \
if [ $$count -eq $$max ]; then \
echo "SLURM still not available after $$max attempts"; \
exit 1; \
fi

install:
${HOME}/.pixi/bin/pixi run install-sparkhpc

# inside user river is the standard user with 1001 mapping id, Github Actions does not have this user
test: ${HOME}/.pixi/bin/pixi start-slurm get-slurm
docker exec \
-w /tmp/gkit/hail \
slurm-dev /root/.pixi/bin/pixi run sparkhpc-hail

test-slurm-local:
${HOME}/.pixi/bin/pixi run sparkhpc-example

clean:
rm -f sparkhpc/sparkcluster-*.log sparkhpc/job
rm -f ${HOME}/.sparkhpc*
Loading
Loading