Skip to content

Commit

Permalink
Dockerfile tests and cleanup imputation/PRS (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachulis authored Feb 12, 2025
1 parent 6b5f1a6 commit b450ca0
Show file tree
Hide file tree
Showing 107 changed files with 156 additions and 1,895 deletions.
32 changes: 10 additions & 22 deletions .dockstore.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
version: 1.2
workflows:
- name: ImputationWorkflow
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/Imputation.wdl
- name: PRScoringWorkflow
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/ScoringPart.wdl
- name: EndToEndPipeline
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/EndToEndPipeline.wdl
primaryDescriptorPath: /PRS/ScoringPart.wdl
- name: PerformPopulationPCA
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/PerformPopulationPCA.wdl
primaryDescriptorPath: /PRS/PerformPopulationPCA.wdl
- name: BenchmarkVCFs
subclass: WDL
primaryDescriptorPath: /BenchmarkVCFs/BenchmarkVCFs.wdl
Expand All @@ -21,15 +15,9 @@ workflows:
- name: BenchmarkAndCompareVCFs
subclass: WDL
primaryDescriptorPath: /BenchmarkVCFs/BenchmarkAndCompareVCFs.wdl
- name: ValidateImputation
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/Validation/ValidateImputation.wdl
- name: ValidateScoring
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/Validation/ValidateScoring.wdl
- name: FullImputationPRSValidation
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/Validation/FullImputationPRSValidation.wdl
primaryDescriptorPath: /PRS/Validation/ValidateScoring.wdl
- name: FindSamplesAndBenchmark
subclass: WDL
primaryDescriptorPath: /BenchmarkVCFs/FindSamplesAndBenchmark.wdl
Expand All @@ -47,19 +35,19 @@ workflows:
primaryDescriptorPath: /FunctionalEquivalence/FunctionalEquivalence.wdl
- name: PRSWrapper
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/PRSWrapper.wdl
primaryDescriptorPath: /PRS/PRSWrapper.wdl
- name: CKDRiskAdjustment
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/CKDRiskAdjustment.wdl
primaryDescriptorPath: /PRS/CKDRiskAdjustment.wdl
- name: CollectBenchmarkSucceeded
subclass: WDL
primaryDescriptorPath: /Utilities/WDLs/CollectBenchmarkSucceeded.wdl
- name: AggregatePRSResults
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/AggregatePRSResults.wdl
primaryDescriptorPath: /PRS/AggregatePRSResults.wdl
- name: TrainAncestryAdjustmentModel
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/TrainAncestryAdjustmentModel.wdl
primaryDescriptorPath: /PRS/TrainAncestryAdjustmentModel.wdl
- name: Glimpse1Imputation
subclass: WDL
primaryDescriptorPath: /GlimpseImputationPipeline/Glimpse1Imputation.wdl
Expand Down Expand Up @@ -140,13 +128,13 @@ workflows:
primaryDescriptorPath: /Utilities/WDLs/PRSQC.wdl
- name: PCARE
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/PCARE.wdl
primaryDescriptorPath: /PRS/PCARE.wdl
- name: PCAREAndQC
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/PCAREAndQC.wdl
primaryDescriptorPath: /PRS/PCAREAndQC.wdl
- name: ScoreBGE
subclass: WDL
primaryDescriptorPath: /ImputationPipeline/ScoreBGE/ScoreBGE.wdl
primaryDescriptorPath: /PRS/ScoreBGE/ScoreBGE.wdl
- name: BenchmarkSVs
subclass: WDL
primaryDescriptorPath: /BenchmarkSVs/BenchmarkSVs.wdl
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
python -m pip install --upgrade pip
- name: ScoreBGE Unit tests
run: |
pip install -r ImputationPipeline/ScoreBGE/requirements.txt
cd ImputationPipeline/ScoreBGE/tests
pip install -r PRS/ScoreBGE/requirements.txt
cd PRS/ScoreBGE/tests
export PYTHONPATH=$GITHUB_WORKSPACE
python -m unittest test_ScoreBGE.py
96 changes: 96 additions & 0 deletions .github/workflows/test_dockerfiles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Dockerfile tests
on:
push:
branches:
- main
pull_request:
paths:
- '**/Dockerfile'
schedule:
- cron: '23 2 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
define_changed_dockerfile_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-dockerfiles.outputs.all_changed_files }}
steps:
- uses: actions/checkout@v4
-
name: Get Changed Dockerfiles
id: changed-dockerfiles
uses: tj-actions/changed-files@v44
with:
matrix: true
files: '**/Dockerfile'
files_ignore: '**/GlimpseImputationPipeline/glimpse_docker/Dockerfile'
- name: List dockerfiles
run: echo '${{ steps.changed-dockerfiles.outputs.all_changed_files}}'

define_all_dockerfile_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.all-dockerfiles.outputs.files}}
steps:
- uses: actions/checkout@v4
-
name: Get all Dockerfiles
id: all-dockerfiles
run: |
{
echo 'files<<EOF'
find . -name "Dockerfile" ! -path "*/GlimpseImputationPipeline/glimpse_docker/*" | jq -R . | jq -s .
echo EOF
} >> "$GITHUB_OUTPUT"
- name: List dockerfiles
run: echo '${{ steps.all-dockerfiles.outputs.files}}'

test_builds:
runs-on: ubuntu-latest
needs: [define_changed_dockerfile_matrix, define_all_dockerfile_matrix]
strategy:
matrix:
dockerfile: ${{ github.ref != 'refs/heads/main' && fromJSON(needs.define_changed_dockerfile_matrix.outputs.matrix) || fromJSON(needs.define_all_dockerfile_matrix.outputs.matrix) }}
fail-fast: false

steps:
- uses: actions/checkout@v4
-
name: Get context
id: get-context
run: |
echo "context=$(dirname ${{ matrix.dockerfile }})" >> $GITHUB_OUTPUT
-
name: Build
uses: docker/build-push-action@v6
with:
context: ${{ steps.get-context.outputs.context }}
file: ${{ matrix.dockerfile }}

test_glimpse_docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
-
name: Check if Dockerfile has changed
id: check-if-changed
if: ${{ github.ref != 'refs/heads/main' }}
uses: tj-actions/changed-files@v44
with:
files: '**/GlimpseImputationPipeline/glimpse_docker/Dockerfile'
-
name: Build main GLIMPSE Docker
if: ${{ github.ref == 'refs/heads/main' || steps.check-if-changed.outputs.all_changed_files_count > 0 }}
run: |
cd GlimpseImputationPipeline/glimpse_docker
./build_base_and_extension_docker.sh -r https://github.com/odelaneau/GLIMPSE.git -t test -b master -y
-
name: Build Extract Num Sites Docker
if: ${{ github.ref == 'refs/heads/main' || steps.check-if-changed.outputs.all_changed_files_count > 0 }}
run: |
cd GlimpseImputationPipeline/glimpse_docker
./build_extract_num_sites_from_reference_chunk_docker.sh -y -r https://github.com/michaelgatzen/GLIMPSE.git -t test -b master
113 changes: 0 additions & 113 deletions ImputationPipeline/EndToEndPipeline.wdl

This file was deleted.

Loading

0 comments on commit b450ca0

Please sign in to comment.