EVA-3430 - Add bcftools norm before ingesting (#25) #183
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint for Python scripts | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Covid-19 DP submission CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java-version: [1.11] | |
python-version: [3.8] | |
vcf-validator-version: [0.9.4] | |
mongo-version: [4.0.21] | |
services: | |
db: | |
image: postgres | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
mongodb: | |
image: mongo:${{ matrix.mongo-version }} | |
ports: | |
- 27017:27017 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Java JDK # Nextflow relies on JDK | |
uses: actions/[email protected] | |
# The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x). Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28 | |
with: | |
java-version: ${{ matrix.java-version }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
python setup.py install | |
- name: Set up Nextflow | |
run: | | |
sudo bash -c "export JAVA_CMD="$(which java)" && cd /usr/bin && (curl -s https://get.nextflow.io | bash) && chmod 755 nextflow" | |
/usr/bin/nextflow -version | |
- name: Set up VCF validator and assembly checker | |
run: | | |
sudo bash -c "cd /usr/bin && wget https://github.com/EBIvariation/vcf-validator/releases/download/v${{ matrix.vcf-validator-version }}/vcf_validator_linux && chmod 755 vcf_validator_linux" | |
sudo bash -c "cd /usr/bin && wget https://github.com/EBIvariation/vcf-validator/releases/download/v${{ matrix.vcf-validator-version }}/vcf_assembly_checker_linux && chmod 755 vcf_assembly_checker_linux" | |
- name: Set up BCFtools | |
run: | | |
sudo apt update | |
sudo apt -y install maven samtools bcftools parallel libbz2-dev liblzma-dev | |
- name: Set up ascp binary | |
# Might need to periodically update this URL | |
run: | | |
curl https://d3gcli72yxqn2z.cloudfront.net/connect_latest/v4/bin/ibm-aspera-connect_4.1.3.93_linux.tar.gz -o ibm-aspera-connect.tar.gz | |
tar xzvf ibm-aspera-connect.tar.gz | |
./ibm-aspera-connect_*_linux.sh | |
chmod +x ~/.aspera/connect/bin/ascp; sudo ln -s ~/.aspera/connect/bin/ascp /usr/bin | |
- name: Test with pytest | |
env: | |
EVA_STATS_DEV_PASSWORD: ${{ secrets.EVA_STATS_DEV_PASSWORD }} | |
run: | | |
export ASPERA_ID_DSA=~/.aspera/connect/etc/asperaweb_id_dsa.openssh | |
PYTHONPATH=. pytest tests | |
- name: Test bash script | |
run: | | |
tests/test_run_ingestion.sh |