Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to better tree of life #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,3 @@ jobs:

- name: Test with Sunbeam
uses: sunbeam-labs/sbx_test_action@v1

- name: Dump Logs
shell: bash
if: always()
run: tail -n +1 logs/*

- name: Dump Stats
shell: bash
if: always()
run: cat stats/*
56 changes: 32 additions & 24 deletions .tests/e2e/test_full_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,32 @@ def setup():
temp_dir = Path(tempfile.mkdtemp())

reads_fp = Path(".tests/data/reads/").resolve()
dummy_wolr_fp = temp_dir / "wolr"
dummy_wolr_fp.mkdir()
dummy_phy_fp = temp_dir / "dummy_phy"
dummy_phy_fp.touch()

project_dir = temp_dir / "project/"

sp.check_output(["sunbeam", "init", "--data_fp", reads_fp, project_dir])

config_fp = project_dir / "sunbeam_config.yml"

config_str = f"sbx_shotgun_unifrac: {{example_rule_options: '--number'}}"
config_str = f"sbx_shotgun_unifrac: {{wolr_fp: '{str(dummy_wolr_fp)}'}}"

sp.check_output(
[
"sunbeam",
"config",
"modify",
"-i",
"-s",
f"{config_str}",
f"{config_fp}",
]
)

config_str = f"sbx_shotgun_unifrac: {{tree_fp: '{str(dummy_phy_fp)}'}}"

sp.check_output(
[
Expand All @@ -45,25 +63,18 @@ def run_sunbeam(setup):
stats_fp = project_dir / "stats"

# Run the test job
try:
sp.check_output(
[
"sunbeam",
"run",
"--profile",
project_dir,
"all_template",
"--directory",
temp_dir,
]
)
except sp.CalledProcessError as e:
shutil.copytree(log_fp, "logs/")
shutil.copytree(stats_fp, "stats/")
sys.exit(e)

shutil.copytree(log_fp, "logs/")
shutil.copytree(stats_fp, "stats/")
sp.check_output(
[
"sunbeam",
"run",
"--profile",
project_dir,
"all_shotgun_unifrac",
"--directory",
temp_dir,
"-n",
]
)

output_fp = project_dir / "sunbeam_output"
benchmarks_fp = project_dir / "stats/"
Expand All @@ -74,7 +85,4 @@ def run_sunbeam(setup):
def test_full_run(run_sunbeam):
output_fp, benchmarks_fp = run_sunbeam

big_file_fp = output_fp / "qc/mush/big_file.txt"

# Check output
assert big_file_fp.exists(), f"{big_file_fp} does not exist"
assert True # Dryrun successful
4 changes: 2 additions & 2 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sbx_shotgun_unifrac:
threads: 8
green_genes_fp: ''
green_genes_version: '' # E.g. 2024.09
wolr_fp: '/mnt/isilon/microbiome/analysis/biodata/shotgun_unifrac_database/bowtie2/WoLr2'
tree_fp: '/mnt/isilon/microbiome/analysis/biodata/shotgun_unifrac_database/qiime2_from_wfl/phylogeny.qza'
2 changes: 1 addition & 1 deletion envs/sbx_shotgun_unifrac_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ dependencies:
- zstandard=0.23.0
- zstd=1.5.6
# Custom installs
- bwa
- bowtie2
- woltka
- pip:
- q2-greengenes2
Loading
Loading