Skip to content

Commit

Permalink
update custom targets for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Sep 22, 2020
1 parent 4fff30b commit d3a7bcf
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 52 deletions.
37 changes: 32 additions & 5 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
jobs:
#----------------------------------------------------------------------------#
# Install dependencies
install :
pipeline :
runs-on: ubuntu-latest
steps:
#------------------------------------------------------------------------#
Expand Down Expand Up @@ -59,14 +59,41 @@ jobs:
run:
mamba env create -f workflow/envs/default.yaml
#------------------------------------------------------------------------#
# Test pipeline
- name: test pipeline
# Test Database import rules
- name: test database import
shell: bash -l {0}
run:
conda activate default;
snakemake all --use-conda --profile profiles/gh-actions;
snakemake --report report.html;
snakemake --use-conda --profile profiles/gh-actions test_sqlite_import_reference test_sqlite_import_assembly test_sqlite_import_sra
conda deactivate;
# Test Data Download
- name: test download
shell: bash -l {0}
run:
conda activate default;
snakemake --use-conda --profile profiles/gh-actions test_sqlite_import_reference test_download_sra test_download_fna test_download_ref
conda deactivate
# Test Alignment
- name: test download
shell: bash -l {0}
run:
conda activate default;
snakemake --use-conda --profile profiles/gh-actions test_sqlite_import_reference test_snippy_pairwise_fna test_eager_sra
conda deactivate
# Test Phylogeny
- name: test download
shell: bash -l {0}
run:
conda activate default;
snakemake --use-conda --profile profiles/gh-actions test_sqlite_import_reference test_iqtree
conda deactivate
# Test Report Generation
- name: test report
shell: bash -l {0}
run:
conda activate default;
snakemake --report report.html;
conda deactivate
#------------------------------------------------------------------------#
# Artifact Upload
- name: artifact report
Expand Down
1 change: 1 addition & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ include: "rules/download.smk"
include: "rules/alignment.smk"
include: "rules/phylogeny.smk"
include: "rules/functions.smk"
include: "rules/targets.smk"

# Report file
report: "report/workflow.rst"
Expand Down
47 changes: 0 additions & 47 deletions workflow/logs/snippy_multi/snippy-core.log

This file was deleted.

52 changes: 52 additions & 0 deletions workflow/rules/targets.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

# Custom targets for testing

# Database Import
rule test_sqlite_import_assembly:
input:
results_dir + "/sqlite_import/download_assembly.txt"

rule test_sqlite_import_sra:
input:
results_dir + "/sqlite_import/eager_sra.tsv"

rule test_sqlite_import_reference:
input:
results_dir + "/sqlite_import/download_assembly.txt"

# Data Download
rule test_download_sra:
input:
expand(results_dir + "/download_sra/{biosample}/{sra_acc}_1.fastq.gz",
zip,
biosample=identify_sra_sample()["biosample"],
sra_acc=identify_sra_sample()["sra_acc"])

rule test_download_fna:
input:
expand(results_dir +"/download_assembly/{sample}.fna",
sample=identify_assembly_sample(),
)
rule test_download_ref:
input:
expand(results_dir +"/download_reference/{sample}.fna",
sample=identify_reference_sample(),
)
# Alignment
rule test_eager_sra:
input:
expand(results_dir + "/eager_sra/damageprofiler/{sra_acc}_rmdup_{biosample}/DamagePlot.pdf",
zip,
sra_acc=identify_sra_sample()["sra_acc"],
biosample=identify_sra_sample()["biosample"])

rule test_snippy_pairwise_fna:
input:
expand(results_dir + "/snippy_pairwise/{sample}/{sample}_snippy.aligned.fa",
sample=identify_assembly_sample())

# Phylogeny
rule test_iqtree:
input:
expand(results_dir + "/iqtree/iqtree.core-filter{missing_data}.treefile",
missing_data = config["snippy_missing_data"])

0 comments on commit d3a7bcf

Please sign in to comment.