Skip to content

Commit

Permalink
specify apptainer
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed May 6, 2024
1 parent 6c46fb0 commit 0f37184
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 43 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
pip install dist/*.whl
resources/buildforCI.sh
- name: harpy demultiplex
run: harpy demultiplex gen1 --schema test/demux/samples.schema test/demux/Undetermined_S0_L004_R* test/demux/Undetermined_S0_L004_I*
run: harpy demultiplex gen1 --snakemake "--apptainer-args --sandbox" --schema test/demux/samples.schema test/demux/Undetermined_S0_L004_R* test/demux/Undetermined_S0_L004_I*
shell: micromamba-shell {0}

test_preflight:
Expand Down Expand Up @@ -130,11 +130,11 @@ jobs:
resources/buildforCI.sh
- name: test preflight fastq
shell: micromamba-shell {0}
run: harpy preflight fastq test/fastq
run: harpy preflight fastq --snakemake "--apptainer-args sandbox" test/fastq
- name: test preflight bam
if: always()
shell: micromamba-shell {0}
run: harpy preflight bam test/bam
run: harpy preflight bam --snakemake "--apptainer-args sandbox" test/bam

test_qc:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -165,11 +165,11 @@ jobs:
resources/buildforCI.sh
- name: harpy qc
shell: micromamba-shell {0}
run: harpy qc -x "--trim_poly_g" --snakemake "--show-failed-logs" test/fastq
run: harpy qc -x "--trim_poly_g" --snakemake "--show-failed-logs --apptainer-args sandbox" test/fastq
- name: harpy qc skip adapter trimming
if: always()
shell: micromamba-shell {0}
run: harpy qc -a --snakemake "--show-failed-logs" test/fastq
run: harpy qc -a --snakemake "--show-failed-logs --apptainer-args sandbox" test/fastq

test_bwa:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
resources/buildforCI.sh
- name: test bwa
shell: micromamba-shell {0}
run: harpy align bwa -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs" -x "-A 2" test/fastq
run: harpy align bwa -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs --apptainer-args sandbox" -x "-A 2" test/fastq

test_ema:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
resources/buildforCI.sh
- name: test ema
shell: micromamba-shell {0}
run: harpy align ema --ema-bins 150 -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs" -x "-d" test/fastq
run: harpy align ema --ema-bins 150 -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs --apptainer-args sandbox" -x "-d" test/fastq

test_minimap:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
resources/buildforCI.sh
- name: test minimap
shell: micromamba-shell {0}
run: harpy align minimap -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs" -x "--seed 13" test/fastq
run: harpy align minimap -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs --apptainer-args sandbox" -x "--seed 13" test/fastq

test_mpileup:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:
run: harpy snp mpileup -r test/positions.bed -g test/genome/genome.fasta.gz -x "--ignore-RG" test/bam
- name: snp mpileup-pop
shell: micromamba-shell {0}
run: harpy snp mpileup -r test/positions.bed -o SNP/poptest -g test/genome/genome.fasta.gz -p test/samples.groups test/bam
run: harpy snp mpileup -r test/positions.bed -o SNP/poptest -g test/genome/genome.fasta.gz -p test/samples.groups -s "--apptainer-args --sandbox" test/bam

test_freebayes:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -361,11 +361,11 @@ jobs:
resources/buildforCI.sh
- name: impute
shell: micromamba-shell {0}
run: harpy impute --vcf test/vcf/test.bcf -p test/stitch.params --snakemake "--show-failed-logs" test/bam
run: harpy impute --vcf test/vcf/test.bcf -p test/stitch.params --snakemake "--show-failed-logs --apptainer-args sandbox" test/bam
- name: impute from vcf
shell: micromamba-shell {0}
if: always()
run: harpy impute --vcf-samples -o vcfImpute --vcf test/vcf/test.bcf -p test/stitch.params --snakemake "--show-failed-logs" test/bam
run: harpy impute --vcf-samples -o vcfImpute --vcf test/vcf/test.bcf -p test/stitch.params --snakemake "--show-failed-logs --apptainer-args sandbox" test/bam

test_phase:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -396,15 +396,15 @@ jobs:
resources/buildforCI.sh
- name: phase
shell: micromamba-shell {0}
run: harpy phase --vcf test/vcf/test.bcf --snakemake "--show-failed-logs" -x "--max_iter 10001" test/bam
run: harpy phase --vcf test/vcf/test.bcf --snakemake "--show-failed-logs --apptainer-args sandbox" -x "--max_iter 10001" test/bam
- name: phase with indels
shell: micromamba-shell {0}
if: always()
run: harpy phase --vcf test/vcf/test.bcf -o phaseindel -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs" test/bam
run: harpy phase --vcf test/vcf/test.bcf -o phaseindel -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs --apptainer-args sandbox" test/bam
- name: phase from vcf
shell: micromamba-shell {0}
if: always()
run: harpy phase --vcf-samples -o phasevcf --vcf test/vcf/test.bcf --snakemake "--show-failed-logs" test/bam
run: harpy phase --vcf-samples -o phasevcf --vcf test/vcf/test.bcf --snakemake "--show-failed-logs --apptainer-args sandbox" test/bam

test_leviathan:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -435,12 +435,12 @@ jobs:
resources/buildforCI.sh
- name: leviathan
shell: micromamba-shell {0}
run: harpy sv leviathan -n 100 -b 1 -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs" -x "-M 2002" test/bam
run: harpy sv leviathan -n 100 -b 1 -g test/genome/genome.fasta.gz --snakemake "--show-failed-logs --apptainer-args sandbox" -x "-M 2002" test/bam
continue-on-error: true
- name: leviathan-pop
if: always()
shell: micromamba-shell {0}
run: harpy sv leviathan -n 100 -b 1 -g test/genome/genome.fasta.gz -o SV/leviathanpop -p test/samples.groups --snakemake "--show-failed-logs" test/bam
run: harpy sv leviathan -n 100 -b 1 -g test/genome/genome.fasta.gz -o SV/leviathanpop -p test/samples.groups --snakemake "--show-failed-logs --apptainer-args sandbox" test/bam

test_naibr:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -471,20 +471,20 @@ jobs:
resources/buildforCI.sh
- name: naibr
shell: micromamba-shell {0}
run: harpy sv naibr -g test/genome/genome.fasta.gz -o SV/naibr --snakemake "--show-failed-logs" -x "-min_sv 5000" test/bam_phased && rm -r Genome
run: harpy sv naibr -g test/genome/genome.fasta.gz -o SV/naibr --snakemake "--show-failed-logs --apptainer-args sandbox" -x "-min_sv 5000" test/bam_phased && rm -r Genome
- name: naibr pop
if: always()
shell: micromamba-shell {0}
run: harpy sv naibr -g test/genome/genome.fasta.gz -o SV/pop -p test/samples.groups --snakemake "--show-failed-logs" test/bam_phased && rm -r Genome
run: harpy sv naibr -g test/genome/genome.fasta.gz -o SV/pop -p test/samples.groups --snakemake "--show-failed-logs --apptainer-args sandbox" test/bam_phased && rm -r Genome
- name: naibr with phasing
if: always()
shell: micromamba-shell {0}
run: |
harpy sv naibr -g test/genome/genome.fasta.gz -o SV/phase -v test/vcf/test.phased.bcf --snakemake "--show-failed-logs" test/bam && rm -r Genome
harpy sv naibr -g test/genome/genome.fasta.gz -o SV/phase -v test/vcf/test.phased.bcf --snakemake "--show-failed-logs --apptainer-args sandbox" test/bam && rm -r Genome
- name: naibr pop with phasing
if: always()
shell: micromamba-shell {0}
run: harpy sv naibr -g test/genome/genome.fasta.gz -o SV/phasepop -v test/vcf/test.phased.bcf -p test/samples.groups --snakemake "--show-failed-logs" test/bam && rm -r Genome
run: harpy sv naibr -g test/genome/genome.fasta.gz -o SV/phasepop -v test/vcf/test.phased.bcf -p test/samples.groups --snakemake "--show-failed-logs --apptainer-args sandbox" test/bam && rm -r Genome


test_simulate_variants:
Expand Down Expand Up @@ -517,26 +517,26 @@ jobs:
- name: simulate random snps/indels
shell: micromamba-shell {0}
run: |
harpy simulate snpindel --snp-count 10 --indel-count 10 -z 0.5 --snakemake "--show-failed-logs" test/genome/genome.fasta.gz
harpy simulate snpindel --prefix Simulate/snpvcf --snp-vcf Simulate/snpindel/sim.snpindel.snp.hap1.vcf --indel-vcf Simulate/snpindel/sim.snpindel.indel.hap1.vcf --snakemake "--show-failed-logs" test/genome/genome.fasta.gz
harpy simulate snpindel --snp-count 10 --indel-count 10 -z 0.5 --snakemake "--show-failed-logs --apptainer-args sandbox" test/genome/genome.fasta.gz
harpy simulate snpindel --prefix Simulate/snpvcf --snp-vcf Simulate/snpindel/sim.snpindel.snp.hap1.vcf --indel-vcf Simulate/snpindel/sim.snpindel.indel.hap1.vcf --snakemake "--show-failed-logs --apptainer-args sandbox" test/genome/genome.fasta.gz
- name: simulate inversions
shell: micromamba-shell {0}
if: always()
run: |
harpy simulate inversion --count 10 -z 0.5 test/genome/genome.fasta.gz
harpy simulate inversion --prefix Simulate/invvcf --vcf Simulate/inversion/sim.inversion.hap1.vcf --snakemake "--show-failed-logs" test/genome/genome.fasta.gz
harpy simulate inversion --prefix Simulate/invvcf --vcf Simulate/inversion/sim.inversion.hap1.vcf --snakemake "--show-failed-logs --apptainer-args sandbox" test/genome/genome.fasta.gz
- name: simulate cnv
shell: micromamba-shell {0}
if: always()
run: |
harpy simulate cnv --count 10 -z 0.5 test/genome/genome.fasta.gz
harpy simulate cnv --prefix Simulate/cnvvcf --vcf Simulate/cnv/sim.cnv.hap1.vcf --snakemake "--show-failed-logs" test/genome/genome.fasta.gz
harpy simulate cnv --prefix Simulate/cnvvcf --vcf Simulate/cnv/sim.cnv.hap1.vcf --snakemake "--show-failed-logs --apptainer-args sandbox" test/genome/genome.fasta.gz
- name: simulate translocations
shell: micromamba-shell {0}
if: always()
run: |
harpy simulate translocation --count 10 -z 0.5 test/genome/genome.fasta.gz
harpy simulate translocation --prefix Simulate/transvcf --vcf Simulate/translocation/sim.translocation.hap1.vcf --snakemake "--show-failed-logs" test/genome/genome.fasta.gz
harpy simulate translocation --prefix Simulate/transvcf --vcf Simulate/translocation/sim.translocation.hap1.vcf --snakemake "--show-failed-logs --apptainer-args sandbox" test/genome/genome.fasta.gz
test_simulate_linkedreads:
needs: [changes, pkgbuild]
Expand Down Expand Up @@ -567,7 +567,7 @@ jobs:
resources/buildforCI.sh
- name: simulate linked reads
shell: micromamba-shell {0}
run: harpy simulate linkedreads --snakemake "--show-failed-logs" -t 4 -n 2 -l 100 -p 50 test/genome/genome.fasta.gz test/genome/genome2.fasta.gz
run: harpy simulate linkedreads --snakemake "--show-failed-logs --apptainer-args sandbox" -t 4 -n 2 -l 100 -p 50 test/genome/genome.fasta.gz test/genome/genome2.fasta.gz

test_extras:
needs: [changes, pkgbuild]
Expand Down
6 changes: 3 additions & 3 deletions src/harpy/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def bwa(input, output_dir, genome, threads, extra_params, quality_filter, molecu
"""
output_dir = output_dir.rstrip("/")
workflowdir = f"{output_dir}/workflow"
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --use-apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command.append('--snakefile')
command.append(f'{workflowdir}/align-bwa.smk')
command.append("--configfile")
Expand Down Expand Up @@ -104,7 +104,7 @@ def ema(input, output_dir, platform, whitelist, genome, threads, ema_bins, skipr
"""
output_dir = output_dir.rstrip("/")
workflowdir = f"{output_dir}/workflow"
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --cores {threads} --directory .'.split()
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --use-apptainer --cores {threads} --directory .'.split()
command.append('--snakefile')
command.append(f'{workflowdir}/align-ema.smk')
command.append("--configfile")
Expand Down Expand Up @@ -188,7 +188,7 @@ def minimap(input, output_dir, genome, threads, extra_params, quality_filter, mo
"""
output_dir = output_dir.rstrip("/")
workflowdir = f"{output_dir}/workflow"
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --use-apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command.append('--snakefile')
command.append(f'{workflowdir}/align-minimap.smk')
command.append("--configfile")
Expand Down
2 changes: 1 addition & 1 deletion src/harpy/demultiplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def gen1(r1_fq, r2_fq, i1_fq, i2_fq, output_dir, schema, threads, snakemake, ski
"""
output_dir = output_dir.rstrip("/")
workflowdir = f"{output_dir}/workflow"
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --use-apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command.append('--snakefile')
command.append(f'{workflowdir}/demultiplex.gen1.smk')
command.append("--configfile")
Expand Down
2 changes: 1 addition & 1 deletion src/harpy/impute.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def impute(input, output_dir, parameters, threads, vcf, vcf_samples, extra_param
"""
output_dir = output_dir.rstrip("/")
workflowdir = f"{output_dir}/workflow"
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --use-apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command.append('--snakefile')
command.append(f'{workflowdir}/impute.smk')
command.append("--configfile")
Expand Down
2 changes: 1 addition & 1 deletion src/harpy/phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def phase(input, output_dir, vcf, threads, molecule_distance, prune_threshold, v
"""
output_dir = output_dir.rstrip("/")
workflowdir = f"{output_dir}/workflow"
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --use-apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command.append('--snakefile')
command.append(f"{workflowdir}/phase.smk")
command.append("--configfile")
Expand Down
2 changes: 1 addition & 1 deletion src/harpy/preflight.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def bam(input, output_dir, threads, snakemake, quiet, print_only):
"""
output_dir = output_dir.rstrip("/")
workflowdir = f"{output_dir}/workflow"
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --use-apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command.append('--snakefile')
command.append(f'{workflowdir}/preflight-bam.smk')
command.append('--configfile')
Expand Down
2 changes: 1 addition & 1 deletion src/harpy/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def qc(input, output_dir, min_length, max_length, ignore_adapters, extra_params,
"""
output_dir = output_dir.rstrip("/")
workflowdir = f"{output_dir}/workflow"
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer apptainer --conda-prefix .snakemake/conda --cores {threads} --directory .'.split()
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --use-apptainer apptainer --conda-prefix .snakemake/conda --cores {threads} --directory .'.split()
command.append('--snakefile')
command.append(f'{workflowdir}/qc.smk')
command.append('--configfile')
Expand Down
2 changes: 1 addition & 1 deletion src/harpy/simulatelinkedreads.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def linkedreads(genome_hap1, genome_hap2, output_dir, outer_distance, distance_s
"""
output_dir = output_dir.rstrip("/")
workflowdir = f"{output_dir}/workflow"
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command = f'snakemake --rerun-incomplete --rerun-triggers input mtime params --nolock --software-deployment-method conda apptainer --use-apptainer --conda-prefix ./.snakemake/conda --cores {threads} --directory .'.split()
command.append('--snakefile')
command.append(f'{workflowdir}/simulate-linkedreads.smk')
command.append('--configfile')
Expand Down
Loading

0 comments on commit 0f37184

Please sign in to comment.