Skip to content

conda envs as a class #909

conda envs as a class

conda envs as a class #909

Workflow file for this run

name: Test
on:
push:
branches:
- 'main'
pull_request:
branches:
- main
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CACHE_NUMBER: 0 # increase to reset cache manually
jobs:
changes:
name: Detect File Changes
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
validate: ${{ steps.filter.outputs.validate }}
deconvolve: ${{ steps.filter.outputs.deconvolve }}
demux: ${{ steps.filter.outputs.demux }}
qc: ${{ steps.filter.outputs.qc }}
bwa: ${{ steps.filter.outputs.bwa }}
strobealign: ${{ steps.filter.outputs.strobealign }}
mpileup: ${{ steps.filter.outputs.mpileup }}
freebayes: ${{ steps.filter.outputs.freebayes }}
leviathan: ${{ steps.filter.outputs.leviathan }}
naibr: ${{ steps.filter.outputs.naibr }}
impute: ${{ steps.filter.outputs.impute }}
phase: ${{ steps.filter.outputs.phase }}
simvars: ${{ steps.filter.outputs.simvars }}
simreads: ${{ steps.filter.outputs.simreads }}
assembly: ${{ steps.filter.outputs.assembly }}
other: ${{ steps.filter.outputs.other }}
convert: ${{ steps.filter.outputs.convert }}
environments: ${{ steps.filter.outputs.environments }}
modules: ${{ steps.filter.outputs.modules }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check Which Files Have Changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: .github/filters.yml
dmux_meier2021:
needs: changes
if: ${{ needs.changes.outputs.demux == 'true' }}
name: demux meier2021
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: harpy demultiplex
run: |
harpy demultiplex meier2021 --quiet 2 test/demux/samples.schema test/demux/multiplex.R* test/demux/multiplex.I* && \
ls -lh Demultiplex
validate:
needs: changes
if: ${{ needs.changes.outputs.validate == 'true' }}
name: validate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: test validate fastq
run: |
harpy validate fastq test/fastq && \
ls -lh Validate/fastq
- name: test validate bam
if: always()
run: |
harpy validate bam --quiet 2 test/bam && \
ls -lh Validate/bam
qc:
needs: changes
if: ${{ needs.changes.outputs.qc == 'true' }}
name: qc
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: harpy qc
run: |
harpy qc -x "--low_complexity_filter" --quiet 2 test/fastq && \
ls -lh QC
deconvolve:
needs: changes
if: ${{ needs.changes.outputs.deconvolve == 'true' }}
name: deconvolve
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: harpy deconvolve
run: |
harpy deconvolve --quiet 2 test/fastq && \
ls -lh Deconvolve
bwa:
needs: changes
if: ${{ needs.changes.outputs.bwa == 'true' }}
name: align BWA
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: test bwa
run: |
harpy align bwa --quiet 2 -x "-A 2" test/genome/genome.fasta.gz test/fastq && \
ls -lh Align/bwa
strobe:
needs: changes
if: ${{ needs.changes.outputs.strobealign == 'true' }}
name: align strobe
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: test strobealign
run: |
harpy align strobe --quiet 2 test/genome/genome.fasta.gz test/fastq && \
ls -lh Align/strobealign
mpileup:
needs: changes
if: ${{ needs.changes.outputs.mpileup == 'true' }}
name: mpileup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: snp mpileup
run: |
harpy snp mpileup --quiet 2 -r test/positions.bed -x "--ignore-RG" test/genome/genome.fasta.gz test/bam && \
ls -lh SNP/mpileup
- name: snp mpileup-pop
run: |
harpy snp mpileup --quiet 2 -r test/positions.bed -o SNP/poptest -p test/samples.groups test/genome/genome.fasta.gz test/bam && \
ls -lh SNP/poptest
freebayes:
needs: changes
if: ${{ needs.changes.outputs.freebayes == 'true' }}
name: freebayes
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: snp freebayes
run: |
harpy snp freebayes --quiet 2 -r test/positions.bed -x "-g 200" test/genome/genome.fasta.gz test/bam && \
ls -lh SNP/freebayes
- name: snp freebayes-pop
run: |
harpy snp freebayes --quiet 2 -r test/positions.bed -o SNP/poptest -p test/samples.groups test/genome/genome.fasta.gz test/bam && \
ls -lh SNP/poptest
impute:
needs: changes
if: ${{ needs.changes.outputs.impute == 'true' }}
name: impute
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: impute
run: |
harpy impute --quiet 2 --grid-size 1500 test/stitch.params test/vcf/test.bcf test/bam && \
ls -lh Impute/*/*
- name: impute from vcf
if: always()
run: |
harpy impute --quiet 2 --grid-size 1500 --vcf-samples -o vcfImpute test/stitch.params test/vcf/test.bcf test/bam && \
ls -lh vcfImpute/*/*
- name: impute one region
if: always()
run: |
harpy impute --quiet 2 --grid-size 1500 --vcf-samples -o regionImpute -r 3L:3000-28110227-1000 test/stitch.params test/vcf/test.bcf test/bam && \
ls -lh regionImpute/*/*
phase:
needs: changes
if: ${{ needs.changes.outputs.phase == 'true' }}
name: phase
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: phase
run: |
harpy phase --quiet 2 -x "--max_iter 10001" test/vcf/test.bcf test/bam && \
ls -lh Phase
- name: phase with indels
if: always()
run: |
harpy phase --quiet 2 -o phaseindel -r test/genome/genome.fasta.gz test/vcf/test.bcf test/bam && \
ls -lh phaseindel
- name: phase from vcf
if: always()
run: |
cp test/bam/sample1.bam test/bam/pineapple.bam && rename_bam -d pineapple1 test/bam/pineapple.bam
harpy phase --quiet 2 --vcf-samples -o phasevcf test/vcf/test.bcf test/bam && \
ls -lh phasevcf
leviathan:
needs: changes
if: ${{ needs.changes.outputs.leviathan == 'true' }}
name: sv leviathan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: leviathan
run: |
harpy sv leviathan --quiet 2 -m 100 -s 80,80,80 -b 1 -x "-M 2002" test/genome/genome.fasta.gz test/bam && \
ls -lh SV/leviathan
- name: leviathan-pop
if: always()
run: |
harpy sv leviathan --quiet 2 -m 100 -s 80,80,80 -b 1 -o SV/leviathanpop -p test/samples.groups test/genome/genome.fasta.gz test/bam && \
ls -lh SV/leviathanpop
naibr:
needs: changes
if: ${{ needs.changes.outputs.naibr == 'true' }}
name: sv naibr
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: naibr
run: |
harpy sv naibr --quiet 2 -o SV/naibr test/genome/genome.fasta.gz test/bam_phased && \
ls -lh SV/naibr
- name: naibr pop
if: always()
run: |
harpy sv naibr --quiet 2 -o SV/pop -p test/samples.groups test/genome/genome.fasta.gz test/bam_phased && \
ls -lh SV/pop
- name: naibr with phasing
if: always()
run: |
harpy sv naibr --quiet 2 -o SV/phase -v test/vcf/test.phased.bcf test/genome/genome.fasta.gz test/bam && \
ls -lh SV/phase
- name: naibr pop with phasing
if: always()
run: |
harpy sv naibr --quiet 2 -o SV/phasepop -v test/vcf/test.phased.bcf -p test/samples.groups test/genome/genome.fasta.gz test/bam && \
ls -lh SV/phasepop
simulate_variants:
needs: changes
if: ${{ needs.changes.outputs.simvars == 'true' }}
name: simulate variants
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: simulate random snps/indels
run: |
harpy simulate snpindel --quiet 2 --snp-count 10 --indel-count 10 -z 0.5 test/genome/genome.fasta.gz
ls -lh Simulate/snpindel
harpy simulate snpindel --quiet 2 --prefix Simulate/snpvcf --snp-vcf Simulate/snpindel/haplotype_1/sim.hap1.snp.vcf --indel-vcf Simulate/snpindel/haplotype_1/sim.hap1.indel.vcf test/genome/genome.fasta.gz && \
ls -lh Simulate
- name: simulate inversions
if: always()
run: |
harpy simulate inversion --quiet 2 --count 10 -z 0.5 test/genome/genome.fasta.gz
ls -lh Simulate/inversion
harpy simulate inversion --quiet 2 --prefix Simulate/invvcf --vcf Simulate/inversion/haplotype_1/sim.hap1.inversion.vcf test/genome/genome.fasta.gz && \
ls -lh Simulate
- name: simulate cnv
if: always()
run: |
harpy simulate cnv --quiet 2 --count 10 -z 0.5 test/genome/genome.fasta.gz
ls -lh Simulate/cnv
harpy simulate cnv --quiet 2 --prefix Simulate/cnvvcf --vcf Simulate/cnv/haplotype_1/sim.hap1.cnv.vcf test/genome/genome.fasta.gz && \
ls -lh Simulate
- name: simulate translocations
if: always()
run: |
harpy simulate translocation --quiet 2 --count 10 -z 0.5 test/genome/genome.fasta.gz
ls -lh Simulate/translocation
harpy simulate translocation --quiet 2 --prefix Simulate/transvcf --vcf Simulate/translocation/haplotype_1/sim.hap1.translocation.vcf test/genome/genome.fasta.gz && \
ls -lh Simulate
assembly:
needs: changes
if: ${{ needs.changes.outputs.assembly == 'true' }}
name: assembly
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: Clear Space
uses: jlumbroso/free-disk-space@main
- name: test assembly
run: |
harpy assembly --quiet 2 -r 4000 test/fastq/sample1.* && \
ls -lh Assembly
- name: test metassembly
run: |
harpy metassembly --quiet 2 --force -r 4000 test/fastq/sample1.* && \
ls -lh Metassembly
- name: test metassembly without barcodes
run: |
harpy metassembly --unlinked --force --quiet 2 -r 4000 test/fastq/sample1.* && \
ls -lh Metassembly
other:
needs: changes
if: ${{ needs.changes.outputs.other == 'true' }}
name: miscellaneous
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Harpy
uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.56.0
cache: false
activate-environment: true
- name: template impute
run: harpy template impute
- name: template groupings
run: harpy template groupings test/fastq
- name: template hpc
run: |
harpy template hpc-slurm
harpy template hpc-googlebatch
harpy template hpc-lsf
harpy template hpc-generic