From ee9e26f37bdccd71722beb6cae402d5f78405a91 Mon Sep 17 00:00:00 2001 From: Catherine Chahrour <74187550+CChahrour@users.noreply.github.com> Date: Wed, 29 May 2024 00:15:51 +0100 Subject: [PATCH 1/2] Develop (#193) * Refactor HeatmapFiles class to include make_heatmaps property in design.py * Refactor NonRNAOutput class in design.py to remove computed_field decorator * fix: correct query function to provide both the ip and control if requested * Refactor control lambda function in peak_call_chip.smk to allow null control files * Refactor query function in DesignIP class to return IPExperiment object * Refactor FastqFile model to handle resolved and absolute paths * Refactor peak_call_grouped.smk to add runtime and mem resources for lanceotron_no_input_consensus rule * feat: Refactor pileup_norm.smk to use tile instead of tiles The commit message suggests refactoring the `pileup_norm.smk` file to use the `tile` parameter instead of `tiles`. * fix typo design * fix tests fastq path * fix merge in design * fix config * reinstate snp into design * revert peaks and design * fixed typo from merge peak calls * simplify tests * update test order * correct test order * revert test order * split tests * increase cores for tests * revert single test * merge * merge develop to master --------- Co-authored-by: alsmith --- .github/workflows/test_pipelines.yml | 6 +++--- .gitignore | 1 + tests/test_pipelines.py | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_pipelines.yml b/.github/workflows/test_pipelines.yml index cd692568..3de19bfe 100755 --- a/.github/workflows/test_pipelines.yml +++ b/.github/workflows/test_pipelines.yml @@ -49,11 +49,11 @@ jobs: - name: Test design works shell: pwsh run: | - seqnado-design chip tests/data/fastq/CTCF*.fastq.gz - - name: Test with pytest + seqnado-design chip tests/data/fastq/chip-rx*.fastq.gz + - name: Test pipeline shell: pwsh run: | - pytest -vv -s --cov=./ --cov-report=xml --cores 4 + pytest -vv -s --cov=./ --cov-report=xml --cores 4 - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 with: diff --git a/.gitignore b/.gitignore index c650a40f..5281b1c2 100755 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ fastq_class_sandbox.ipynb test_rna_size_factors.ipynb tests/data/* pytestdebug.log +sps* diff --git a/tests/test_pipelines.py b/tests/test_pipelines.py index 46f7c757..7e439845 100755 --- a/tests/test_pipelines.py +++ b/tests/test_pipelines.py @@ -248,7 +248,8 @@ def user_inputs( "pileup_method": "deeptools", "scale": "no", "make_heatmaps": "no", - "call_peaks": "no", + "call_peaks": "yes", + "peak_calling_method": "lanceotron", } defaults_rna = { @@ -336,7 +337,7 @@ def config_yaml_for_testing(config_yaml, assay): if assay == "chip": config["pileup_method"] = ["deeptools", "homer"] - config["peak_calling_method"] = ["lanceotron", "macs", "homer"] + config["peak_calling_method"] = ["lanceotron"] config["library_complexity"] = False config["bowtie2"]["options"] = "--no-mixed --no-discordant" elif assay == "chip-rx": @@ -344,7 +345,7 @@ def config_yaml_for_testing(config_yaml, assay): config["peak_calling_method"] = ["seacr"] elif assay == "atac": config["call_peaks"] = True - config["peak_calling_method"] = ["macs"] + config["peak_calling_method"] = ["lanceotron", "macs", "homer"] with open(config_yaml, "w") as f: yaml.dump(config, f) From 6e46fad0b0870b4b18f9ff049acd38f124e4b1f4 Mon Sep 17 00:00:00 2001 From: Catherine Chahrour <74187550+CChahrour@users.noreply.github.com> Date: Wed, 29 May 2024 08:56:51 +0100 Subject: [PATCH 2/2] Develop (#194) * Refactor HeatmapFiles class to include make_heatmaps property in design.py * Refactor NonRNAOutput class in design.py to remove computed_field decorator * fix: correct query function to provide both the ip and control if requested * Refactor control lambda function in peak_call_chip.smk to allow null control files * Refactor query function in DesignIP class to return IPExperiment object * Refactor FastqFile model to handle resolved and absolute paths * Refactor peak_call_grouped.smk to add runtime and mem resources for lanceotron_no_input_consensus rule * feat: Refactor pileup_norm.smk to use tile instead of tiles The commit message suggests refactoring the `pileup_norm.smk` file to use the `tile` parameter instead of `tiles`. * fix typo design * fix tests fastq path * fix merge in design * fix config * reinstate snp into design * revert peaks and design * fixed typo from merge peak calls * simplify tests * update test order * correct test order * revert test order * split tests * increase cores for tests * revert single test * merge * merge develop to master --------- Co-authored-by: alsmith