From 91b1e3840961ae26e88e13875ebb102c56ceebb9 Mon Sep 17 00:00:00 2001 From: Till Hartmann Date: Mon, 1 Jul 2024 09:54:22 +0200 Subject: [PATCH] fix: switch from setup.py to pyproject toml (#526) --- .github/workflows/ci.yml | 15 +- .pre-commit-config.yaml | 4 + README.md | 25 +- docs/conf.py | 14 +- docs/installation.rst | 29 ++- environment.yml | 10 +- pyproject.toml | 232 ++++++++++++++++++ requirements.txt | 1 - requirements/base.txt | 38 --- requirements/dev.txt | 4 - requirements/test.txt | 24 -- ruff.toml | 94 ------- setup.cfg | 80 ------ setup.py | 139 ----------- snappy_pipeline/apps/impl/yaml_utils.py | 2 +- snappy_pipeline/base.py | 6 +- snappy_pipeline/find_file.py | 4 +- snappy_pipeline/models/__init__.py | 10 +- .../workflows/abstract/__init__.py | 14 +- snappy_pipeline/workflows/abstract/common.py | 2 +- .../workflows/adapter_trimming/__init__.py | 4 +- .../workflows/cbioportal_export/__init__.py | 3 +- .../workflows/common/gcnv/gcnv_run.py | 4 +- snappy_pipeline/workflows/common/melt.py | 4 +- .../__init__.py | 2 +- .../gene_expression_report/__init__.py | 4 +- .../helper_gcnv_model_targeted/__init__.py | 2 +- .../helper_gcnv_model_wgs/__init__.py | 2 +- .../workflows/hla_typing/__init__.py | 4 +- .../__init__.py | 2 +- .../igv_session_generation/__init__.py | 2 +- .../workflows/ngs_data_qc/__init__.py | 4 +- .../workflows/ngs_mapping/__init__.py | 4 +- .../workflows/panel_of_normals/__init__.py | 1 + .../workflows/repeat_expansion/__init__.py | 4 +- .../somatic_cnv_checking/__init__.py | 2 +- .../somatic_gene_fusion_calling/__init__.py | 2 +- .../somatic_hla_loh_calling/__init__.py | 4 +- .../workflows/somatic_msi_calling/__init__.py | 4 +- .../__init__.py | 4 +- .../__init__.py | 6 +- .../somatic_variant_annotation/__init__.py | 4 +- .../somatic_variant_calling/__init__.py | 4 +- .../somatic_variant_filtration/__init__.py | 4 +- .../somatic_variant_signatures/__init__.py | 4 +- .../somatic_wgs_cnv_calling/__init__.py | 6 +- .../somatic_wgs_sv_calling/__init__.py | 4 +- .../workflows/sv_calling_targeted/__init__.py | 1 + .../workflows/sv_calling_wgs/__init__.py | 3 +- .../test_workflows_wgs_sv_calling.py | 8 +- .../targeted_seq_mei_calling/__init__.py | 2 +- .../tumor_mutational_burden/__init__.py | 4 +- .../workflows/variant_annotation/__init__.py | 3 +- .../workflows/variant_calling/__init__.py | 6 +- .../workflows/variant_checking/__init__.py | 2 +- .../variant_denovo_filtration/__init__.py | 4 +- .../variant_export_external/__init__.py | 2 +- .../workflows/variant_filtration/__init__.py | 2 +- .../workflows/variant_phasing/__init__.py | 4 +- .../wgs_cnv_export_external/__init__.py | 2 +- .../wgs_sv_export_external/__init__.py | 2 +- snappy_wrappers/tools/fix_vcf.py | 2 +- snappy_wrappers/tools/gcnv_merge_vcfs.py | 4 +- snappy_wrappers/tools/ped_to_vcf_header.py | 2 +- snappy_wrappers/wrapper_parallel.py | 2 +- .../wrappers/arriba/run/wrapper.py | 3 +- snappy_wrappers/wrappers/bbduk/run/wrapper.py | 3 +- .../wrappers/bcftools/TMB/wrapper.py | 3 +- .../wrappers/bcftools/bcf_to_vcf/wrapper.py | 3 +- .../wrappers/bcftools/filter/wrapper.py | 3 +- .../wrappers/bcftools/gvcf_to_vcf/wrapper.py | 3 +- .../bcftools/heterozygous_variants/wrapper.py | 3 +- .../bcftools/merge_snv_vcf/wrapper.py | 3 +- .../wrappers/bcftools/merge_vcf/wrapper.py | 3 +- .../wrappers/bcftools/pileups/wrapper.py | 3 +- .../wrappers/bcftools/protected/wrapper.py | 3 +- .../wrappers/bcftools/regions/wrapper.py | 3 +- .../wrappers/bcftools/stats/wrapper.py | 3 +- .../bed_jaccard_operations/wrapper.py | 3 +- snappy_wrappers/wrappers/bed_venn/wrapper.py | 3 +- snappy_wrappers/wrappers/bwa/wrapper.py | 3 +- .../wrappers/canvas/germline_wgs/wrapper.py | 3 +- .../wrappers/canvas/somatic_wgs/wrapper.py | 3 +- .../cbioportal/clinical_data/wrapper.py | 1 - .../cnvetti/on_target/coverage/wrapper.py | 3 +- .../cnvetti/on_target/postprocess/wrapper.py | 3 +- .../cnvetti/on_target/segment/wrapper.py | 3 +- .../wrappers/cnvkit/access/wrapper.py | 3 +- .../wrappers/cnvkit/antitarget/wrapper.py | 3 +- .../wrappers/cnvkit/call/wrapper.py | 3 +- .../wrappers/cnvkit/coverage/wrapper.py | 3 +- .../wrappers/cnvkit/export/wrapper.py | 3 +- .../wrappers/cnvkit/fix/wrapper.py | 3 +- .../wrappers/cnvkit/plot/wrapper.py | 3 +- .../wrappers/cnvkit/postprocess/wrapper.py | 3 +- .../wrappers/cnvkit/reference/wrapper.py | 3 +- .../wrappers/cnvkit/report/wrapper.py | 3 +- .../wrappers/cnvkit/segment/wrapper.py | 3 +- .../wrappers/cnvkit/target/wrapper.py | 3 +- .../wrappers/cnvkit/wgs/wrapper.py | 3 +- .../wrappers/control_freec/wrapper.py | 3 +- .../germline_cnv/merge_genotypes/wrapper.py | 3 +- .../wrappers/delly2/somatic/call/wrapper.py | 3 +- .../wrappers/delly2/somatic/filter/wrapper.py | 3 +- .../delly2/somatic/final_vcf/wrapper.py | 3 +- .../wrappers/dkfz_bias_filter/wrapper.py | 3 +- snappy_wrappers/wrappers/eb_filter/wrapper.py | 3 +- snappy_wrappers/wrappers/epitoper/wrapper.py | 3 +- .../wrappers/expansionhunter/wrapper.py | 4 +- snappy_wrappers/wrappers/fastp/run/wrapper.py | 3 +- snappy_wrappers/wrappers/fastqc/wrapper.py | 3 +- .../wrappers/featurecounts/wrapper.py | 3 +- .../wrappers/fusioncatcher/run/wrapper.py | 3 +- snappy_wrappers/wrappers/gatk_hc/wrapper.py | 3 +- .../wrappers/gatk_hc_par/wrapper.py | 3 +- .../gatk_phase_by_transmission/wrapper.py | 3 +- .../gatk_read_backed_phasing/wrapper.py | 3 +- snappy_wrappers/wrappers/gatk_ug/wrapper.py | 3 +- .../wrappers/hera/quant/wrapper.py | 3 +- .../wrappers/hts_screen/wrapper.py | 4 +- snappy_wrappers/wrappers/jaffa/run/wrapper.py | 3 +- .../jannovar/annotate_somatic_vcf/wrapper.py | 3 +- .../wrappers/jannovar/annotate_vcf/wrapper.py | 3 +- .../wrappers/link_in_bam/wrapper.py | 3 +- snappy_wrappers/wrappers/lohhla/wrapper.py | 3 +- .../wrappers/manta/somatic_wgs/wrapper.py | 3 +- .../mantis/mantis_msi2/run/wrapper.py | 3 +- snappy_wrappers/wrappers/mbcs/wrapper.py | 3 +- .../wrappers/melt/reorder_vcf/wrapper.py | 3 +- .../wrappers/minialign/run/wrapper.py | 3 +- .../wrappers/mutect2/contamination/wrapper.py | 3 +- .../wrappers/mutect2/create_panel/wrapper.py | 3 +- .../wrappers/mutect2/filter/wrapper.py | 3 +- .../wrappers/mutect2/pileup/wrapper.py | 3 +- .../wrappers/mutect2/prepare_panel/wrapper.py | 3 +- .../wrappers/mutect2/run/wrapper.py | 3 +- .../prepare_panel/parallel_prepare_panel.py | 2 +- .../mutect2_par/run/parallel_mutect2.py | 2 +- .../wrappers/oncotator/run/wrapper.py | 3 +- snappy_wrappers/wrappers/optitype/wrapper.py | 3 +- .../pb_honey_spots/germline/wrapper.py | 3 +- .../wrappers/picard/metrics/wrapper.py | 3 +- .../wrappers/picard/prepare/wrapper.py | 3 +- .../wrappers/pizzly/run/wrapper.py | 3 +- .../wrappers/platypus/call_joint/wrapper.py | 3 +- .../wrappers/purecn/coverage/wrapper.py | 3 +- .../wrappers/purecn/create_panel/wrapper.py | 3 +- .../wrappers/purecn/prepare/wrapper.py | 3 +- .../wrappers/purecn/run/wrapper.py | 3 +- snappy_wrappers/wrappers/r/wrapper.py | 3 +- .../wrappers/rnaqc/duplication/wrapper.py | 3 +- .../wrappers/rnaqc/dupradar/wrapper.py | 3 +- .../wrappers/rnaqc/rnaseqc/wrapper.py | 3 +- .../wrappers/rnaqc/stats/wrapper.py | 3 +- snappy_wrappers/wrappers/rnaqc/wrapper.py | 3 +- snappy_wrappers/wrappers/rseqc/wrapper.py | 3 +- snappy_wrappers/wrappers/salmon/wrapper.py | 3 +- .../samtools/bam_qc_report/wrapper.py | 3 +- .../wrappers/scalpel/somatic/wrapper.py | 3 +- .../wrappers/scarHRD/run/wrapper.py | 3 +- .../wrappers/sequenza/coverage/wrapper.py | 3 +- .../wrappers/sequenza/gcreference/wrapper.py | 3 +- .../wrappers/sequenza/report/wrapper.py | 3 +- .../wrappers/sequenza/run/wrapper.py | 3 +- .../signatures/deconstruct_sigs/wrapper.py | 3 +- .../signatures/tabulate_vcf/wrapper.py | 3 +- .../wrappers/singularity/wrapper.py | 3 +- .../wrappers/sniffles/germline/wrapper.py | 3 +- .../wrappers/snpeff/somatic/wrapper.py | 3 +- .../apply_all_filters/wrapper.py | 3 +- .../apply_filters/wrapper.py | 3 +- .../filter_to_exons/wrapper.py | 3 +- .../wrappers/strelka2/somatic/wrapper.py | 3 +- .../collect_msdn/wrapper.py | 3 +- .../filter_frequency/wrapper.py | 3 +- .../filter_het_comp/wrapper.py | 3 +- .../filter_inheritance/wrapper.py | 3 +- .../filter_quality/wrapper.py | 3 +- .../filter_regions/wrapper.py | 3 +- .../filter_scores/wrapper.py | 3 +- .../summarize_counts/wrapper.py | 3 +- .../wrappers/varscan/call_joint/wrapper.py | 3 +- .../wrappers/vcf2maf/vcf2maf/wrapper.py | 3 +- .../vcf2maf/vcf_to_table/functions.py | 4 +- .../wrappers/vcf2maf/vcf_to_table/parser.py | 6 +- .../vcf2maf/vcf_to_table/vcf_to_table.py | 6 +- .../wrappers/vcf2maf/vcf_to_table/wrapper.py | 3 +- .../wrappers/vcf_sv_filter/vcf_sv_filter.py | 6 +- snappy_wrappers/wrappers/vep/run/wrapper.py | 3 +- .../filter_inheritance/wrapper.py | 3 +- .../filter_quality/wrapper.py | 3 +- .../filter_regions/wrapper.py | 4 +- .../filter_inheritance/wrapper.py | 3 +- .../filter_quality/wrapper.py | 3 +- .../filter_regions/wrapper.py | 4 +- .../filter_inheritance/wrapper.py | 3 +- .../filter_quality/wrapper.py | 3 +- .../filter_regions/wrapper.py | 4 +- .../apps/test_impl_yaml_utils.py | 1 + .../snappy_pipeline/apps/test_snappy_snake.py | 2 +- tests/snappy_pipeline/test_find_file.py | 2 +- tests/snappy_pipeline/workflows/conftest.py | 10 +- .../test_annotate_expansionhunter.py | 2 +- .../workflows/test_workflows_abstract.py | 15 +- .../workflows/test_workflows_ngs_mapping.py | 6 +- ...t_workflows_ngs_mapping_processed_fastq.py | 24 +- .../test_workflows_panel_of_normals.py | 4 +- .../test_workflows_somatic_cnv_checking.py | 1 - ...orkflows_somatic_purity_ploidy_estimate.py | 7 +- ...kflows_somatic_targeted_seq_cnv_calling.py | 3 +- .../test_workflows_somatic_wgs_cnv_calling.py | 3 +- .../test_workflows_somatic_wgs_sv_calling.py | 1 - .../test_workflows_variant_calling.py | 2 +- ...novo_filtration_from_variant_annotation.py | 3 +- ..._denovo_filtration_from_variant_calling.py | 3 +- ..._denovo_filtration_from_variant_phasing.py | 3 +- .../test_workflows_variant_export_external.py | 5 +- .../test_workflows_variant_filtration.py | 2 +- .../test_workflows_variant_phasing.py | 1 - .../test_workflows_wgs_cnv_export_external.py | 6 +- .../test_workflows_wgs_sv_export_external.py | 5 +- tests/snappy_wrappers/tools/conftest.py | 2 +- .../tools/test_bed_filter_jaccard.py | 1 - .../tools/test_ped_to_vcf_header.py | 2 +- .../tools/test_vcf_first_header.py | 2 +- tests/snappy_wrappers/wrappers/conftest.py | 6 +- .../wrappers/test_eb_filter_par.py | 3 +- .../wrappers/test_gatk_hc_par_run.py | 3 +- .../test_gatk_read_backed_phasing_par.py | 3 +- .../wrappers/test_gatk_ug_par.py | 3 +- .../test_jannovar_par_annotate_somatic_vcf.py | 3 +- .../test_jannovar_par_annotate_vcf.py | 3 +- .../test_mutect2_par_prepare_panel.py | 3 +- .../wrappers/test_mutect2_par_run.py | 3 +- .../wrappers/test_mutect_par_run.py | 3 +- .../wrappers/test_varscan_par_call_joint.py | 3 +- 236 files changed, 596 insertions(+), 864 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 requirements/base.txt delete mode 100644 requirements/dev.txt delete mode 100644 requirements/test.txt delete mode 100644 ruff.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 797b81a81..1e5fe3dd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: - name: Install dependencies run: | - pip install -r requirements/test.txt + pip install -e ".[dev]" pip freeze - name: Run linting tools @@ -52,17 +52,16 @@ jobs: sphinx-docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Install Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: "3.12" - name: Install dependencies run: | - pip install -r requirements/base.txt -r requirements/test.txt - pip install -e . + pip install -e ".[docs]" pip freeze - name: Build documentation @@ -76,8 +75,6 @@ jobs: matrix: python-version: - "3.12" - # - "3.11" # no compatible pysam yet - # - "3.12" # no compatible pysam yet needs: linting steps: - name: Install Python via conda @@ -86,7 +83,7 @@ jobs: python-version: ${{ matrix.python-version }} conda-channels: defaults,bioconda,conda-forge - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: lfs: true fetch-depth: 2 @@ -107,7 +104,7 @@ jobs: bcftools version - name: Install some more dependencies via pip # Workaround - see https://github.com/pytest-dev/pytest/issues/10420#issuecomment-1290697849 - run: pip install -r requirements/test.txt; pip install --ignore-installed py + run: pip install ".[test]"; pip install --ignore-installed py - name: Run tests run: pytest env: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc3b9db20..881a63f80 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,3 +6,7 @@ repos: - id: ruff args: [ --fix ] - id: ruff-format + - repo: https://github.com/snakemake/snakefmt + rev: v0.8.5 # https://github.com/snakemake/snakefmt/releases + hooks: + - id: snakefmt diff --git a/README.md b/README.md index 9cf115321..cb4c51859 100644 --- a/README.md +++ b/README.md @@ -20,32 +20,19 @@ cd snappy-pipeline # WARNING- make sure that you are in your conda base environment -# Create conda environment "snappy_env" with the minimal requirements: -mamba env create --file environment.yml +# Create conda environment "snappy_env" with all requirements: +mamba env create --file environment.yml -n snappy_env conda activate snappy_env -# Add testing & development requirements: -pip install -r requirements/test.txt -pip install -r requirements/dev.txt - -# Optionally add "pytest-pdb" missing from anaconda -pip install pytest-pdb - # Install snappy in snappy_env environment -pip install -e . +pip install -e ".[all]" ``` - -**Note:** To create the environment under another name, replace the commands for the environment creation & activation of the correct environment by: - -``` -mamba env create --file environment.yml --name -conda activate -``` - +The dependency group `all` includes all optional dependencies, i.e. `test` (for running tests with `pytest`), `dev` (for formatting, linting, pre-commit hooks) and `docs` (for building the documentation with `sphinx`). +If you only want to install the core dependencies, you can omit the `[all]` part, or choose any combination of the other groups. See [user installation](docs/quickstart.rst) if you just want to use the pipeline. -See [developer installation)[docs/installation.rst) for getting started with working on the pipeline code and also building the documentation. +See [developer installation](docs/installation.rst) for getting started with working on the pipeline code and also building the documentation. ## Using GATK3 diff --git a/docs/conf.py b/docs/conf.py index c349356e5..0da2e3a9b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,12 +6,13 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = 'snappy-pipeline' +project = "snappy-pipeline" copyright = "2015-2024, CUBI, Berlin Institute of Health" -author = 'CUBI, Berlin Institute of Health' +author = "CUBI, Berlin Institute of Health" # Get the project root dir, which is the parent dir of this import os, sys + cwd = os.getcwd() project_root = os.path.dirname(cwd) @@ -21,6 +22,7 @@ sys.path.insert(0, project_root) import snappy_pipeline + # The short X.Y version. version = snappy_pipeline.__version__ # The full version, including alpha/beta/rc tags. @@ -35,8 +37,8 @@ "sphinx_mdinclude", ] -templates_path = ['_templates'] -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', "step/DEFAULT_CONFIG_*.rst"] +templates_path = ["_templates"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "step/DEFAULT_CONFIG_*.rst"] source_suffix = ".rst" master_doc = "index" @@ -73,8 +75,8 @@ # html_theme = 'alabaster' pygments_style = "sphinx" -html_theme = 'sphinx_rtd_theme' -html_static_path = ['_static'] +html_theme = "sphinx_rtd_theme" +html_static_path = ["_static"] # Output file base name for HTML help builder. htmlhelp_basename = "snappy_pipelinedoc" html_last_updated_fmt = "%b %d, %Y" diff --git a/docs/installation.rst b/docs/installation.rst index 595d1535d..a0c6d5c05 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -37,26 +37,39 @@ You can of course clone the code anywhere you like. $ cd ~/Development/pipeline_dev $ git clone git@github.com:bihealth/snappy-pipeline.git $ cd snappy_pipeline - $ pip install -e . - $ pip install -r requirements/dev.txt + $ conda env create -n snappy_dev --file environment.yaml + $ conda activate snappy_dev + $ pip install -e ".[all]" -It's also a good idea to install some packages required for testing through conda: + +Installing pre-commit-hooks +=========================== +To make it easier to follow the coding style, we use `pre-commit `_ hooks. +These hooks will run the style checks before you commit your changes and will automatically fix some issues. + +First, install the pre-commit package (if not already installed, part of the optional dependency group ``dev``): + +.. code-block:: shell + + $ conda install pre-commit # or pip install pre-commit + +Then, install the pre-commit hooks: .. code-block:: shell - $ conda env update --name root --file environment.yaml + $ pre-commit install -(If you do not do this, please make sure that you have git-lfs in your PATH through other means) +The next time you commit changes, the pre-commit hooks will run automatically. Running the Tests ================= -To run the tests, you need to add the packages in ``requirements/test.txt``. +To run the tests, simply invoke ``pytest`` (part of the optional dependency group ``test``): .. code-block:: shell $ cd ~/Development/pipeline_dev - $ py.test + $ pytest Running the Style Checks ======================== @@ -64,7 +77,7 @@ Running the Style Checks .. code-block:: shell $ cd ~/Development/pipeline_dev - $ flake8 + $ make lint Developer Documentation ======================= diff --git a/environment.yml b/environment.yml index 81f3fa259..78bb9c87c 100644 --- a/environment.yml +++ b/environment.yml @@ -47,15 +47,17 @@ dependencies: - pytest-mock ~=3.14.0 - pytest-subprocess ~=1.5.0 - pyfakefs ~=5.5.0 - - ruff ~=0.4.8 - - snakefmt ~=0.8.0 + - pytest-sugar ~=0.9.6 - coveralls ~=4.0.1 + # formatting, linting, dev + - ruff ~=0.4.8 + - snakefmt ~=0.8.5 + - pre-commit ~=3.7.1 + # docs - sphinx ~=7.3.7 - sphinx_rtd_theme ~=2.0.0 - sphinx-mdinclude ~=0.6.0 - # misc packages - - pytest-sugar ~=0.9.6 - pip: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..3643a572d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,232 @@ +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + + +[project] +name = "snappy-pipeline" +authors = [ + { name = "Manuel Holtgrewe", email = "manuel.holtgrewe@bih-charite.de" }, +] +description = "SNAPPY Nucleic Acid Processing in Python (by CUBI)" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["bioinformatics"] +license = { text = "MIT license" } +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.12", +] +dynamic = ["version"] +dependencies = [ + "setuptools ~=68.1.2", + # Nice, round-trip enabled YAML parsing + "ruamel.yaml ~=0.18.6", + # File-based locks + "fasteners ~=0.17.3", + # We're trying to keep the PyPi package up to date, you might have to install + # from source, though. + "biomedsheets @ git+https://github.com/bihealth/biomedsheets.git@4e0a8484850c39d1511036c3fe29ec0b4f9271f8", + # Helpful for CLIs + "termcolor ~=1.1.0", + # Snakemake is used for providing the actual wrapper calling functionality + "snakemake ~=7.32.0", + # Required for plotting + "matplotlib ~=3.8.4", + # Library for working with VCF files. + "vcfpy ~=0.13.8", + # Support for vcfpy + "pysam ~=0.22.1", + "pytabix ~=0.1", + # Jinja 2 template rendering + "jinja2 ~=3.1.4", + # Parsing of ISA-tab. + "altamisa @ git+https://github.com/bihealth/altamisa.git@817dc491ff819e4c80686082bf3e5f602f1ac14c", + # REST API client for VarFish Server + "varfish-cli ~=0.6.3", + # Validation for models, mainly used for configuration validation + "pydantic ~=2.7.0" +] + +[project.urls] +Repository = "https://github.com/bihealth/snappy-pipeline" +Documentation = "https://snappy-pipeline.readthedocs.io/en/latest/" +Issues = "https://github.com/bihealth/snappy-pipeline/issues" +Changelog = "https://github.com/bihealth/snappy-pipeline/blob/main/CHANGELOG.md" + +[project.optional-dependencies] +test = [ + "pytest ~=8.2.2", + "coverage ~=7.5.3", + "pytest-cov ~=5.0.0", + "pytest-mock ~=3.14.0", + "pytest-subprocess ~=1.5.0", + # Fake file system for testing + "pyfakefs ~=5.5.0", + "pytest-sugar ~=0.9.6", + # coveralls.io tooling + "coveralls ~=4.0.1", +] +dev = [ + # ruff code linter + formatter + "ruff ~=0.4.8", + # "snakefmt" code formatter and checker. + "snakefmt ~=0.8.5", + "pre-commit ~=3.7.1" +] +docs = [ + "sphinx ~=7.3.7", + "sphinx_rtd_theme ~=2.0.0", + "sphinx-mdinclude ~=0.6.0", +] +all = [ + "snappy-pipeline[test,docs,dev]" +] + +[project.scripts] +snappy-pull-sheet = "snappy_pipeline.apps.snappy_pull_sheet:main" +snappy-snake = "snappy_pipeline.apps.snappy_snake:main" +snappy-start-project = "snappy_pipeline.apps.snappy_start_project:main" +snappy-start-step = "snappy_pipeline.apps.snappy_start_step:main" +snappy-refresh-step = "snappy_pipeline.apps.snappy_refresh_step:main" +snappy-slurm-status = "snappy_pipeline.apps.snappy_slurm_status:main" +# additional tools +snappy-bed_filter_jaccard = "snappy_wrappers.tools.bed_filter_jaccard:main" +snappy-fix_vcf = "snappy_wrappers.tools.fix_vcf:main" +snappy-genome_windows = "snappy_wrappers.tools.genome_windows:main" +snappy-quickvenn = "snappy_wrappers.tools.quickvenn:main" +snappy-vcf_first_header = "snappy_wrappers.tools.vcf_first_header:main" +snappy-vcf_filter_denovo = "snappy_wrappers.tools.vcf_filter_denovo:main" +snappy-vcf_filter_from_info = "snappy_wrappers.tools.vcf_filter_from_info:main" +snappy-vcf_filter_to_info = "snappy_wrappers.tools.vcf_filter_to_info:main" +snappy-ped_to_vcf_header = "snappy_wrappers.tools.ped_to_vcf_header:main" + + +[tool.setuptools] +packages = ["snappy_pipeline", "snappy_wrappers"] +# bash scripts +script-files = [ + "scripts/snappy-vcf_sort", + "scripts/snappy-vcf_split" +] + +[tool.setuptools.dynamic] +version = {attr = "snappy_pipeline.version.__version__"} + + +[tool.coverage.run] +omit = ["snappy_pipeline/_version.py", "snappy_wrappers/wrappers/*/wrapper.p"] +relative_files = true + +[tool.coverage.report] +exclude_lines = ["pragma: no cover", "def __repr__", "if __name__ == '__main__':"] + + +[tool.ruff] +# Exclude a variety of commonly ignored directories. +exclude = [ + ".bzr", + ".direnv", + ".eggs", + ".git", + ".git-rewrite", + ".hg", + ".ipynb_checkpoints", + ".mypy_cache", + ".nox", + ".pants.d", + ".pyenv", + ".pytest_cache", + ".pytype", + ".ruff_cache", + ".svn", + ".tox", + ".venv", + ".vscode", + "__pypackages__", + "_build", + "buck-out", + "build", + "dist", + "node_modules", + "site-packages", + "venv", + "docs", + "tests", + ".*.py", + ".snakemake.*.wrapper.py", + "splitMNPsAndComplex.py", + "wrapper.py", + "snappy_pipeline/__init__.py", + ".tests", +] + +line-length = 100 +indent-width = 4 +target-version = "py312" + +[tool.ruff.lint] +select = ["E", "F", "W", "B9"] # enable "B", "C" later +ignore = ["E203", "E266", "E501", "B904", "B905", "E713", "E721", "E741"] + +# Allow fix for all enabled rules (when `--fix`) is provided. +fixable = ["ALL"] +unfixable = [] + +# Allow unused variables when underscore-prefixed. +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" + +[tool.ruff.lint.per-file-ignores] +"tests/**/*.py" = ["E501"] +"snappy_wrappers/tools/gcnv_merge_vcfs.py" = ["E721"] +"docs/conf.py" = ["ALL"] + +[tool.ruff.lint.flake8-quotes] +docstring-quotes = "double" + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +# Like Black, respect magic trailing commas. +skip-magic-trailing-comma = false +line-ending = "auto" + +# Enable auto-formatting of code examples in docstrings. Markdown, +# reStructuredText code/literal blocks and doctests are all supported. +# +# This is currently disabled by default, but it is planned for this +# to be opt-out in the future. +docstring-code-format = false + +# Set the line length limit used when formatting code snippets in +# docstrings. +# +# This only has an effect when the `docstring-code-format` setting is +# enabled. +docstring-code-line-length = "dynamic" + + +[tool.snakefmt] +line_length = 100 +include = "\\.smk$|\\.rules$|^Snakefile" + + +[tool.pytest.ini_options] +minversion = "6.0" +addopts = "--cov=snappy_pipeline --cov-report=xml" +testpaths = [ + "tests", +] +norecursedirs = [ + "docs", + "*.egg-info", + ".git" +] +filterwarnings = [ + "error", + "ignore::DeprecationWarning", +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 5603c3777..000000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ --r requirements/base.txt diff --git a/requirements/base.txt b/requirements/base.txt deleted file mode 100644 index f38ca2cc1..000000000 --- a/requirements/base.txt +++ /dev/null @@ -1,38 +0,0 @@ -setuptools ~=68.1.2 - -# Nice, round-trip enabled YAML parsing -ruamel.yaml ~=0.18.6 - -# File-based locks -fasteners ~=0.17.3 - -# We're trying to keep the PyPi package up to date, you might have to install -# from source, though. -biomedsheets @ git+https://github.com/bihealth/biomedsheets.git@4e0a8484850c39d1511036c3fe29ec0b4f9271f8 - -# Helpful for CLIs -termcolor ~=1.1.0 - -# Snakemake is used for providing the actual wrapper calling functionality -snakemake ~=7.32.0 - -# Required for plotting -matplotlib ~=3.8.4 - -# Library for working with VCF files. -vcfpy ~=0.13.8 -# Support for vcfpy -pysam ~=0.22.1 -pytabix ~=0.1 - -# Jinja 2 template rendering -jinja2 ~=3.1.4 - -# Parsing of ISA-tab. -altamisa @ git+https://github.com/bihealth/altamisa.git@817dc491ff819e4c80686082bf3e5f602f1ac14c - -# REST API client for VarFish Server -varfish-cli ~=0.6.3 - -# Validation for models, mainly used for configuration validation -pydantic ~=2.7.0 diff --git a/requirements/dev.txt b/requirements/dev.txt deleted file mode 100644 index ad3df8fdb..000000000 --- a/requirements/dev.txt +++ /dev/null @@ -1,4 +0,0 @@ --r test.txt - -# Prettier CLI for py.test -pytest-sugar ~=0.9.6 diff --git a/requirements/test.txt b/requirements/test.txt deleted file mode 100644 index 0343a7581..000000000 --- a/requirements/test.txt +++ /dev/null @@ -1,24 +0,0 @@ --r base.txt - -# Wonderful py.test library, style checker etc. -pytest ~=8.2.2 -coverage ~=7.5.3 -pytest-cov ~=5.0.0 -pytest-mock ~=3.14.0 -pytest-subprocess ~=1.5.0 - -# Fake file system for testing -pyfakefs ~=5.5.0 - -# ruff code linter + formatter -ruff ~=0.4.8 -# "snakefmt" code formatter and checker. -snakefmt ~=0.8.0 - -# coveralls.io tooling -coveralls ~=4.0.1 - -# Sphinx -sphinx ~=7.3.7 -sphinx_rtd_theme ~=2.0.0 -sphinx-mdinclude ~=0.6.0 diff --git a/ruff.toml b/ruff.toml deleted file mode 100644 index 724dbc320..000000000 --- a/ruff.toml +++ /dev/null @@ -1,94 +0,0 @@ -# Exclude a variety of commonly ignored directories. -exclude = [ - ".bzr", - ".direnv", - ".eggs", - ".git", - ".git-rewrite", - ".hg", - ".ipynb_checkpoints", - ".mypy_cache", - ".nox", - ".pants.d", - ".pyenv", - ".pytest_cache", - ".pytype", - ".ruff_cache", - ".svn", - ".tox", - ".venv", - ".vscode", - "__pypackages__", - "_build", - "buck-out", - "build", - "dist", - "node_modules", - "site-packages", - "venv", - "docs", - "tests", - ".*.py", - ".snakemake.*.wrapper.py", - "splitMNPsAndComplex.py", - "wrapper.py", - "snappy_pipeline/__init__.py", - "versioneer.py", - ".tests", -] - - -line-length = 100 -indent-width = 4 - -# Assume Python 3.8 -target-version = "py312" - - -[lint] -select = ["E", "F", "W", "B9"] # enable "B", "C" later -ignore = ["E203", "E266", "E501", "B904", "B905", "E713", "E721", "E741"] - -# Allow fix for all enabled rules (when `--fix`) is provided. -fixable = ["ALL"] -unfixable = [] - -# Allow unused variables when underscore-prefixed. -dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" - -[lint.per-file-ignores] -"tests/**/*.py" = ["E501"] -"docs/conf.py" = ["ALL"] - -[lint.flake8-quotes] -docstring-quotes = "double" - - -[format] -# Like Black, use double quotes for strings. -quote-style = "double" - -# Like Black, indent with spaces, rather than tabs. -indent-style = "space" - -# Like Black, respect magic trailing commas. -skip-magic-trailing-comma = false - -# Like Black, automatically detect the appropriate line ending. -line-ending = "auto" - -# Enable auto-formatting of code examples in docstrings. Markdown, -# reStructuredText code/literal blocks and doctests are all supported. -# -# This is currently disabled by default, but it is planned for this -# to be opt-out in the future. -docstring-code-format = false - -# Set the line length limit used when formatting code snippets in -# docstrings. -# -# This only has an effect when the `docstring-code-format` setting is -# enabled. -docstring-code-line-length = "dynamic" - - diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 82eda8355..000000000 --- a/setup.cfg +++ /dev/null @@ -1,80 +0,0 @@ -# Package Building ---------------------------------------------------------- - -[bdist_wheel] -universal = 1 - -[wheel] -universal = 1 - -# Style Checking and Linting ------------------------------------------------ -[isort] -profile = "black" -multi_line_output = 3 -include_trailing_comma = True -force_grid_wrap = 0 -use_parentheses = True -ensure_newline_before_comments = True -line_length = 100 -skip_glob = .tests - -[flake8] -exclude = - docs - tests - venv - .*.py - .snakemake.*.wrapper.py - splitMNPsAndComplex.py - wrapper.py - snappy_pipeline/__init__.py - .tests -max-complexity = 18 -select = B,C,E,F,W,T4,B9 -ignore = E203, E266, E501, W503 -max-line-length = 100 -per-file-ignore = - tests/**/*.py: E501 - docs/conf.py: ALL -application_import_names = snappy_pipeline -import-order-style = google - -[pylint] -max-line-length = 100 - -[pycodestyle] -max_line_length = 100 - -[pylama:pycodestyle] -max_line_length = 100 - -# Configuration for py.test ------------------------------------------------- - -[tool:pytest] -addopts = --cov=snappy_pipeline --cov-report=xml -norecursedirs = - docs - *.egg-info - .git -testpaths = tests -filterwarnings = - error - ignore::DeprecationWarning - -# Code Coverage ------------------------------------------------------------- - -[coverage:run] -omit = - snappy_pipeline/_version.py - # The wrappers are copied before execution - snappy_wrappers/wrappers/*/wrapper.py -relative_files = True - -[coverage:report] -exclude_lines = - # Re-enable standard pragma - pragma: no cover - # Ignore repr() builtin definition, mostly useful for debug code anway - def __repr__ - # Ignore the __main__ entry points - if __name__ == '__main__': - diff --git a/setup.py b/setup.py deleted file mode 100644 index e6fa48f43..000000000 --- a/setup.py +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -"""Installation driver (and development utility entry point) for snappy-pipeline""" - -import os -import sys -from itertools import chain - -from setuptools import find_packages, setup - -__author__ = "Manuel Holtgrewe " - - -def parse_requirements(path): - """Parse ``requirements.txt`` at ``path``.""" - requirements = [] - with open(path, "rt") as reqs_f: - for line in reqs_f: - line = line.strip() - if line.startswith("-r"): - fname = line.split()[1] - inner_path = os.path.join(os.path.dirname(path), fname) - requirements += parse_requirements(inner_path) - elif line != "" and not line.startswith("#"): - requirements.append(line) - return requirements - - -# Enforce python version >=3.12 -if sys.version_info < (3, 12): - print("At least Python 3.12 is required.\n", file=sys.stderr) - sys.exit(1) - -with open("README.md") as readme_file: - readme = readme_file.read() - -with open("CHANGELOG.md") as history_file: - history = history_file.read() - -# Get requirements -requirements = parse_requirements("requirements/base.txt") - -test_requirements = [ - # TODO: put package test requirements here -] - - -# Name of the tools -TOOLS = ( - "bed_filter_jaccard", - "bam_cov_stats", - "fix_vcf", - "genome_windows", - "quickvenn", - "vcf_first_header", - "vcf_filter_denovo", - "vcf_filter_from_info", - "vcf_filter_to_info", - "ped_to_vcf_header", -) - -# Name of the scripts -SCRIPTS = ("snappy-vcf_sort", "snappy-vcf_split") - - -def console_scripts_entry_points(names, module): - """Yield entries for the 'console_scripts' entry points""" - prefix = "snappy" - for name in names: - if module == "wrappers": - yield "{prefix}-{name} = snappy_wrappers.{module}.{name}.__main__:main".format( - prefix=prefix, name=name, module=module - ) - elif module == "tools": - yield "{prefix}-{name} = snappy_wrappers.{module}.{name}:main".format( - prefix=prefix, name=name, module=module - ) - - -def bash_scripts(names): - """Return generator with bash scripts of the given ``names``""" - return (os.path.join("scripts", name) for name in names) - - -package_root = os.path.abspath(os.path.dirname(__file__)) - -version = {} -with open(os.path.join(package_root, "snappy_pipeline/version.py")) as fp: - exec(fp.read(), version) -version = version["__version__"] - -setup( - name="snappy-pipeline", - version=version, - description="SNAPPY Nucleic Acid Processing in Python (by CUBI)", - long_description=readme + "\n\n" + history, - long_description_content_type="text/markdown", - author="Manuel Holtgrewe", - author_email="manuel.holtgrewe@bih-charite.de", - url="https://github.com/bihealth/snappy-pipeline", - packages=find_packages(), - package_dir={"snappy_wrappers": "snappy_wrappers", "snappy_pipeline": "snappy_pipeline"}, - entry_points={ - "console_scripts": list( - chain( - ( - "snappy-pull-sheet = snappy_pipeline.apps.snappy_pull_sheet:main", - "snappy-snake = snappy_pipeline.apps.snappy_snake:main", - "snappy-start-project = snappy_pipeline.apps.snappy_start_project:main", - "snappy-start-step = snappy_pipeline.apps.snappy_start_step:main", - "snappy-refresh-step = snappy_pipeline.apps.snappy_refresh_step:main", - "snappy-slurm-status = snappy_pipeline.apps.snappy_slurm_status:main", - ), - console_scripts_entry_points(TOOLS, "tools"), - ) - ) - }, - scripts=tuple(bash_scripts(SCRIPTS)), - include_package_data=True, - install_requires=requirements, - license="MIT license", - zip_safe=False, - keywords="bioinformatics", - classifiers=[ - "Development Status :: 2 - Pre-Alpha", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.12", - # We are missing bioconda pysam packages for 3.11 and 3.12, cf. - # https://github.com/bioconda/bioconda-recipes/issues/37805 - # "Programming Language :: Python :: 3.11", - # "Programming Language :: Python :: 3.12", - # … but we can build pysam from pip instead - ], - test_suite="tests", - tests_require=test_requirements, -) diff --git a/snappy_pipeline/apps/impl/yaml_utils.py b/snappy_pipeline/apps/impl/yaml_utils.py index 0f86027ce..03ca70d44 100644 --- a/snappy_pipeline/apps/impl/yaml_utils.py +++ b/snappy_pipeline/apps/impl/yaml_utils.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- """Utilities for processing YAML configuration""" -from collections.abc import MutableMapping, MutableSequence import re +from collections.abc import MutableMapping, MutableSequence from ruamel.yaml.comments import CommentedMap, CommentedSeq diff --git a/snappy_pipeline/base.py b/snappy_pipeline/base.py index f8d43e385..fa5df4b88 100644 --- a/snappy_pipeline/base.py +++ b/snappy_pipeline/base.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- """Basic utility code for snappy_pipeline""" +import os +import sys +import warnings from collections import OrderedDict from collections.abc import MutableMapping from copy import deepcopy -import os -import sys from typing import TYPE_CHECKING, Any, AnyStr, Dict -import warnings import ruamel.yaml as ruamel_yaml diff --git a/snappy_pipeline/find_file.py b/snappy_pipeline/find_file.py index 9fbf8091e..86a59d70e 100644 --- a/snappy_pipeline/find_file.py +++ b/snappy_pipeline/find_file.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- """Code for crawling the file system and caching the results""" -from collections import OrderedDict -from fnmatch import fnmatch import json import logging import os import sys +from collections import OrderedDict +from fnmatch import fnmatch from fasteners import InterProcessLock diff --git a/snappy_pipeline/models/__init__.py b/snappy_pipeline/models/__init__.py index f547f056c..282a05ab9 100644 --- a/snappy_pipeline/models/__init__.py +++ b/snappy_pipeline/models/__init__.py @@ -1,19 +1,19 @@ import enum -from enum import Enum -from inspect import isclass -from io import StringIO import json import re import types import typing +from enum import Enum +from inspect import isclass +from io import StringIO from typing import Annotated +import ruamel +import typing_extensions from annotated_types import Predicate from pydantic import BaseModel, ConfigDict, Field from pydantic_core import PydanticUndefined -import ruamel from ruamel.yaml import YAML -import typing_extensions def enum_options(enum: Enum) -> list[tuple[str, typing.Any]]: diff --git a/snappy_pipeline/workflows/abstract/__init__.py b/snappy_pipeline/workflows/abstract/__init__.py index 9aa20e058..6e1e66367 100644 --- a/snappy_pipeline/workflows/abstract/__init__.py +++ b/snappy_pipeline/workflows/abstract/__init__.py @@ -1,27 +1,25 @@ # -*- coding: utf-8 -*- """Base classes for the actual pipeline steps""" -from collections import OrderedDict -from collections.abc import MutableMapping import contextlib import datetime -from fnmatch import fnmatch -from functools import lru_cache -from io import StringIO import logging import os import os.path import sys import tempfile import typing +from collections import OrderedDict +from collections.abc import MutableMapping +from fnmatch import fnmatch +from functools import lru_cache +from io import StringIO from typing import Any, Callable import attr import pydantic import ruamel.yaml as ruamel_yaml import snakemake -from snakemake.io import InputFiles, OutputFiles, Wildcards, touch - from biomedsheets import io_tsv from biomedsheets.io import SheetBuilder, json_loads_ordered from biomedsheets.models import SecondaryIDNotFoundException @@ -33,6 +31,8 @@ write_pedigree_to_ped, write_pedigrees_to_ped, ) +from snakemake.io import InputFiles, OutputFiles, Wildcards, touch + from snappy_pipeline.base import ( MissingConfiguration, UnsupportedActionException, diff --git a/snappy_pipeline/workflows/abstract/common.py b/snappy_pipeline/workflows/abstract/common.py index 4ac10a886..bd6b719a0 100644 --- a/snappy_pipeline/workflows/abstract/common.py +++ b/snappy_pipeline/workflows/abstract/common.py @@ -1,8 +1,8 @@ """Commonly used code and types""" -from itertools import chain import re import typing +from itertools import chain from snakemake.io import Wildcards diff --git a/snappy_pipeline/workflows/adapter_trimming/__init__.py b/snappy_pipeline/workflows/adapter_trimming/__init__.py index 465ac3fe0..c17a43b71 100644 --- a/snappy_pipeline/workflows/adapter_trimming/__init__.py +++ b/snappy_pipeline/workflows/adapter_trimming/__init__.py @@ -136,12 +136,12 @@ """ -from collections import OrderedDict import os +from collections import OrderedDict +from biomedsheets.shortcuts import GenericSampleSheet from snakemake.io import expand -from biomedsheets.shortcuts import GenericSampleSheet from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/cbioportal_export/__init__.py b/snappy_pipeline/workflows/cbioportal_export/__init__.py index cccbca3b5..292b05b30 100644 --- a/snappy_pipeline/workflows/cbioportal_export/__init__.py +++ b/snappy_pipeline/workflows/cbioportal_export/__init__.py @@ -7,11 +7,12 @@ files. """ -from collections import OrderedDict import os import sys +from collections import OrderedDict from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background + from snappy_pipeline.base import MissingConfiguration from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, ResourceUsage diff --git a/snappy_pipeline/workflows/common/gcnv/gcnv_run.py b/snappy_pipeline/workflows/common/gcnv/gcnv_run.py index ab2c1d594..832b9fc7a 100644 --- a/snappy_pipeline/workflows/common/gcnv/gcnv_run.py +++ b/snappy_pipeline/workflows/common/gcnv/gcnv_run.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- """Implementation of the gCNV CASE mode run methods.""" -from glob import glob -from itertools import chain import json import os import re import warnings +from glob import glob +from itertools import chain from snakemake.io import Wildcards, expand, touch diff --git a/snappy_pipeline/workflows/common/melt.py b/snappy_pipeline/workflows/common/melt.py index 66ff833b2..066e84630 100644 --- a/snappy_pipeline/workflows/common/melt.py +++ b/snappy_pipeline/workflows/common/melt.py @@ -1,10 +1,10 @@ -from itertools import chain import re import typing +from itertools import chain +from biomedsheets.shortcuts import is_not_background from snakemake.io import touch -from biomedsheets.shortcuts import is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStepPart, ResourceUsage from snappy_pipeline.workflows.abstract.common import ( diff --git a/snappy_pipeline/workflows/gene_expression_quantification/__init__.py b/snappy_pipeline/workflows/gene_expression_quantification/__init__.py index 1b36d5432..31f602030 100644 --- a/snappy_pipeline/workflows/gene_expression_quantification/__init__.py +++ b/snappy_pipeline/workflows/gene_expression_quantification/__init__.py @@ -49,9 +49,9 @@ import os +from biomedsheets.shortcuts import GenericSampleSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GenericSampleSheet, is_not_background from snappy_pipeline.base import UnsupportedActionException from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( diff --git a/snappy_pipeline/workflows/gene_expression_report/__init__.py b/snappy_pipeline/workflows/gene_expression_report/__init__.py index 3b284c944..9a9f407d9 100644 --- a/snappy_pipeline/workflows/gene_expression_report/__init__.py +++ b/snappy_pipeline/workflows/gene_expression_report/__init__.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- """Implementation of the ``gene_expression_report`` step""" -from collections import OrderedDict import os +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, LinkOutStepPart from snappy_pipeline.workflows.ngs_mapping import NgsMappingWorkflow diff --git a/snappy_pipeline/workflows/helper_gcnv_model_targeted/__init__.py b/snappy_pipeline/workflows/helper_gcnv_model_targeted/__init__.py index a1e81f720..bc63074d7 100644 --- a/snappy_pipeline/workflows/helper_gcnv_model_targeted/__init__.py +++ b/snappy_pipeline/workflows/helper_gcnv_model_targeted/__init__.py @@ -86,9 +86,9 @@ import os import re +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import glob_wildcards -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, WritePedigreeStepPart from snappy_pipeline.workflows.common.gcnv.gcnv_build_model import BuildGcnvModelStepPart diff --git a/snappy_pipeline/workflows/helper_gcnv_model_wgs/__init__.py b/snappy_pipeline/workflows/helper_gcnv_model_wgs/__init__.py index 922ff64e3..c157f92df 100644 --- a/snappy_pipeline/workflows/helper_gcnv_model_wgs/__init__.py +++ b/snappy_pipeline/workflows/helper_gcnv_model_wgs/__init__.py @@ -86,9 +86,9 @@ import os import attr +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import glob_wildcards -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, WritePedigreeStepPart from snappy_pipeline.workflows.common.gcnv.gcnv_build_model import BuildGcnvModelStepPart diff --git a/snappy_pipeline/workflows/hla_typing/__init__.py b/snappy_pipeline/workflows/hla_typing/__init__.py index f5ca5c070..c39060f12 100644 --- a/snappy_pipeline/workflows/hla_typing/__init__.py +++ b/snappy_pipeline/workflows/hla_typing/__init__.py @@ -54,12 +54,12 @@ """ -from collections import OrderedDict import os +from collections import OrderedDict +from biomedsheets.shortcuts import GenericSampleSheet from snakemake.io import expand -from biomedsheets.shortcuts import GenericSampleSheet from snappy_pipeline.base import UnsupportedActionException from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( diff --git a/snappy_pipeline/workflows/homologous_recombination_deficiency/__init__.py b/snappy_pipeline/workflows/homologous_recombination_deficiency/__init__.py index 0fc6e3f33..111c5159e 100644 --- a/snappy_pipeline/workflows/homologous_recombination_deficiency/__init__.py +++ b/snappy_pipeline/workflows/homologous_recombination_deficiency/__init__.py @@ -59,9 +59,9 @@ import sys +from biomedsheets.shortcuts import CancerCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, is_not_background from snappy_pipeline.base import UnsupportedActionException from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( diff --git a/snappy_pipeline/workflows/igv_session_generation/__init__.py b/snappy_pipeline/workflows/igv_session_generation/__init__.py index 78ca9432d..990ed626d 100644 --- a/snappy_pipeline/workflows/igv_session_generation/__init__.py +++ b/snappy_pipeline/workflows/igv_session_generation/__init__.py @@ -47,11 +47,11 @@ import os +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from jinja2 import Environment, FileSystemLoader from snakemake import shell from snakemake.io import expand -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, LinkOutStepPart from snappy_pipeline.workflows.ngs_mapping import NgsMappingWorkflow diff --git a/snappy_pipeline/workflows/ngs_data_qc/__init__.py b/snappy_pipeline/workflows/ngs_data_qc/__init__.py index 4e4aa225f..e6184987d 100644 --- a/snappy_pipeline/workflows/ngs_data_qc/__init__.py +++ b/snappy_pipeline/workflows/ngs_data_qc/__init__.py @@ -11,12 +11,12 @@ """ -from itertools import chain import os +from itertools import chain +from biomedsheets.shortcuts import GenericSampleSheet from snakemake.io import Namedlist, expand, touch -from biomedsheets.shortcuts import GenericSampleSheet from snappy_pipeline.base import UnsupportedActionException from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( diff --git a/snappy_pipeline/workflows/ngs_mapping/__init__.py b/snappy_pipeline/workflows/ngs_mapping/__init__.py index 67a5a60fe..b098530f5 100644 --- a/snappy_pipeline/workflows/ngs_mapping/__init__.py +++ b/snappy_pipeline/workflows/ngs_mapping/__init__.py @@ -427,14 +427,14 @@ fingerprints can detect contamination in samples. """ -from itertools import chain import os import re import sys +from itertools import chain +from biomedsheets.shortcuts import GenericSampleSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GenericSampleSheet, is_not_background from snappy_pipeline.base import InvalidConfiguration, UnsupportedActionException from snappy_pipeline.utils import dictify, flatten, listify from snappy_pipeline.workflows.abstract import ( diff --git a/snappy_pipeline/workflows/panel_of_normals/__init__.py b/snappy_pipeline/workflows/panel_of_normals/__init__.py index 95f336009..d99755214 100644 --- a/snappy_pipeline/workflows/panel_of_normals/__init__.py +++ b/snappy_pipeline/workflows/panel_of_normals/__init__.py @@ -148,6 +148,7 @@ """ from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions + from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/repeat_expansion/__init__.py b/snappy_pipeline/workflows/repeat_expansion/__init__.py index 3145a32d9..0a129a332 100644 --- a/snappy_pipeline/workflows/repeat_expansion/__init__.py +++ b/snappy_pipeline/workflows/repeat_expansion/__init__.py @@ -78,12 +78,12 @@ Not available. """ -from collections import OrderedDict import os +from collections import OrderedDict +from biomedsheets.shortcuts import KEY_SEX, GermlineCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import KEY_SEX, GermlineCaseSheet, is_not_background from snappy_pipeline.base import UnsupportedActionException from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, LinkOutStepPart diff --git a/snappy_pipeline/workflows/somatic_cnv_checking/__init__.py b/snappy_pipeline/workflows/somatic_cnv_checking/__init__.py index e5e7624c6..febda8197 100644 --- a/snappy_pipeline/workflows/somatic_cnv_checking/__init__.py +++ b/snappy_pipeline/workflows/somatic_cnv_checking/__init__.py @@ -60,9 +60,9 @@ import os import sys +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.base import InvalidConfiguration from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( diff --git a/snappy_pipeline/workflows/somatic_gene_fusion_calling/__init__.py b/snappy_pipeline/workflows/somatic_gene_fusion_calling/__init__.py index 3e8c33265..4c729d389 100644 --- a/snappy_pipeline/workflows/somatic_gene_fusion_calling/__init__.py +++ b/snappy_pipeline/workflows/somatic_gene_fusion_calling/__init__.py @@ -50,9 +50,9 @@ import os +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions from snakemake.io import touch -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/somatic_hla_loh_calling/__init__.py b/snappy_pipeline/workflows/somatic_hla_loh_calling/__init__.py index f9070d31c..8d0052cdb 100644 --- a/snappy_pipeline/workflows/somatic_hla_loh_calling/__init__.py +++ b/snappy_pipeline/workflows/somatic_hla_loh_calling/__init__.py @@ -21,13 +21,13 @@ A report file. """ -from collections import OrderedDict import os import sys +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, LinkOutStepPart from snappy_pipeline.workflows.ngs_mapping import NgsMappingWorkflow diff --git a/snappy_pipeline/workflows/somatic_msi_calling/__init__.py b/snappy_pipeline/workflows/somatic_msi_calling/__init__.py index b581ddce9..f46459bc4 100644 --- a/snappy_pipeline/workflows/somatic_msi_calling/__init__.py +++ b/snappy_pipeline/workflows/somatic_msi_calling/__init__.py @@ -48,13 +48,13 @@ """ -from collections import OrderedDict import os import sys +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/somatic_purity_ploidy_estimate/__init__.py b/snappy_pipeline/workflows/somatic_purity_ploidy_estimate/__init__.py index 4bca9da80..1c1b09ce4 100644 --- a/snappy_pipeline/workflows/somatic_purity_ploidy_estimate/__init__.py +++ b/snappy_pipeline/workflows/somatic_purity_ploidy_estimate/__init__.py @@ -11,12 +11,12 @@ """ -from collections import OrderedDict import os +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions from snakemake.io import touch -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, LinkOutStepPart from snappy_pipeline.workflows.ngs_mapping import NgsMappingWorkflow, ResourceUsage diff --git a/snappy_pipeline/workflows/somatic_targeted_seq_cnv_calling/__init__.py b/snappy_pipeline/workflows/somatic_targeted_seq_cnv_calling/__init__.py index 01710d379..6440fe5f2 100644 --- a/snappy_pipeline/workflows/somatic_targeted_seq_cnv_calling/__init__.py +++ b/snappy_pipeline/workflows/somatic_targeted_seq_cnv_calling/__init__.py @@ -65,15 +65,15 @@ """ -from collections import OrderedDict -from itertools import chain import os import os.path import sys +from collections import OrderedDict +from itertools import chain +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.base import UnsupportedActionException from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( diff --git a/snappy_pipeline/workflows/somatic_variant_annotation/__init__.py b/snappy_pipeline/workflows/somatic_variant_annotation/__init__.py index 6baa58627..12470092f 100644 --- a/snappy_pipeline/workflows/somatic_variant_annotation/__init__.py +++ b/snappy_pipeline/workflows/somatic_variant_annotation/__init__.py @@ -73,13 +73,13 @@ Currently, no reports are generated. """ -from collections import OrderedDict import os import sys +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, LinkOutStepPart from snappy_pipeline.workflows.ngs_mapping import NgsMappingWorkflow, ResourceUsage diff --git a/snappy_pipeline/workflows/somatic_variant_calling/__init__.py b/snappy_pipeline/workflows/somatic_variant_calling/__init__.py index b07786ca9..fc4e8b366 100644 --- a/snappy_pipeline/workflows/somatic_variant_calling/__init__.py +++ b/snappy_pipeline/workflows/somatic_variant_calling/__init__.py @@ -98,13 +98,13 @@ Currently, no reports are generated. """ -from collections import OrderedDict import os import sys +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/somatic_variant_filtration/__init__.py b/snappy_pipeline/workflows/somatic_variant_filtration/__init__.py index f76fc5b3f..3c3f3e901 100644 --- a/snappy_pipeline/workflows/somatic_variant_filtration/__init__.py +++ b/snappy_pipeline/workflows/somatic_variant_filtration/__init__.py @@ -111,14 +111,14 @@ Note that the parallelisation of ``ebfilter`` has been removed, even though this operation can be slow when there are many variants (from WGS data for example). """ -from collections import OrderedDict import os import random import sys +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/somatic_variant_signatures/__init__.py b/snappy_pipeline/workflows/somatic_variant_signatures/__init__.py index 390f880a2..13ed114d7 100644 --- a/snappy_pipeline/workflows/somatic_variant_signatures/__init__.py +++ b/snappy_pipeline/workflows/somatic_variant_signatures/__init__.py @@ -8,13 +8,13 @@ signature explains as well as a plot. """ -from collections import OrderedDict import os import sys +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, LinkOutStepPart from snappy_pipeline.workflows.ngs_mapping import NgsMappingWorkflow, ResourceUsage diff --git a/snappy_pipeline/workflows/somatic_wgs_cnv_calling/__init__.py b/snappy_pipeline/workflows/somatic_wgs_cnv_calling/__init__.py index d2dd4fb1f..45091a778 100644 --- a/snappy_pipeline/workflows/somatic_wgs_cnv_calling/__init__.py +++ b/snappy_pipeline/workflows/somatic_wgs_cnv_calling/__init__.py @@ -73,14 +73,14 @@ Currently, no reports are generated. """ -from collections import OrderedDict -from itertools import chain import os import sys +from collections import OrderedDict +from itertools import chain +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/somatic_wgs_sv_calling/__init__.py b/snappy_pipeline/workflows/somatic_wgs_sv_calling/__init__.py index 68b0be6f4..1bb281143 100644 --- a/snappy_pipeline/workflows/somatic_wgs_sv_calling/__init__.py +++ b/snappy_pipeline/workflows/somatic_wgs_sv_calling/__init__.py @@ -73,13 +73,13 @@ Currently, no reports are generated. """ -from collections import OrderedDict import os import sys +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/sv_calling_targeted/__init__.py b/snappy_pipeline/workflows/sv_calling_targeted/__init__.py index fa804c1c8..555608ad8 100644 --- a/snappy_pipeline/workflows/sv_calling_targeted/__init__.py +++ b/snappy_pipeline/workflows/sv_calling_targeted/__init__.py @@ -7,6 +7,7 @@ import re from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background + from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, WritePedigreeStepPart from snappy_pipeline.workflows.common.delly import Delly2StepPart diff --git a/snappy_pipeline/workflows/sv_calling_wgs/__init__.py b/snappy_pipeline/workflows/sv_calling_wgs/__init__.py index 2b258c9a6..1f9c68fc4 100644 --- a/snappy_pipeline/workflows/sv_calling_wgs/__init__.py +++ b/snappy_pipeline/workflows/sv_calling_wgs/__init__.py @@ -1,9 +1,10 @@ """Implementation of the ``sv_calling_wgs`` step""" -from itertools import chain import re +from itertools import chain from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background + from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/sv_calling_wgs/test_workflows_wgs_sv_calling.py b/snappy_pipeline/workflows/sv_calling_wgs/test_workflows_wgs_sv_calling.py index 57cda98b7..edb6bed9e 100644 --- a/snappy_pipeline/workflows/sv_calling_wgs/test_workflows_wgs_sv_calling.py +++ b/snappy_pipeline/workflows/sv_calling_wgs/test_workflows_wgs_sv_calling.py @@ -7,7 +7,7 @@ import ruamel.yaml as ruamel_yaml from snakemake.io import Wildcards -from snappy_pipeline.workflows.sv_calling_wgs import WgsSvCallingWorkflow +from snappy_pipeline.workflows.sv_calling_wgs import SvCallingWgsWorkflow from .common import get_expected_output_bcf_files_dict, get_expected_output_vcf_files_dict from .conftest import patch_module_fs @@ -67,7 +67,7 @@ def sv_calling_wgs_workflow( mocker, fai_file_content, ): - """Return WgsSvCallingWorkflow object pre-configured with germline sheet""" + """Return SvCallingWgsWorkflow object pre-configured with germline sheet""" # Add Fasta file # Create FASTA files germline_sheet_fake_fs.fs.create_file( @@ -81,7 +81,7 @@ def sv_calling_wgs_workflow( # can obtain paths from the function as if we really a NGSMappingPipelineStep here dummy_workflow.globals = {"ngs_mapping": lambda x: "NGS_MAPPING/" + x} # Construct the workflow object - return WgsSvCallingWorkflow( + return SvCallingWgsWorkflow( dummy_workflow, minimal_config, config_lookup_paths, @@ -781,7 +781,7 @@ def test_sniffles2_step_part_get_resource_usage_snf_to_vcf(sv_calling_wgs_workfl assert actual == expected, msg_error -# Tests for WgsSvCallingWorkflow ----------------------------------------------------------- +# Tests for SvCallingWgsWorkflow ----------------------------------------------------------- def test_sv_calling_wgs_workflow(sv_calling_wgs_workflow): diff --git a/snappy_pipeline/workflows/targeted_seq_mei_calling/__init__.py b/snappy_pipeline/workflows/targeted_seq_mei_calling/__init__.py index bf8f55abe..cf42f51b0 100644 --- a/snappy_pipeline/workflows/targeted_seq_mei_calling/__init__.py +++ b/snappy_pipeline/workflows/targeted_seq_mei_calling/__init__.py @@ -81,9 +81,9 @@ import os +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.base import InvalidConfiguration from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( diff --git a/snappy_pipeline/workflows/tumor_mutational_burden/__init__.py b/snappy_pipeline/workflows/tumor_mutational_burden/__init__.py index 894d58573..8a7e21903 100644 --- a/snappy_pipeline/workflows/tumor_mutational_burden/__init__.py +++ b/snappy_pipeline/workflows/tumor_mutational_burden/__init__.py @@ -1,10 +1,10 @@ -from collections import OrderedDict import os import sys +from collections import OrderedDict +from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import CancerCaseSheet, CancerCaseSheetOptions, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, LinkOutStepPart from snappy_pipeline.workflows.ngs_mapping import NgsMappingWorkflow, ResourceUsage diff --git a/snappy_pipeline/workflows/variant_annotation/__init__.py b/snappy_pipeline/workflows/variant_annotation/__init__.py index 571433cf3..76b9372f5 100644 --- a/snappy_pipeline/workflows/variant_annotation/__init__.py +++ b/snappy_pipeline/workflows/variant_annotation/__init__.py @@ -53,10 +53,11 @@ N/A """ -from itertools import chain import re +from itertools import chain from biomedsheets.shortcuts import GermlineCaseSheet + from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import BaseStep, BaseStepPart, ResourceUsage from snappy_pipeline.workflows.abstract.common import SnakemakeListItemsGenerator diff --git a/snappy_pipeline/workflows/variant_calling/__init__.py b/snappy_pipeline/workflows/variant_calling/__init__.py index 5c0b2ff74..6e3c9e8bf 100644 --- a/snappy_pipeline/workflows/variant_calling/__init__.py +++ b/snappy_pipeline/workflows/variant_calling/__init__.py @@ -246,16 +246,16 @@ ``` """ -from collections import OrderedDict -from itertools import chain import re import sys import typing import warnings +from collections import OrderedDict +from itertools import chain +from biomedsheets.shortcuts import GermlineCaseSheet, Pedigree, is_not_background from snakemake.io import Wildcards, expand -from biomedsheets.shortcuts import GermlineCaseSheet, Pedigree, is_not_background from snappy_pipeline.utils import dictify, flatten, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/variant_checking/__init__.py b/snappy_pipeline/workflows/variant_checking/__init__.py index 04c6d7347..0cd7c1d23 100644 --- a/snappy_pipeline/workflows/variant_checking/__init__.py +++ b/snappy_pipeline/workflows/variant_checking/__init__.py @@ -50,9 +50,9 @@ import sys +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/variant_denovo_filtration/__init__.py b/snappy_pipeline/workflows/variant_denovo_filtration/__init__.py index cc3140dc5..016892b00 100644 --- a/snappy_pipeline/workflows/variant_denovo_filtration/__init__.py +++ b/snappy_pipeline/workflows/variant_denovo_filtration/__init__.py @@ -88,13 +88,13 @@ Currently, no reports are generated. """ -from collections import OrderedDict import itertools import os +from collections import OrderedDict +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/variant_export_external/__init__.py b/snappy_pipeline/workflows/variant_export_external/__init__.py index 96ca91726..a3ef9768d 100644 --- a/snappy_pipeline/workflows/variant_export_external/__init__.py +++ b/snappy_pipeline/workflows/variant_export_external/__init__.py @@ -78,9 +78,9 @@ import os import sys +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/variant_filtration/__init__.py b/snappy_pipeline/workflows/variant_filtration/__init__.py index 376e8dab9..03ce041be 100644 --- a/snappy_pipeline/workflows/variant_filtration/__init__.py +++ b/snappy_pipeline/workflows/variant_filtration/__init__.py @@ -96,9 +96,9 @@ import os.path import sys +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/variant_phasing/__init__.py b/snappy_pipeline/workflows/variant_phasing/__init__.py index 46fecf7aa..a0d78e7fe 100644 --- a/snappy_pipeline/workflows/variant_phasing/__init__.py +++ b/snappy_pipeline/workflows/variant_phasing/__init__.py @@ -60,12 +60,12 @@ __author__ = "Manuel Holtgrewe " -from collections import OrderedDict import os +from collections import OrderedDict +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.base import UnsupportedActionException from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( diff --git a/snappy_pipeline/workflows/wgs_cnv_export_external/__init__.py b/snappy_pipeline/workflows/wgs_cnv_export_external/__init__.py index 21e4674f3..93d09128b 100644 --- a/snappy_pipeline/workflows/wgs_cnv_export_external/__init__.py +++ b/snappy_pipeline/workflows/wgs_cnv_export_external/__init__.py @@ -69,9 +69,9 @@ import os import sys +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_pipeline/workflows/wgs_sv_export_external/__init__.py b/snappy_pipeline/workflows/wgs_sv_export_external/__init__.py index 8992ddf17..9ebe572e0 100644 --- a/snappy_pipeline/workflows/wgs_sv_export_external/__init__.py +++ b/snappy_pipeline/workflows/wgs_sv_export_external/__init__.py @@ -69,9 +69,9 @@ import os import sys +from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snakemake.io import expand -from biomedsheets.shortcuts import GermlineCaseSheet, is_not_background from snappy_pipeline.utils import dictify, listify from snappy_pipeline.workflows.abstract import ( BaseStep, diff --git a/snappy_wrappers/tools/fix_vcf.py b/snappy_wrappers/tools/fix_vcf.py index 8c8b2d6b1..f17f32219 100644 --- a/snappy_wrappers/tools/fix_vcf.py +++ b/snappy_wrappers/tools/fix_vcf.py @@ -9,9 +9,9 @@ """ import argparse -from functools import reduce import gzip import sys +from functools import reduce __author__ = "Manuel Holtgrewe " diff --git a/snappy_wrappers/tools/gcnv_merge_vcfs.py b/snappy_wrappers/tools/gcnv_merge_vcfs.py index 8473d6005..4639575aa 100644 --- a/snappy_wrappers/tools/gcnv_merge_vcfs.py +++ b/snappy_wrappers/tools/gcnv_merge_vcfs.py @@ -5,16 +5,16 @@ import contextlib import logging import os -from statistics import mean import sys import typing +from statistics import mean import attr import logzero -from logzero import logger import ncls import pandas as pd import vcfpy +from logzero import logger #: Source program is GATK gCNV SOURCE_GATK_GCNV = "GCNV" diff --git a/snappy_wrappers/tools/ped_to_vcf_header.py b/snappy_wrappers/tools/ped_to_vcf_header.py index 7aa062a5c..d95ddbd6e 100644 --- a/snappy_wrappers/tools/ped_to_vcf_header.py +++ b/snappy_wrappers/tools/ped_to_vcf_header.py @@ -9,10 +9,10 @@ from __future__ import print_function import argparse -from collections import OrderedDict, defaultdict, namedtuple import os import re import sys +from collections import OrderedDict, defaultdict, namedtuple __author__ = "Oliver Stolpe " diff --git a/snappy_wrappers/wrapper_parallel.py b/snappy_wrappers/wrapper_parallel.py index 61ae053f4..e250c760f 100644 --- a/snappy_wrappers/wrapper_parallel.py +++ b/snappy_wrappers/wrapper_parallel.py @@ -5,7 +5,6 @@ a "work", and a "merge" task. """ -from collections.abc import MutableMapping, MutableSequence import contextlib import datetime import functools @@ -21,6 +20,7 @@ import tempfile import textwrap import time +from collections.abc import MutableMapping, MutableSequence from snakemake import get_profile_file, snakemake diff --git a/snappy_wrappers/wrappers/arriba/run/wrapper.py b/snappy_wrappers/wrappers/arriba/run/wrapper.py index e1c9a88e3..2a154d473 100644 --- a/snappy_wrappers/wrappers/arriba/run/wrapper.py +++ b/snappy_wrappers/wrappers/arriba/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for arriba: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for arriba: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/bbduk/run/wrapper.py b/snappy_wrappers/wrappers/bbduk/run/wrapper.py index cf966ae22..7a7764fc7 100644 --- a/snappy_wrappers/wrappers/bbduk/run/wrapper.py +++ b/snappy_wrappers/wrappers/bbduk/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for bbduk: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for bbduk: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/bcftools/TMB/wrapper.py b/snappy_wrappers/wrappers/bcftools/TMB/wrapper.py index 50085c990..03a72f857 100644 --- a/snappy_wrappers/wrappers/bcftools/TMB/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/TMB/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for calculating tumor mutation burde with bcftools -""" +"""Wrapper for calculating tumor mutation burde with bcftools""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/bcftools/bcf_to_vcf/wrapper.py b/snappy_wrappers/wrappers/bcftools/bcf_to_vcf/wrapper.py index a4d64a847..7dacf2fec 100644 --- a/snappy_wrappers/wrappers/bcftools/bcf_to_vcf/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/bcf_to_vcf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running bcftools convert - BCF to compressed VCF. -""" +"""Wrapper for running bcftools convert - BCF to compressed VCF.""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/bcftools/filter/wrapper.py b/snappy_wrappers/wrappers/bcftools/filter/wrapper.py index 454e7b00a..b14b0b5da 100644 --- a/snappy_wrappers/wrappers/bcftools/filter/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/filter/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running bcftools mpileup -""" +"""Wrapper for running bcftools mpileup""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/bcftools/gvcf_to_vcf/wrapper.py b/snappy_wrappers/wrappers/bcftools/gvcf_to_vcf/wrapper.py index 7f04d5751..782632fc5 100644 --- a/snappy_wrappers/wrappers/bcftools/gvcf_to_vcf/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/gvcf_to_vcf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running bcftools convert - gVCF to VCF. -""" +"""Wrapper for running bcftools convert - gVCF to VCF.""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/bcftools/heterozygous_variants/wrapper.py b/snappy_wrappers/wrappers/bcftools/heterozygous_variants/wrapper.py index 2d1770494..66fc2935d 100644 --- a/snappy_wrappers/wrappers/bcftools/heterozygous_variants/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/heterozygous_variants/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for finding heterozygous variants with bcftools -""" +"""Wrapper for finding heterozygous variants with bcftools""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/bcftools/merge_snv_vcf/wrapper.py b/snappy_wrappers/wrappers/bcftools/merge_snv_vcf/wrapper.py index 914cb7c10..06f671ab9 100644 --- a/snappy_wrappers/wrappers/bcftools/merge_snv_vcf/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/merge_snv_vcf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running bcftools merge - VCF files. -""" +"""Wrapper for running bcftools merge - VCF files.""" import tempfile diff --git a/snappy_wrappers/wrappers/bcftools/merge_vcf/wrapper.py b/snappy_wrappers/wrappers/bcftools/merge_vcf/wrapper.py index 14bb28133..b0a04490e 100644 --- a/snappy_wrappers/wrappers/bcftools/merge_vcf/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/merge_vcf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running bcftools merge - Structural VCF files (CNV, SV). -""" +"""Wrapper for running bcftools merge - Structural VCF files (CNV, SV).""" import tempfile diff --git a/snappy_wrappers/wrappers/bcftools/pileups/wrapper.py b/snappy_wrappers/wrappers/bcftools/pileups/wrapper.py index 6c70452f2..82bba742a 100644 --- a/snappy_wrappers/wrappers/bcftools/pileups/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/pileups/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running bcftools mpileup -""" +"""Wrapper for running bcftools mpileup""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/bcftools/protected/wrapper.py b/snappy_wrappers/wrappers/bcftools/protected/wrapper.py index 5d28a23ab..d471b605a 100644 --- a/snappy_wrappers/wrappers/bcftools/protected/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/protected/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running bcftools mpileup -""" +"""Wrapper for running bcftools mpileup""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/bcftools/regions/wrapper.py b/snappy_wrappers/wrappers/bcftools/regions/wrapper.py index 13a5aa4c9..af44bae5c 100644 --- a/snappy_wrappers/wrappers/bcftools/regions/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/regions/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running bcftools filter over regions defined by a bed file -""" +"""Wrapper for running bcftools filter over regions defined by a bed file""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/bcftools/stats/wrapper.py b/snappy_wrappers/wrappers/bcftools/stats/wrapper.py index a079d0abf..197e9bc5b 100644 --- a/snappy_wrappers/wrappers/bcftools/stats/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/stats/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Canvas in somatic variant calling mode on WGS data -""" +"""Wrapper for running Canvas in somatic variant calling mode on WGS data""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/bed_jaccard_operations/wrapper.py b/snappy_wrappers/wrappers/bed_jaccard_operations/wrapper.py index 978cd7198..84cce32ad 100644 --- a/snappy_wrappers/wrappers/bed_jaccard_operations/wrapper.py +++ b/snappy_wrappers/wrappers/bed_jaccard_operations/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for BEDTools intersect + snappy-bed_filter_jaccard: Snakemake wrapper.py -""" +"""Wrapper for BEDTools intersect + snappy-bed_filter_jaccard: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/bed_venn/wrapper.py b/snappy_wrappers/wrappers/bed_venn/wrapper.py index 309578546..2d6014e78 100644 --- a/snappy_wrappers/wrappers/bed_venn/wrapper.py +++ b/snappy_wrappers/wrappers/bed_venn/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI BEDVenn: Snakemake wrapper.py -""" +"""CUBI BEDVenn: Snakemake wrapper.py""" import itertools import textwrap diff --git a/snappy_wrappers/wrappers/bwa/wrapper.py b/snappy_wrappers/wrappers/bwa/wrapper.py index 980c6f281..4a9c520b9 100644 --- a/snappy_wrappers/wrappers/bwa/wrapper.py +++ b/snappy_wrappers/wrappers/bwa/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for BWA: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for BWA: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/canvas/germline_wgs/wrapper.py b/snappy_wrappers/wrappers/canvas/germline_wgs/wrapper.py index 5f20a7911..237aa3234 100644 --- a/snappy_wrappers/wrappers/canvas/germline_wgs/wrapper.py +++ b/snappy_wrappers/wrappers/canvas/germline_wgs/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Canvas in germline variant calling mode on WGS data -""" +"""Wrapper for running Canvas in germline variant calling mode on WGS data""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/canvas/somatic_wgs/wrapper.py b/snappy_wrappers/wrappers/canvas/somatic_wgs/wrapper.py index 3c4c41a25..a7eb4aab9 100644 --- a/snappy_wrappers/wrappers/canvas/somatic_wgs/wrapper.py +++ b/snappy_wrappers/wrappers/canvas/somatic_wgs/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Canvas in somatic variant calling mode on WGS data -""" +"""Wrapper for running Canvas in somatic variant calling mode on WGS data""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cbioportal/clinical_data/wrapper.py b/snappy_wrappers/wrappers/cbioportal/clinical_data/wrapper.py index 02cc4fb4c..338b8699b 100644 --- a/snappy_wrappers/wrappers/cbioportal/clinical_data/wrapper.py +++ b/snappy_wrappers/wrappers/cbioportal/clinical_data/wrapper.py @@ -3,7 +3,6 @@ input. Takes a dict from biomedsheets/snappy_pipeline, writes out tsv meta_clinical_patient.txt """ - import csv import json import os diff --git a/snappy_wrappers/wrappers/cnvetti/on_target/coverage/wrapper.py b/snappy_wrappers/wrappers/cnvetti/on_target/coverage/wrapper.py index 8b438d7dc..b74378324 100644 --- a/snappy_wrappers/wrappers/cnvetti/on_target/coverage/wrapper.py +++ b/snappy_wrappers/wrappers/cnvetti/on_target/coverage/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Delly2's call step -""" +"""Wrapper for running Delly2's call step""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvetti/on_target/postprocess/wrapper.py b/snappy_wrappers/wrappers/cnvetti/on_target/postprocess/wrapper.py index 6e157af57..16146b22b 100644 --- a/snappy_wrappers/wrappers/cnvetti/on_target/postprocess/wrapper.py +++ b/snappy_wrappers/wrappers/cnvetti/on_target/postprocess/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running postprocessing of CNVetti-based segmentation. -""" +"""Wrapper for running postprocessing of CNVetti-based segmentation.""" import os diff --git a/snappy_wrappers/wrappers/cnvetti/on_target/segment/wrapper.py b/snappy_wrappers/wrappers/cnvetti/on_target/segment/wrapper.py index 71838e20a..f903faa14 100644 --- a/snappy_wrappers/wrappers/cnvetti/on_target/segment/wrapper.py +++ b/snappy_wrappers/wrappers/cnvetti/on_target/segment/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Delly2's call step -""" +"""Wrapper for running Delly2's call step""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/access/wrapper.py b/snappy_wrappers/wrappers/cnvkit/access/wrapper.py index c72460394..fa483d41f 100644 --- a/snappy_wrappers/wrappers/cnvkit/access/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/access/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for cnvkit.py access -""" +"""Wrapper for cnvkit.py access""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/antitarget/wrapper.py b/snappy_wrappers/wrappers/cnvkit/antitarget/wrapper.py index 2154efe06..e79639a3b 100644 --- a/snappy_wrappers/wrappers/cnvkit/antitarget/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/antitarget/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for cnvkit.py antitarget -""" +"""Wrapper for cnvkit.py antitarget""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/call/wrapper.py b/snappy_wrappers/wrappers/cnvkit/call/wrapper.py index 1630d2422..987a502ef 100644 --- a/snappy_wrappers/wrappers/cnvkit/call/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/call/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper vor cnvkit.py call -""" +"""Wrapper vor cnvkit.py call""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/coverage/wrapper.py b/snappy_wrappers/wrappers/cnvkit/coverage/wrapper.py index 47fa87535..b07d4536a 100644 --- a/snappy_wrappers/wrappers/cnvkit/coverage/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/coverage/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for cnvkit.py coverage -""" +"""Wrapper for cnvkit.py coverage""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/export/wrapper.py b/snappy_wrappers/wrappers/cnvkit/export/wrapper.py index 0c7af53bb..f291b3747 100644 --- a/snappy_wrappers/wrappers/cnvkit/export/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/export/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for cnvkit.py export -""" +"""Wrapper for cnvkit.py export""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/fix/wrapper.py b/snappy_wrappers/wrappers/cnvkit/fix/wrapper.py index f3e3cde0f..537ff5f77 100644 --- a/snappy_wrappers/wrappers/cnvkit/fix/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/fix/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for cnvkit.py fix -""" +"""Wrapper for cnvkit.py fix""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/plot/wrapper.py b/snappy_wrappers/wrappers/cnvkit/plot/wrapper.py index 83f52375c..de3747851 100644 --- a/snappy_wrappers/wrappers/cnvkit/plot/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/plot/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for cnvkit.py plot -""" +"""Wrapper for cnvkit.py plot""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/postprocess/wrapper.py b/snappy_wrappers/wrappers/cnvkit/postprocess/wrapper.py index 9ffe26efa..c746d1e65 100644 --- a/snappy_wrappers/wrappers/cnvkit/postprocess/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/postprocess/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper vor cnvkit.py call -""" +"""Wrapper vor cnvkit.py call""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/reference/wrapper.py b/snappy_wrappers/wrappers/cnvkit/reference/wrapper.py index 6343e9a20..57b8ee02e 100644 --- a/snappy_wrappers/wrappers/cnvkit/reference/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/reference/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for cnvkit.py reference -""" +"""Wrapper for cnvkit.py reference""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/report/wrapper.py b/snappy_wrappers/wrappers/cnvkit/report/wrapper.py index 010b588b7..9f921c6ec 100644 --- a/snappy_wrappers/wrappers/cnvkit/report/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/report/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for cnvkit.py report -""" +"""Wrapper for cnvkit.py report""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/segment/wrapper.py b/snappy_wrappers/wrappers/cnvkit/segment/wrapper.py index 201ebb2dd..5a02054e2 100644 --- a/snappy_wrappers/wrappers/cnvkit/segment/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/segment/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper vor cnvkit.py segment -""" +"""Wrapper vor cnvkit.py segment""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/target/wrapper.py b/snappy_wrappers/wrappers/cnvkit/target/wrapper.py index f15c0bcf0..acfc41ff6 100644 --- a/snappy_wrappers/wrappers/cnvkit/target/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/target/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for cnvkit.py target -""" +"""Wrapper for cnvkit.py target""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/cnvkit/wgs/wrapper.py b/snappy_wrappers/wrappers/cnvkit/wgs/wrapper.py index 08e2fdd04..183369e02 100644 --- a/snappy_wrappers/wrappers/cnvkit/wgs/wrapper.py +++ b/snappy_wrappers/wrappers/cnvkit/wgs/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper vor cnvkit.py batch --method wgs -""" +"""Wrapper vor cnvkit.py batch --method wgs""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/control_freec/wrapper.py b/snappy_wrappers/wrappers/control_freec/wrapper.py index 889213e18..f20ccad1f 100644 --- a/snappy_wrappers/wrappers/control_freec/wrapper.py +++ b/snappy_wrappers/wrappers/control_freec/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for Control-FreeC: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for Control-FreeC: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/delly2/germline_cnv/merge_genotypes/wrapper.py b/snappy_wrappers/wrappers/delly2/germline_cnv/merge_genotypes/wrapper.py index 46a0e6a4b..1e13768c3 100644 --- a/snappy_wrappers/wrappers/delly2/germline_cnv/merge_genotypes/wrapper.py +++ b/snappy_wrappers/wrappers/delly2/germline_cnv/merge_genotypes/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Delly2's calls tep -""" +"""Wrapper for running Delly2's calls tep""" import tempfile diff --git a/snappy_wrappers/wrappers/delly2/somatic/call/wrapper.py b/snappy_wrappers/wrappers/delly2/somatic/call/wrapper.py index 5771a3b20..c7adbc9ca 100644 --- a/snappy_wrappers/wrappers/delly2/somatic/call/wrapper.py +++ b/snappy_wrappers/wrappers/delly2/somatic/call/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Delly2's call step on tumor/matched-normal pairs -""" +"""Wrapper for running Delly2's call step on tumor/matched-normal pairs""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/delly2/somatic/filter/wrapper.py b/snappy_wrappers/wrappers/delly2/somatic/filter/wrapper.py index 7e797cf3f..c5227551f 100644 --- a/snappy_wrappers/wrappers/delly2/somatic/filter/wrapper.py +++ b/snappy_wrappers/wrappers/delly2/somatic/filter/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Delly2's "pre-filter" and "post-filter" steps -""" +"""Wrapper for running Delly2's "pre-filter" and "post-filter" steps""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/delly2/somatic/final_vcf/wrapper.py b/snappy_wrappers/wrappers/delly2/somatic/final_vcf/wrapper.py index e7bc7345c..dc005e772 100644 --- a/snappy_wrappers/wrappers/delly2/somatic/final_vcf/wrapper.py +++ b/snappy_wrappers/wrappers/delly2/somatic/final_vcf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Delly2's "final vcf" step -""" +"""Wrapper for running Delly2's "final vcf" step""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/dkfz_bias_filter/wrapper.py b/snappy_wrappers/wrappers/dkfz_bias_filter/wrapper.py index 48e375224..20dca9ef4 100644 --- a/snappy_wrappers/wrappers/dkfz_bias_filter/wrapper.py +++ b/snappy_wrappers/wrappers/dkfz_bias_filter/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for oxo-G flagging. -""" +"""CUBI+Snakemake wrapper code for oxo-G flagging.""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/eb_filter/wrapper.py b/snappy_wrappers/wrappers/eb_filter/wrapper.py index e35444e8e..ad1a57b94 100644 --- a/snappy_wrappers/wrappers/eb_filter/wrapper.py +++ b/snappy_wrappers/wrappers/eb_filter/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for EBFilter flagging. -""" +"""CUBI+Snakemake wrapper code for EBFilter flagging.""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/epitoper/wrapper.py b/snappy_wrappers/wrappers/epitoper/wrapper.py index 32e48012e..aced972ed 100644 --- a/snappy_wrappers/wrappers/epitoper/wrapper.py +++ b/snappy_wrappers/wrappers/epitoper/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for Epitoper: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for Epitoper: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/expansionhunter/wrapper.py b/snappy_wrappers/wrappers/expansionhunter/wrapper.py index d625a57f7..9ae21deb4 100644 --- a/snappy_wrappers/wrappers/expansionhunter/wrapper.py +++ b/snappy_wrappers/wrappers/expansionhunter/wrapper.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for ExpansionHunter: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for ExpansionHunter: Snakemake wrapper.py""" + import os from snakemake import shell diff --git a/snappy_wrappers/wrappers/fastp/run/wrapper.py b/snappy_wrappers/wrappers/fastp/run/wrapper.py index 625b03c2b..e65af5261 100644 --- a/snappy_wrappers/wrappers/fastp/run/wrapper.py +++ b/snappy_wrappers/wrappers/fastp/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for fastp: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for fastp: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/fastqc/wrapper.py b/snappy_wrappers/wrappers/fastqc/wrapper.py index 6078362e2..33e7372de 100644 --- a/snappy_wrappers/wrappers/fastqc/wrapper.py +++ b/snappy_wrappers/wrappers/fastqc/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for FastQC: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for FastQC: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/featurecounts/wrapper.py b/snappy_wrappers/wrappers/featurecounts/wrapper.py index 019965801..2b66d0053 100644 --- a/snappy_wrappers/wrappers/featurecounts/wrapper.py +++ b/snappy_wrappers/wrappers/featurecounts/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/fusioncatcher/run/wrapper.py b/snappy_wrappers/wrappers/fusioncatcher/run/wrapper.py index 0b442fdb9..01d4acf49 100644 --- a/snappy_wrappers/wrappers/fusioncatcher/run/wrapper.py +++ b/snappy_wrappers/wrappers/fusioncatcher/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for Fusioncatcher: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for Fusioncatcher: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/gatk_hc/wrapper.py b/snappy_wrappers/wrappers/gatk_hc/wrapper.py index 0b43103a2..4d2955e72 100644 --- a/snappy_wrappers/wrappers/gatk_hc/wrapper.py +++ b/snappy_wrappers/wrappers/gatk_hc/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for GATK HaplotypeCaller: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for GATK HaplotypeCaller: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/gatk_hc_par/wrapper.py b/snappy_wrappers/wrappers/gatk_hc_par/wrapper.py index 6346aaa5a..ce14386c0 100644 --- a/snappy_wrappers/wrappers/gatk_hc_par/wrapper.py +++ b/snappy_wrappers/wrappers/gatk_hc_par/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running GATK HC variant caller in parallel -""" +"""Wrapper for running GATK HC variant caller in parallel""" import os diff --git a/snappy_wrappers/wrappers/gatk_phase_by_transmission/wrapper.py b/snappy_wrappers/wrappers/gatk_phase_by_transmission/wrapper.py index f5686bb89..11f2d03ac 100644 --- a/snappy_wrappers/wrappers/gatk_phase_by_transmission/wrapper.py +++ b/snappy_wrappers/wrappers/gatk_phase_by_transmission/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper code for GATK PhaseByTransmission -""" +"""Wrapper code for GATK PhaseByTransmission""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/gatk_read_backed_phasing/wrapper.py b/snappy_wrappers/wrappers/gatk_read_backed_phasing/wrapper.py index d4cc4f07e..98ae799d2 100644 --- a/snappy_wrappers/wrappers/gatk_read_backed_phasing/wrapper.py +++ b/snappy_wrappers/wrappers/gatk_read_backed_phasing/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running GATK ReadBackedPhasing in parallel, genome is split into windows -""" +"""Wrapper for running GATK ReadBackedPhasing in parallel, genome is split into windows""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/gatk_ug/wrapper.py b/snappy_wrappers/wrappers/gatk_ug/wrapper.py index 4f2b419d6..8df63497a 100644 --- a/snappy_wrappers/wrappers/gatk_ug/wrapper.py +++ b/snappy_wrappers/wrappers/gatk_ug/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for GATK UnifiedGenotyper: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for GATK UnifiedGenotyper: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/hera/quant/wrapper.py b/snappy_wrappers/wrappers/hera/quant/wrapper.py index 25c0d656b..ea32445ae 100644 --- a/snappy_wrappers/wrappers/hera/quant/wrapper.py +++ b/snappy_wrappers/wrappers/hera/quant/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for Hera: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for Hera: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/hts_screen/wrapper.py b/snappy_wrappers/wrappers/hts_screen/wrapper.py index ccf6653a2..06072e550 100644 --- a/snappy_wrappers/wrappers/hts_screen/wrapper.py +++ b/snappy_wrappers/wrappers/hts_screen/wrapper.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for HTS Screen: Snakemake wrapper.py -""" - +"""CUBI+Snakemake wrapper code for HTS Screen: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/jaffa/run/wrapper.py b/snappy_wrappers/wrappers/jaffa/run/wrapper.py index 1d435b76b..cce0d9b30 100644 --- a/snappy_wrappers/wrappers/jaffa/run/wrapper.py +++ b/snappy_wrappers/wrappers/jaffa/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for JAFFA: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for JAFFA: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/jannovar/annotate_somatic_vcf/wrapper.py b/snappy_wrappers/wrappers/jannovar/annotate_somatic_vcf/wrapper.py index 037f8562e..655571f93 100644 --- a/snappy_wrappers/wrappers/jannovar/annotate_somatic_vcf/wrapper.py +++ b/snappy_wrappers/wrappers/jannovar/annotate_somatic_vcf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Jannovar variant annotation -""" +"""Wrapper for running Jannovar variant annotation""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/jannovar/annotate_vcf/wrapper.py b/snappy_wrappers/wrappers/jannovar/annotate_vcf/wrapper.py index f859d84dd..c3ef65267 100644 --- a/snappy_wrappers/wrappers/jannovar/annotate_vcf/wrapper.py +++ b/snappy_wrappers/wrappers/jannovar/annotate_vcf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Jannovar variant annotation -""" +"""Wrapper for running Jannovar variant annotation""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/link_in_bam/wrapper.py b/snappy_wrappers/wrappers/link_in_bam/wrapper.py index 60e613296..c80d48370 100644 --- a/snappy_wrappers/wrappers/link_in_bam/wrapper.py +++ b/snappy_wrappers/wrappers/link_in_bam/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for external: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for external: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/lohhla/wrapper.py b/snappy_wrappers/wrappers/lohhla/wrapper.py index eaf65d2ae..28cbc0a47 100644 --- a/snappy_wrappers/wrappers/lohhla/wrapper.py +++ b/snappy_wrappers/wrappers/lohhla/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for LOHHLA: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for LOHHLA: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/manta/somatic_wgs/wrapper.py b/snappy_wrappers/wrappers/manta/somatic_wgs/wrapper.py index 18a675858..58f33b6ac 100644 --- a/snappy_wrappers/wrappers/manta/somatic_wgs/wrapper.py +++ b/snappy_wrappers/wrappers/manta/somatic_wgs/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Manta in somatic variant calling mode on WGS data -""" +"""Wrapper for running Manta in somatic variant calling mode on WGS data""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/mantis/mantis_msi2/run/wrapper.py b/snappy_wrappers/wrappers/mantis/mantis_msi2/run/wrapper.py index e424261d0..822ae00d0 100644 --- a/snappy_wrappers/wrappers/mantis/mantis_msi2/run/wrapper.py +++ b/snappy_wrappers/wrappers/mantis/mantis_msi2/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for MANTIS: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for MANTIS: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/mbcs/wrapper.py b/snappy_wrappers/wrappers/mbcs/wrapper.py index ad6791676..025c0fa00 100644 --- a/snappy_wrappers/wrappers/mbcs/wrapper.py +++ b/snappy_wrappers/wrappers/mbcs/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for MTB-aware exome data -""" +"""CUBI+Snakemake wrapper code for MTB-aware exome data""" import os import shutil diff --git a/snappy_wrappers/wrappers/melt/reorder_vcf/wrapper.py b/snappy_wrappers/wrappers/melt/reorder_vcf/wrapper.py index fb96baf04..c68839f8e 100644 --- a/snappy_wrappers/wrappers/melt/reorder_vcf/wrapper.py +++ b/snappy_wrappers/wrappers/melt/reorder_vcf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Melt genotype -""" +"""Wrapper for running Melt genotype""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/minialign/run/wrapper.py b/snappy_wrappers/wrappers/minialign/run/wrapper.py index d63151590..c8752218b 100644 --- a/snappy_wrappers/wrappers/minialign/run/wrapper.py +++ b/snappy_wrappers/wrappers/minialign/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running BWA-MEM for PacBio data -""" +"""Wrapper for running BWA-MEM for PacBio data""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/mutect2/contamination/wrapper.py b/snappy_wrappers/wrappers/mutect2/contamination/wrapper.py index 30ce60469..061231955 100644 --- a/snappy_wrappers/wrappers/mutect2/contamination/wrapper.py +++ b/snappy_wrappers/wrappers/mutect2/contamination/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/mutect2/create_panel/wrapper.py b/snappy_wrappers/wrappers/mutect2/create_panel/wrapper.py index a800cf953..627d1e29b 100644 --- a/snappy_wrappers/wrappers/mutect2/create_panel/wrapper.py +++ b/snappy_wrappers/wrappers/mutect2/create_panel/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py""" # WARNING- In rare cases, the parallel invokation of the prepare_panel # wrapper creates multiple instances of variants located in padding diff --git a/snappy_wrappers/wrappers/mutect2/filter/wrapper.py b/snappy_wrappers/wrappers/mutect2/filter/wrapper.py index cd1beb527..77ff46841 100644 --- a/snappy_wrappers/wrappers/mutect2/filter/wrapper.py +++ b/snappy_wrappers/wrappers/mutect2/filter/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/mutect2/pileup/wrapper.py b/snappy_wrappers/wrappers/mutect2/pileup/wrapper.py index 595b10cf8..8dac77ddf 100644 --- a/snappy_wrappers/wrappers/mutect2/pileup/wrapper.py +++ b/snappy_wrappers/wrappers/mutect2/pileup/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for GetPileupSummaries: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for GetPileupSummaries: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/mutect2/prepare_panel/wrapper.py b/snappy_wrappers/wrappers/mutect2/prepare_panel/wrapper.py index 874674680..0b1fe732b 100644 --- a/snappy_wrappers/wrappers/mutect2/prepare_panel/wrapper.py +++ b/snappy_wrappers/wrappers/mutect2/prepare_panel/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/mutect2/run/wrapper.py b/snappy_wrappers/wrappers/mutect2/run/wrapper.py index c3ff0a407..83e8b60f6 100644 --- a/snappy_wrappers/wrappers/mutect2/run/wrapper.py +++ b/snappy_wrappers/wrappers/mutect2/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for MuTect 2: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/mutect2_par/prepare_panel/parallel_prepare_panel.py b/snappy_wrappers/wrappers/mutect2_par/prepare_panel/parallel_prepare_panel.py index 77d9e2d4a..5bed52c57 100644 --- a/snappy_wrappers/wrappers/mutect2_par/prepare_panel/parallel_prepare_panel.py +++ b/snappy_wrappers/wrappers/mutect2_par/prepare_panel/parallel_prepare_panel.py @@ -16,9 +16,9 @@ from snappy_wrappers.resource_usage import ResourceUsage # noqa: E402 from snappy_wrappers.wrapper_parallel import ( # noqa: E402 + ParallelMutect2BaseWrapper, gib_to_string, hours, - ParallelMutect2BaseWrapper, ) diff --git a/snappy_wrappers/wrappers/mutect2_par/run/parallel_mutect2.py b/snappy_wrappers/wrappers/mutect2_par/run/parallel_mutect2.py index 21923923a..c4804fb48 100644 --- a/snappy_wrappers/wrappers/mutect2_par/run/parallel_mutect2.py +++ b/snappy_wrappers/wrappers/mutect2_par/run/parallel_mutect2.py @@ -16,9 +16,9 @@ from snappy_wrappers.resource_usage import ResourceUsage # noqa: E402 from snappy_wrappers.wrapper_parallel import ( # noqa: E402 + ParallelMutect2BaseWrapper, gib_to_string, hours, - ParallelMutect2BaseWrapper, ) diff --git a/snappy_wrappers/wrappers/oncotator/run/wrapper.py b/snappy_wrappers/wrappers/oncotator/run/wrapper.py index 38b8d1e47..b4abba749 100644 --- a/snappy_wrappers/wrappers/oncotator/run/wrapper.py +++ b/snappy_wrappers/wrappers/oncotator/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Oncotator -""" +"""Wrapper for running Oncotator""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/optitype/wrapper.py b/snappy_wrappers/wrappers/optitype/wrapper.py index a971c691b..8682398b1 100644 --- a/snappy_wrappers/wrappers/optitype/wrapper.py +++ b/snappy_wrappers/wrappers/optitype/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for Optitype: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for Optitype: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/pb_honey_spots/germline/wrapper.py b/snappy_wrappers/wrappers/pb_honey_spots/germline/wrapper.py index 204cfb7c4..fc6531dea 100644 --- a/snappy_wrappers/wrappers/pb_honey_spots/germline/wrapper.py +++ b/snappy_wrappers/wrappers/pb_honey_spots/germline/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running PB Honey Spots on Germline data -""" +"""Wrapper for running PB Honey Spots on Germline data""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/picard/metrics/wrapper.py b/snappy_wrappers/wrappers/picard/metrics/wrapper.py index 7156197be..810a466e8 100644 --- a/snappy_wrappers/wrappers/picard/metrics/wrapper.py +++ b/snappy_wrappers/wrappers/picard/metrics/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for picard metrics collection: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for picard metrics collection: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/picard/prepare/wrapper.py b/snappy_wrappers/wrappers/picard/prepare/wrapper.py index 5d12b10e3..b8be4d3a5 100644 --- a/snappy_wrappers/wrappers/picard/prepare/wrapper.py +++ b/snappy_wrappers/wrappers/picard/prepare/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for converting exome baits & targets from bed to interval lists -""" +"""CUBI+Snakemake wrapper code for converting exome baits & targets from bed to interval lists""" import os import re diff --git a/snappy_wrappers/wrappers/pizzly/run/wrapper.py b/snappy_wrappers/wrappers/pizzly/run/wrapper.py index 2b0485a90..629473b69 100644 --- a/snappy_wrappers/wrappers/pizzly/run/wrapper.py +++ b/snappy_wrappers/wrappers/pizzly/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for Kallisto+Pizzly: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for Kallisto+Pizzly: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/platypus/call_joint/wrapper.py b/snappy_wrappers/wrappers/platypus/call_joint/wrapper.py index e8c657540..f8445916a 100644 --- a/snappy_wrappers/wrappers/platypus/call_joint/wrapper.py +++ b/snappy_wrappers/wrappers/platypus/call_joint/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Platypus in joint mode. -""" +"""Wrapper for running Platypus in joint mode.""" import os diff --git a/snappy_wrappers/wrappers/purecn/coverage/wrapper.py b/snappy_wrappers/wrappers/purecn/coverage/wrapper.py index 0691d31ee..93876e900 100644 --- a/snappy_wrappers/wrappers/purecn/coverage/wrapper.py +++ b/snappy_wrappers/wrappers/purecn/coverage/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for computing PureCN coverage -""" +"""CUBI+Snakemake wrapper code for computing PureCN coverage""" import os diff --git a/snappy_wrappers/wrappers/purecn/create_panel/wrapper.py b/snappy_wrappers/wrappers/purecn/create_panel/wrapper.py index 5224d6084..feb582537 100644 --- a/snappy_wrappers/wrappers/purecn/create_panel/wrapper.py +++ b/snappy_wrappers/wrappers/purecn/create_panel/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for preparing PureCN panel of normals -""" +"""CUBI+Snakemake wrapper code for preparing PureCN panel of normals""" import os import tempfile diff --git a/snappy_wrappers/wrappers/purecn/prepare/wrapper.py b/snappy_wrappers/wrappers/purecn/prepare/wrapper.py index 16799408e..482ce34a7 100644 --- a/snappy_wrappers/wrappers/purecn/prepare/wrapper.py +++ b/snappy_wrappers/wrappers/purecn/prepare/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for preparing exome kit intervals for PureCN -""" +"""CUBI+Snakemake wrapper code for preparing exome kit intervals for PureCN""" import os diff --git a/snappy_wrappers/wrappers/purecn/run/wrapper.py b/snappy_wrappers/wrappers/purecn/run/wrapper.py index 76b0d5811..f71c3d727 100644 --- a/snappy_wrappers/wrappers/purecn/run/wrapper.py +++ b/snappy_wrappers/wrappers/purecn/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for computing CNV using PureCN -""" +"""CUBI+Snakemake wrapper code for computing CNV using PureCN""" import os diff --git a/snappy_wrappers/wrappers/r/wrapper.py b/snappy_wrappers/wrappers/r/wrapper.py index 059419c33..c2759e9bf 100644 --- a/snappy_wrappers/wrappers/r/wrapper.py +++ b/snappy_wrappers/wrappers/r/wrapper.py @@ -1,5 +1,4 @@ -"""CUBI+Snakemake wrapper code for non-conda package installation -""" +"""CUBI+Snakemake wrapper code for non-conda package installation""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/rnaqc/duplication/wrapper.py b/snappy_wrappers/wrappers/rnaqc/duplication/wrapper.py index efb858820..51b618cc0 100644 --- a/snappy_wrappers/wrappers/rnaqc/duplication/wrapper.py +++ b/snappy_wrappers/wrappers/rnaqc/duplication/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/rnaqc/dupradar/wrapper.py b/snappy_wrappers/wrappers/rnaqc/dupradar/wrapper.py index c1af95139..35ccb7f70 100644 --- a/snappy_wrappers/wrappers/rnaqc/dupradar/wrapper.py +++ b/snappy_wrappers/wrappers/rnaqc/dupradar/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/rnaqc/rnaseqc/wrapper.py b/snappy_wrappers/wrappers/rnaqc/rnaseqc/wrapper.py index ffa3a7d63..f6c714708 100644 --- a/snappy_wrappers/wrappers/rnaqc/rnaseqc/wrapper.py +++ b/snappy_wrappers/wrappers/rnaqc/rnaseqc/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/rnaqc/stats/wrapper.py b/snappy_wrappers/wrappers/rnaqc/stats/wrapper.py index f61f52795..f39f667c6 100644 --- a/snappy_wrappers/wrappers/rnaqc/stats/wrapper.py +++ b/snappy_wrappers/wrappers/rnaqc/stats/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/rnaqc/wrapper.py b/snappy_wrappers/wrappers/rnaqc/wrapper.py index fa9a9df8f..100435a60 100644 --- a/snappy_wrappers/wrappers/rnaqc/wrapper.py +++ b/snappy_wrappers/wrappers/rnaqc/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for FeatureCounts: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/rseqc/wrapper.py b/snappy_wrappers/wrappers/rseqc/wrapper.py index 93730e6b8..974abff2f 100644 --- a/snappy_wrappers/wrappers/rseqc/wrapper.py +++ b/snappy_wrappers/wrappers/rseqc/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for infer_experiment: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for infer_experiment: Snakemake wrapper.py""" import os diff --git a/snappy_wrappers/wrappers/salmon/wrapper.py b/snappy_wrappers/wrappers/salmon/wrapper.py index b8ab6860f..9f3b1d2ba 100644 --- a/snappy_wrappers/wrappers/salmon/wrapper.py +++ b/snappy_wrappers/wrappers/salmon/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for STAR: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for STAR: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/samtools/bam_qc_report/wrapper.py b/snappy_wrappers/wrappers/samtools/bam_qc_report/wrapper.py index 6cc6f0020..2d3282322 100644 --- a/snappy_wrappers/wrappers/samtools/bam_qc_report/wrapper.py +++ b/snappy_wrappers/wrappers/samtools/bam_qc_report/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for Samtools - BAM QC report: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for Samtools - BAM QC report: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/scalpel/somatic/wrapper.py b/snappy_wrappers/wrappers/scalpel/somatic/wrapper.py index 3913cfb76..816e448ab 100644 --- a/snappy_wrappers/wrappers/scalpel/somatic/wrapper.py +++ b/snappy_wrappers/wrappers/scalpel/somatic/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running scalpel in somatic mode -""" +"""Wrapper for running scalpel in somatic mode""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/scarHRD/run/wrapper.py b/snappy_wrappers/wrappers/scarHRD/run/wrapper.py index c825f46f1..7668f6f0c 100644 --- a/snappy_wrappers/wrappers/scarHRD/run/wrapper.py +++ b/snappy_wrappers/wrappers/scarHRD/run/wrapper.py @@ -1,5 +1,4 @@ -"""CUBI+Snakemake wrapper code for scarHRD (non-conda package installation) -""" +"""CUBI+Snakemake wrapper code for scarHRD (non-conda package installation)""" import os diff --git a/snappy_wrappers/wrappers/sequenza/coverage/wrapper.py b/snappy_wrappers/wrappers/sequenza/coverage/wrapper.py index cc524a261..4b52abe3f 100644 --- a/snappy_wrappers/wrappers/sequenza/coverage/wrapper.py +++ b/snappy_wrappers/wrappers/sequenza/coverage/wrapper.py @@ -1,5 +1,4 @@ -"""CUBI+Snakemake wrapper code for sequenza (sequenza-utils, pileups) -""" +"""CUBI+Snakemake wrapper code for sequenza (sequenza-utils, pileups)""" import os import sys diff --git a/snappy_wrappers/wrappers/sequenza/gcreference/wrapper.py b/snappy_wrappers/wrappers/sequenza/gcreference/wrapper.py index 0b230a26d..66412c181 100644 --- a/snappy_wrappers/wrappers/sequenza/gcreference/wrapper.py +++ b/snappy_wrappers/wrappers/sequenza/gcreference/wrapper.py @@ -1,5 +1,4 @@ -"""CUBI+Snakemake wrapper code for sequenza GC reference file -""" +"""CUBI+Snakemake wrapper code for sequenza GC reference file""" import os diff --git a/snappy_wrappers/wrappers/sequenza/report/wrapper.py b/snappy_wrappers/wrappers/sequenza/report/wrapper.py index 3db1e1ec6..a8f4b2bdc 100644 --- a/snappy_wrappers/wrappers/sequenza/report/wrapper.py +++ b/snappy_wrappers/wrappers/sequenza/report/wrapper.py @@ -1,5 +1,4 @@ -"""CUBI+Snakemake wrapper code for sequenza (R part, post-processing) -""" +"""CUBI+Snakemake wrapper code for sequenza (R part, post-processing)""" import os import sys diff --git a/snappy_wrappers/wrappers/sequenza/run/wrapper.py b/snappy_wrappers/wrappers/sequenza/run/wrapper.py index c768d3937..2250a2c3a 100644 --- a/snappy_wrappers/wrappers/sequenza/run/wrapper.py +++ b/snappy_wrappers/wrappers/sequenza/run/wrapper.py @@ -1,5 +1,4 @@ -"""CUBI+Snakemake wrapper code for sequenza (coverage analysis in R) -""" +"""CUBI+Snakemake wrapper code for sequenza (coverage analysis in R)""" import os import sys diff --git a/snappy_wrappers/wrappers/signatures/deconstruct_sigs/wrapper.py b/snappy_wrappers/wrappers/signatures/deconstruct_sigs/wrapper.py index d2157fdf2..35d8c988e 100644 --- a/snappy_wrappers/wrappers/signatures/deconstruct_sigs/wrapper.py +++ b/snappy_wrappers/wrappers/signatures/deconstruct_sigs/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for deconstructSigs -""" +"""CUBI+Snakemake wrapper code for deconstructSigs""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/signatures/tabulate_vcf/wrapper.py b/snappy_wrappers/wrappers/signatures/tabulate_vcf/wrapper.py index 980b79ce9..c0c4fbb49 100644 --- a/snappy_wrappers/wrappers/signatures/tabulate_vcf/wrapper.py +++ b/snappy_wrappers/wrappers/signatures/tabulate_vcf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for bcftools stats: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for bcftools stats: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/singularity/wrapper.py b/snappy_wrappers/wrappers/singularity/wrapper.py index f04eebdcc..12e27209f 100644 --- a/snappy_wrappers/wrappers/singularity/wrapper.py +++ b/snappy_wrappers/wrappers/singularity/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for preparing exome kit intervals for PureCN -""" +"""CUBI+Snakemake wrapper code for preparing exome kit intervals for PureCN""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/sniffles/germline/wrapper.py b/snappy_wrappers/wrappers/sniffles/germline/wrapper.py index ad27b63bd..23c21ac37 100644 --- a/snappy_wrappers/wrappers/sniffles/germline/wrapper.py +++ b/snappy_wrappers/wrappers/sniffles/germline/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Sniffles on germline data -""" +"""Wrapper for running Sniffles on germline data""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/snpeff/somatic/wrapper.py b/snappy_wrappers/wrappers/snpeff/somatic/wrapper.py index 8d8e27403..af5a48642 100644 --- a/snappy_wrappers/wrappers/snpeff/somatic/wrapper.py +++ b/snappy_wrappers/wrappers/snpeff/somatic/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running SnpEff variant annotation -""" +"""Wrapper for running SnpEff variant annotation""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/somatic_variant_filtration/apply_all_filters/wrapper.py b/snappy_wrappers/wrappers/somatic_variant_filtration/apply_all_filters/wrapper.py index fc735d868..a0f5a3b8a 100644 --- a/snappy_wrappers/wrappers/somatic_variant_filtration/apply_all_filters/wrapper.py +++ b/snappy_wrappers/wrappers/somatic_variant_filtration/apply_all_filters/wrapper.py @@ -1,5 +1,4 @@ -"""CUBI+Snakemake wrapper code for applying the filter list. -""" +"""CUBI+Snakemake wrapper code for applying the filter list.""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/somatic_variant_filtration/apply_filters/wrapper.py b/snappy_wrappers/wrappers/somatic_variant_filtration/apply_filters/wrapper.py index d6bbd1f88..740b6bdbd 100644 --- a/snappy_wrappers/wrappers/somatic_variant_filtration/apply_filters/wrapper.py +++ b/snappy_wrappers/wrappers/somatic_variant_filtration/apply_filters/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for applying the filter list. -""" +"""CUBI+Snakemake wrapper code for applying the filter list.""" import gzip import re diff --git a/snappy_wrappers/wrappers/somatic_variant_filtration/filter_to_exons/wrapper.py b/snappy_wrappers/wrappers/somatic_variant_filtration/filter_to_exons/wrapper.py index e44e89c74..e1463b760 100644 --- a/snappy_wrappers/wrappers/somatic_variant_filtration/filter_to_exons/wrapper.py +++ b/snappy_wrappers/wrappers/somatic_variant_filtration/filter_to_exons/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for filtering to exons/regions of interest. -""" +"""CUBI+Snakemake wrapper code for filtering to exons/regions of interest.""" import textwrap diff --git a/snappy_wrappers/wrappers/strelka2/somatic/wrapper.py b/snappy_wrappers/wrappers/strelka2/somatic/wrapper.py index 3651401ad..448ac2ce2 100644 --- a/snappy_wrappers/wrappers/strelka2/somatic/wrapper.py +++ b/snappy_wrappers/wrappers/strelka2/somatic/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for manta/strelka2: Snakemake wrapper.py -""" +"""CUBI+Snakemake wrapper code for manta/strelka2: Snakemake wrapper.py""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/variant_filtration/collect_msdn/wrapper.py b/snappy_wrappers/wrappers/variant_filtration/collect_msdn/wrapper.py index c5fef0524..5e6838729 100644 --- a/snappy_wrappers/wrappers/variant_filtration/collect_msdn/wrapper.py +++ b/snappy_wrappers/wrappers/variant_filtration/collect_msdn/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Snakemake wrapper for collecting the MSDN. -""" +"""Snakemake wrapper for collecting the MSDN.""" import os.path import tempfile diff --git a/snappy_wrappers/wrappers/variant_filtration/filter_frequency/wrapper.py b/snappy_wrappers/wrappers/variant_filtration/filter_frequency/wrapper.py index 86a52d459..86e1a7187 100644 --- a/snappy_wrappers/wrappers/variant_filtration/filter_frequency/wrapper.py +++ b/snappy_wrappers/wrappers/variant_filtration/filter_frequency/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for frequency filter for variant_filtration. -""" +"""CUBI+Snakemake wrapper code for frequency filter for variant_filtration.""" import os import sys diff --git a/snappy_wrappers/wrappers/variant_filtration/filter_het_comp/wrapper.py b/snappy_wrappers/wrappers/variant_filtration/filter_het_comp/wrapper.py index 35a62fda8..bae647c0c 100644 --- a/snappy_wrappers/wrappers/variant_filtration/filter_het_comp/wrapper.py +++ b/snappy_wrappers/wrappers/variant_filtration/filter_het_comp/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for het_comp filter for variant_filtration. -""" +"""CUBI+Snakemake wrapper code for het_comp filter for variant_filtration.""" import os import sys diff --git a/snappy_wrappers/wrappers/variant_filtration/filter_inheritance/wrapper.py b/snappy_wrappers/wrappers/variant_filtration/filter_inheritance/wrapper.py index dc47ba1ab..890e9a054 100644 --- a/snappy_wrappers/wrappers/variant_filtration/filter_inheritance/wrapper.py +++ b/snappy_wrappers/wrappers/variant_filtration/filter_inheritance/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for inheritance filter for variant_filtration. -""" +"""CUBI+Snakemake wrapper code for inheritance filter for variant_filtration.""" import os diff --git a/snappy_wrappers/wrappers/variant_filtration/filter_quality/wrapper.py b/snappy_wrappers/wrappers/variant_filtration/filter_quality/wrapper.py index 87660de87..f715d3650 100644 --- a/snappy_wrappers/wrappers/variant_filtration/filter_quality/wrapper.py +++ b/snappy_wrappers/wrappers/variant_filtration/filter_quality/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for quality filter for variant_filtration. -""" +"""CUBI+Snakemake wrapper code for quality filter for variant_filtration.""" import os import sys diff --git a/snappy_wrappers/wrappers/variant_filtration/filter_regions/wrapper.py b/snappy_wrappers/wrappers/variant_filtration/filter_regions/wrapper.py index dc51c0794..16b065302 100644 --- a/snappy_wrappers/wrappers/variant_filtration/filter_regions/wrapper.py +++ b/snappy_wrappers/wrappers/variant_filtration/filter_regions/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for regions filter for variant_filtration. -""" +"""CUBI+Snakemake wrapper code for regions filter for variant_filtration.""" import os import sys diff --git a/snappy_wrappers/wrappers/variant_filtration/filter_scores/wrapper.py b/snappy_wrappers/wrappers/variant_filtration/filter_scores/wrapper.py index 940e53358..d1b804d7f 100644 --- a/snappy_wrappers/wrappers/variant_filtration/filter_scores/wrapper.py +++ b/snappy_wrappers/wrappers/variant_filtration/filter_scores/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for scores filter for variant_filtration. -""" +"""CUBI+Snakemake wrapper code for scores filter for variant_filtration.""" import os import sys diff --git a/snappy_wrappers/wrappers/variant_filtration/summarize_counts/wrapper.py b/snappy_wrappers/wrappers/variant_filtration/summarize_counts/wrapper.py index 48819b8ce..f849cfe76 100644 --- a/snappy_wrappers/wrappers/variant_filtration/summarize_counts/wrapper.py +++ b/snappy_wrappers/wrappers/variant_filtration/summarize_counts/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Snakemake wrapper for summarising the de novo counts. -""" +"""Snakemake wrapper for summarising the de novo counts.""" import tempfile diff --git a/snappy_wrappers/wrappers/varscan/call_joint/wrapper.py b/snappy_wrappers/wrappers/varscan/call_joint/wrapper.py index f2ef101b0..f6a1b9a48 100644 --- a/snappy_wrappers/wrappers/varscan/call_joint/wrapper.py +++ b/snappy_wrappers/wrappers/varscan/call_joint/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running Varscan calling. -""" +"""Wrapper for running Varscan calling.""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/vcf2maf/vcf2maf/wrapper.py b/snappy_wrappers/wrappers/vcf2maf/vcf2maf/wrapper.py index 856df0013..fed545703 100644 --- a/snappy_wrappers/wrappers/vcf2maf/vcf2maf/wrapper.py +++ b/snappy_wrappers/wrappers/vcf2maf/vcf2maf/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running VCF2MAF incl VEP variant annotation -""" +"""Wrapper for running VCF2MAF incl VEP variant annotation""" import pprint diff --git a/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/functions.py b/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/functions.py index c3e17567a..05596a0ce 100644 --- a/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/functions.py +++ b/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/functions.py @@ -5,8 +5,8 @@ import re import typing -from common_functions import calc_end_pos, minimize_mutation, strip_sequence_version, variant_type import exceptions +from common_functions import calc_end_pos, minimize_mutation, strip_sequence_version, variant_type from protein_mutation_parser import parse_protein_mutation from variant_classification import variant_classification_jannovar, variant_classification_vep @@ -31,7 +31,7 @@ def __init__(self, config: typing.Dict[str, typing.Any]): self.compiled["variant_classification_jannovar"] = variant_classification_jannovar for col_name, col_def in config["output"].items(): - if "function" in col_def and not col_def["function"] in self.compiled: + if "function" in col_def and col_def["function"] not in self.compiled: raise exceptions.MissingValue( 'Function "{}" requested to process column "{}" not found'.format( col_def["function"], col_name diff --git a/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/parser.py b/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/parser.py index 8bedaf22d..2344c8f18 100644 --- a/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/parser.py +++ b/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/parser.py @@ -2,9 +2,9 @@ import re import typing -from annotation import Annotation import exceptions import vcfpy +from annotation import Annotation class VcfParser: @@ -37,12 +37,12 @@ def __init__( :param samples: samples mapping dict """ if samples["normal"]: - if not samples["normal"] in header.samples.names: + if samples["normal"] not in header.samples.names: raise exceptions.IllegalValue( 'Normal sample "{}" not found in vcf header'.format(samples["normal"]) ) if samples["tumor"]: - if not samples["tumor"] in header.samples.names: + if samples["tumor"] not in header.samples.names: raise exceptions.IllegalValue( 'Tumor sample "{}" not found in vcf header'.format(samples["tumor"]) ) diff --git a/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/vcf_to_table.py b/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/vcf_to_table.py index 1d57d3a31..e3727274b 100644 --- a/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/vcf_to_table.py +++ b/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/vcf_to_table.py @@ -1,14 +1,14 @@ import argparse import logging -from parser import VcfParser import sys import typing +from parser import VcfParser -from action import Action import exceptions +import vcfpy +from action import Action from functions import Functions from ruamel.yaml import YAML -import vcfpy def _get_command_line_parser(): diff --git a/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/wrapper.py b/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/wrapper.py index d97d17b53..5cb26a3d5 100644 --- a/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/wrapper.py +++ b/snappy_wrappers/wrappers/vcf2maf/vcf_to_table/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running VCF2MAF incl VEP variant annotation -""" +"""Wrapper for running VCF2MAF incl VEP variant annotation""" import os diff --git a/snappy_wrappers/wrappers/vcf_sv_filter/vcf_sv_filter.py b/snappy_wrappers/wrappers/vcf_sv_filter/vcf_sv_filter.py index 472f1664c..0c1909cfd 100755 --- a/snappy_wrappers/wrappers/vcf_sv_filter/vcf_sv_filter.py +++ b/snappy_wrappers/wrappers/vcf_sv_filter/vcf_sv_filter.py @@ -485,7 +485,7 @@ def _setup(self): def _apply(self, record): # Handle cases of non-deletion or large deletions. assert self.reader - if not record.INFO.get("SIZE_CLASS") in ("SMALL", "MEDIUM"): + if record.INFO.get("SIZE_CLASS") not in ("SMALL", "MEDIUM"): return record # ignore, LARGE or non-linear elif record.INFO.get("SVTYPE") != "DEL": return record # ignore, not deletion @@ -666,7 +666,7 @@ def _setup(self): def _apply(self, record): if not self.tabix: return record # no ALU database - if not record.INFO.get("SIZE_CLASS") in ("SMALL", "MEDIUM"): + if record.INFO.get("SIZE_CLASS") not in ("SMALL", "MEDIUM"): return record # ignore, is LARGE or non-linear if not record.INFO.get("SVTYPE") == "DEL": return record # ignore, is not deletion @@ -707,7 +707,7 @@ def _setup(self): self.tabix = [tabix.open(p) for p in self.args.db_bed] def _apply(self, record): - if not record.INFO.get("SIZE_CLASS") in ("SMALL", "MEDIUM"): + if record.INFO.get("SIZE_CLASS") not in ("SMALL", "MEDIUM"): return record # ignore, is LARGE or non-linear if not record.INFO.get("SVTYPE") == "DEL": return record # ignore, is not deletion diff --git a/snappy_wrappers/wrappers/vep/run/wrapper.py b/snappy_wrappers/wrappers/vep/run/wrapper.py index 82c5f1534..84da509d6 100644 --- a/snappy_wrappers/wrappers/vep/run/wrapper.py +++ b/snappy_wrappers/wrappers/vep/run/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Wrapper for running VEP variant annotation -""" +"""Wrapper for running VEP variant annotation""" from snakemake.shell import shell diff --git a/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_inheritance/wrapper.py b/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_inheritance/wrapper.py index c502a251c..7af2a013b 100644 --- a/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_inheritance/wrapper.py +++ b/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_inheritance/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper for filtering WGS SV results for mode of inheritance. -""" +"""CUBI+Snakemake wrapper for filtering WGS SV results for mode of inheritance.""" # TODO: works for trios, singletons but NOT FOR MORE COMPLICATED CASES # TODO: how to make work if only one parent present? diff --git a/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_quality/wrapper.py b/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_quality/wrapper.py index 8a59bf3b6..f6f25e81a 100644 --- a/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_quality/wrapper.py +++ b/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_quality/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper for threshold-based filtration of WGS SV calls. -""" +"""CUBI+Snakemake wrapper for threshold-based filtration of WGS SV calls.""" # TODO: works for trios, singletons, or if only one parent available but NOT FOR MORE COMPLICATED CASES # TODO: currently only works for ERDS+SV2 diff --git a/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_regions/wrapper.py b/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_regions/wrapper.py index 19bbfaa35..7482171ae 100644 --- a/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_regions/wrapper.py +++ b/snappy_wrappers/wrappers/wgs_cnv_filtration/filter_regions/wrapper.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper for filtering WGS SV results for overlap with interesting regions. -""" - +"""CUBI+Snakemake wrapper for filtering WGS SV results for overlap with interesting regions.""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/wgs_mei_filtration/filter_inheritance/wrapper.py b/snappy_wrappers/wrappers/wgs_mei_filtration/filter_inheritance/wrapper.py index 0a7f8b589..902b0641f 100644 --- a/snappy_wrappers/wrappers/wgs_mei_filtration/filter_inheritance/wrapper.py +++ b/snappy_wrappers/wrappers/wgs_mei_filtration/filter_inheritance/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for inheritance filter for wgs_mei_filtration. -""" +"""CUBI+Snakemake wrapper code for inheritance filter for wgs_mei_filtration.""" # TODO: works for trios, singletons but NOT FOR MORE COMPLICATED CASES # TODO: how to make work if only one parent present? diff --git a/snappy_wrappers/wrappers/wgs_mei_filtration/filter_quality/wrapper.py b/snappy_wrappers/wrappers/wgs_mei_filtration/filter_quality/wrapper.py index 16a91b5c6..f12fa1310 100644 --- a/snappy_wrappers/wrappers/wgs_mei_filtration/filter_quality/wrapper.py +++ b/snappy_wrappers/wrappers/wgs_mei_filtration/filter_quality/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for quality filter for wgs_mei_filtration. -""" +"""CUBI+Snakemake wrapper code for quality filter for wgs_mei_filtration.""" # TODO: works for trios, singletons, or if only one parent available but NOT FOR MORE COMPLICATED CASES diff --git a/snappy_wrappers/wrappers/wgs_mei_filtration/filter_regions/wrapper.py b/snappy_wrappers/wrappers/wgs_mei_filtration/filter_regions/wrapper.py index 8ab98ef26..d5a90d10a 100644 --- a/snappy_wrappers/wrappers/wgs_mei_filtration/filter_regions/wrapper.py +++ b/snappy_wrappers/wrappers/wgs_mei_filtration/filter_regions/wrapper.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper code for region filter for wgs_mei_filtration. -""" - +"""CUBI+Snakemake wrapper code for region filter for wgs_mei_filtration.""" from snakemake import shell diff --git a/snappy_wrappers/wrappers/wgs_sv_filtration/filter_inheritance/wrapper.py b/snappy_wrappers/wrappers/wgs_sv_filtration/filter_inheritance/wrapper.py index c1cbc88cc..6364d9f23 100644 --- a/snappy_wrappers/wrappers/wgs_sv_filtration/filter_inheritance/wrapper.py +++ b/snappy_wrappers/wrappers/wgs_sv_filtration/filter_inheritance/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper for filtering WGS SV results for mode of inheritance. -""" +"""CUBI+Snakemake wrapper for filtering WGS SV results for mode of inheritance.""" # TODO: works for trios, singletons but NOT FOR MORE COMPLICATED CASES # TODO: how to make work if only one parent present? diff --git a/snappy_wrappers/wrappers/wgs_sv_filtration/filter_quality/wrapper.py b/snappy_wrappers/wrappers/wgs_sv_filtration/filter_quality/wrapper.py index ceb6c1e9e..3eb279770 100644 --- a/snappy_wrappers/wrappers/wgs_sv_filtration/filter_quality/wrapper.py +++ b/snappy_wrappers/wrappers/wgs_sv_filtration/filter_quality/wrapper.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper for threshold-based filtration of WGS SV calls. -""" +"""CUBI+Snakemake wrapper for threshold-based filtration of WGS SV calls.""" # TODO: works for trios, singletons, or if only one parent available but NOT FOR MORE COMPLICATED CASES diff --git a/snappy_wrappers/wrappers/wgs_sv_filtration/filter_regions/wrapper.py b/snappy_wrappers/wrappers/wgs_sv_filtration/filter_regions/wrapper.py index b84ce1aa6..fd9ce0801 100644 --- a/snappy_wrappers/wrappers/wgs_sv_filtration/filter_regions/wrapper.py +++ b/snappy_wrappers/wrappers/wgs_sv_filtration/filter_regions/wrapper.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -"""CUBI+Snakemake wrapper for filtering WGS SV results for overlap with interesting regions. -""" - +"""CUBI+Snakemake wrapper for filtering WGS SV results for overlap with interesting regions.""" from snakemake import shell diff --git a/tests/snappy_pipeline/apps/test_impl_yaml_utils.py b/tests/snappy_pipeline/apps/test_impl_yaml_utils.py index 62917c051..bcf0b6bac 100644 --- a/tests/snappy_pipeline/apps/test_impl_yaml_utils.py +++ b/tests/snappy_pipeline/apps/test_impl_yaml_utils.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- """Tests for ``yaml_utils``.""" + import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_pipeline/apps/test_snappy_snake.py b/tests/snappy_pipeline/apps/test_snappy_snake.py index 1cc6e73ac..63abb6f21 100644 --- a/tests/snappy_pipeline/apps/test_snappy_snake.py +++ b/tests/snappy_pipeline/apps/test_snappy_snake.py @@ -5,8 +5,8 @@ import pytest -from snappy_pipeline.apps import snappy_snake import snappy_pipeline.workflows +from snappy_pipeline.apps import snappy_snake from tests.snappy_pipeline.workflows.conftest import patch_module_fs diff --git a/tests/snappy_pipeline/test_find_file.py b/tests/snappy_pipeline/test_find_file.py index 23f60601a..37657c101 100644 --- a/tests/snappy_pipeline/test_find_file.py +++ b/tests/snappy_pipeline/test_find_file.py @@ -5,8 +5,8 @@ import json from unittest.mock import MagicMock, patch -from pyfakefs import fake_filesystem import pytest +from pyfakefs import fake_filesystem from snappy_pipeline.find_file import FileSystemCrawler, FileSystemCrawlerResult, PatternSet diff --git a/tests/snappy_pipeline/workflows/conftest.py b/tests/snappy_pipeline/workflows/conftest.py index 710901ead..1a99fed2a 100644 --- a/tests/snappy_pipeline/workflows/conftest.py +++ b/tests/snappy_pipeline/workflows/conftest.py @@ -1,19 +1,19 @@ # -*- coding: utf-8 -*- """Shared fixtures for the workflows unit tests""" -from collections import namedtuple import io import os import random import textwrap +from collections import namedtuple from unittest.mock import MagicMock, patch -from pydantic import ConfigDict -from pyfakefs import fake_filesystem import pytest - from biomedsheets.io_tsv import read_germline_tsv_sheet from biomedsheets.shortcuts import GenericSampleSheet, GermlineCaseSheet +from pydantic import ConfigDict +from pyfakefs import fake_filesystem + from snappy_pipeline.models import SnappyStepModel from snappy_pipeline.workflows.abstract import BaseStep @@ -938,7 +938,7 @@ def patch_module_fs(module_name: str, fake_fs, mocker): modules = [module_name] if module_name.startswith("snappy_pipeline.workflows.") and not module_name.endswith(".model"): # TODO replace with more robust solution - if not module_name.endswith("abstract") and not ".common." in module_name: + if not module_name.endswith("abstract") and ".common." not in module_name: modules.append(module_name + ".model") for module_name in modules: diff --git a/tests/snappy_pipeline/workflows/test_annotate_expansionhunter.py b/tests/snappy_pipeline/workflows/test_annotate_expansionhunter.py index 506c2198c..520c1afad 100644 --- a/tests/snappy_pipeline/workflows/test_annotate_expansionhunter.py +++ b/tests/snappy_pipeline/workflows/test_annotate_expansionhunter.py @@ -3,8 +3,8 @@ import json import os -from shutil import copyfile import tempfile +from shutil import copyfile import pytest diff --git a/tests/snappy_pipeline/workflows/test_workflows_abstract.py b/tests/snappy_pipeline/workflows/test_workflows_abstract.py index e6dd35fd0..fd555ca3c 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_abstract.py +++ b/tests/snappy_pipeline/workflows/test_workflows_abstract.py @@ -1,24 +1,19 @@ # -*- coding: utf-8 -*- -"""Code for testing the code in the "abstract" workflow -""" -from copy import deepcopy +"""Code for testing the code in the "abstract" workflow""" + import filecmp +import textwrap +from copy import deepcopy from pathlib import Path from tempfile import NamedTemporaryFile -import textwrap from typing import TypedDict -from unittest.mock import MagicMock import pytest -import ruamel.yaml import ruamel.yaml as ruamel_yaml +from biomedsheets.shortcuts import GenericSampleSheet, GermlineCaseSheet from snakemake.io import OutputFiles, Wildcards -import yaml -from biomedsheets.shortcuts import GenericSampleSheet, GermlineCaseSheet from snappy_pipeline.base import MissingConfiguration, merge_dictlikes -import snappy_pipeline.workflow_model -from snappy_pipeline.workflow_model import ConfigModel from snappy_pipeline.workflows.abstract import ( BaseStep, DataSearchInfo, diff --git a/tests/snappy_pipeline/workflows/test_workflows_ngs_mapping.py b/tests/snappy_pipeline/workflows/test_workflows_ngs_mapping.py index 655122c8e..cddbf9adf 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_ngs_mapping.py +++ b/tests/snappy_pipeline/workflows/test_workflows_ngs_mapping.py @@ -1,16 +1,16 @@ # -*- coding: utf-8 -*- """Tests for the ngs_mapping workflow module code""" -from collections import OrderedDict -from copy import deepcopy import io import textwrap +from collections import OrderedDict +from copy import deepcopy import pytest import ruamel.yaml as ruamel_yaml +from biomedsheets.io_tsv import read_generic_tsv_sheet, read_germline_tsv_sheet from snakemake.io import Wildcards -from biomedsheets.io_tsv import read_generic_tsv_sheet, read_germline_tsv_sheet from snappy_pipeline.workflows.ngs_mapping import NgsMappingWorkflow from .common import get_expected_log_files_dict diff --git a/tests/snappy_pipeline/workflows/test_workflows_ngs_mapping_processed_fastq.py b/tests/snappy_pipeline/workflows/test_workflows_ngs_mapping_processed_fastq.py index ff15f6bb3..af2f1dd20 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_ngs_mapping_processed_fastq.py +++ b/tests/snappy_pipeline/workflows/test_workflows_ngs_mapping_processed_fastq.py @@ -1,16 +1,16 @@ # -*- coding: utf-8 -*- """Tests for the ngs_mapping workflow module code using preprocessed FASTQ""" -from collections import OrderedDict -from copy import deepcopy import io import textwrap +from collections import OrderedDict +from copy import deepcopy import pytest import ruamel.yaml as ruamel_yaml +from biomedsheets.io_tsv import read_cancer_tsv_sheet from snakemake.io import Wildcards -from biomedsheets.io_tsv import read_cancer_tsv_sheet from snappy_pipeline.workflows.ngs_mapping import NgsMappingWorkflow from .common import get_expected_log_files_dict @@ -298,17 +298,17 @@ def test_star_step_part_get_output_files(ngs_mapping_workflow): log_base_out = "work/star.{library_name}/log/star.{library_name}" expected = get_expected_output_files_dict(bam_base_out, report_base_out, log_base_out) expected["gene_counts"] = "work/star.{library_name}/out/star.{library_name}.GeneCounts.tab" - expected[ - "gene_counts_md5" - ] = "work/star.{library_name}/out/star.{library_name}.GeneCounts.tab.md5" + expected["gene_counts_md5"] = ( + "work/star.{library_name}/out/star.{library_name}.GeneCounts.tab.md5" + ) expected["junctions"] = "work/star.{library_name}/out/star.{library_name}.Junctions.tab" expected["junctions_md5"] = "work/star.{library_name}/out/star.{library_name}.Junctions.tab.md5" - expected[ - "transcriptome" - ] = "work/star.{library_name}/out/star.{library_name}.toTranscriptome.bam" - expected[ - "transcriptome_md5" - ] = "work/star.{library_name}/out/star.{library_name}.toTranscriptome.bam.md5" + expected["transcriptome"] = ( + "work/star.{library_name}/out/star.{library_name}.toTranscriptome.bam" + ) + expected["transcriptome_md5"] = ( + "work/star.{library_name}/out/star.{library_name}.toTranscriptome.bam.md5" + ) expected["output_links"].extend( [ "output/star.{library_name}/out/star.{library_name}.Junctions.tab", diff --git a/tests/snappy_pipeline/workflows/test_workflows_panel_of_normals.py b/tests/snappy_pipeline/workflows/test_workflows_panel_of_normals.py index 212d32198..12cf27c90 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_panel_of_normals.py +++ b/tests/snappy_pipeline/workflows/test_workflows_panel_of_normals.py @@ -457,7 +457,7 @@ def test_cnvkit_step_part_get_resource_usage(panel_of_normals_workflow): def test_access_step_part_get_input_files_run(panel_of_normals_workflow): """Tests AccessStepPart._get_input_files_run()""" - assert panel_of_normals_workflow.get_input_files("access", "run") == None + assert panel_of_normals_workflow.get_input_files("access", "run") is None def test_access_step_part_get_output_files_run(panel_of_normals_workflow): @@ -710,7 +710,7 @@ def test_panel_of_normals_workflow(panel_of_normals_workflow): for chksum in ("", ".md5") ] expected += get_expected_log_files_dict( - base_out="output/purecn/log/unknown_unknown".format(mapper="bwa") + base_out="output/purecn/log/unknown_unknown".format() ).values() expected = list(sorted(expected)) diff --git a/tests/snappy_pipeline/workflows/test_workflows_somatic_cnv_checking.py b/tests/snappy_pipeline/workflows/test_workflows_somatic_cnv_checking.py index 01d1d7ec7..733b69284 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_somatic_cnv_checking.py +++ b/tests/snappy_pipeline/workflows/test_workflows_somatic_cnv_checking.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Tests for the somatic_cnv_checking workflow module code""" - import textwrap import pytest diff --git a/tests/snappy_pipeline/workflows/test_workflows_somatic_purity_ploidy_estimate.py b/tests/snappy_pipeline/workflows/test_workflows_somatic_purity_ploidy_estimate.py index 6ae583da1..cf4a9be92 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_somatic_purity_ploidy_estimate.py +++ b/tests/snappy_pipeline/workflows/test_workflows_somatic_purity_ploidy_estimate.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- """Tests for the somatic_purity_ploidy_estimate workflow module code""" + import copy import textwrap @@ -56,9 +57,9 @@ def minimal_config(): def minimal_config_copywritter(minimal_config): """Returns minimum configuration file with copywritter as the CNV caller.""" minimal_config_adjusted = copy.deepcopy(minimal_config) - minimal_config_adjusted["step_config"]["somatic_purity_ploidy_estimate"][ - "tool_cnv_calling" - ] = "copywriter" + minimal_config_adjusted["step_config"]["somatic_purity_ploidy_estimate"]["tool_cnv_calling"] = ( + "copywriter" + ) return minimal_config_adjusted diff --git a/tests/snappy_pipeline/workflows/test_workflows_somatic_targeted_seq_cnv_calling.py b/tests/snappy_pipeline/workflows/test_workflows_somatic_targeted_seq_cnv_calling.py index f9f1b45b1..e49b5350a 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_somatic_targeted_seq_cnv_calling.py +++ b/tests/snappy_pipeline/workflows/test_workflows_somatic_targeted_seq_cnv_calling.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- """Tests for the somatic_targeted_seq_cnv_calling workflow module code""" - -from itertools import chain import textwrap +from itertools import chain import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_pipeline/workflows/test_workflows_somatic_wgs_cnv_calling.py b/tests/snappy_pipeline/workflows/test_workflows_somatic_wgs_cnv_calling.py index c4f4e3668..40038a846 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_somatic_wgs_cnv_calling.py +++ b/tests/snappy_pipeline/workflows/test_workflows_somatic_wgs_cnv_calling.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- """Tests for the somatic_wgs_cnv_calling workflow module code""" - -from itertools import chain import textwrap +from itertools import chain import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_pipeline/workflows/test_workflows_somatic_wgs_sv_calling.py b/tests/snappy_pipeline/workflows/test_workflows_somatic_wgs_sv_calling.py index 8bce07f78..0a1928719 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_somatic_wgs_sv_calling.py +++ b/tests/snappy_pipeline/workflows/test_workflows_somatic_wgs_sv_calling.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Tests for the somatic_wgs_cnv_calling workflow module code""" - import textwrap import pytest diff --git a/tests/snappy_pipeline/workflows/test_workflows_variant_calling.py b/tests/snappy_pipeline/workflows/test_workflows_variant_calling.py index ddede247b..747f34cb5 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_variant_calling.py +++ b/tests/snappy_pipeline/workflows/test_workflows_variant_calling.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- """Tests for the variant_calling workflow module code""" -from copy import deepcopy import textwrap +from copy import deepcopy import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_annotation.py b/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_annotation.py index 85433ac3e..c48764fa4 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_annotation.py +++ b/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_annotation.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Tests for the variant_denovo_filtration workflow starting off variant_annotation. -""" +"""Tests for the variant_denovo_filtration workflow starting off variant_annotation.""" import textwrap diff --git a/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_calling.py b/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_calling.py index ab8848433..06a1eaf2a 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_calling.py +++ b/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_calling.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Tests for the variant_denovo_filtration workflow starting off variant_calling. -""" +"""Tests for the variant_denovo_filtration workflow starting off variant_calling.""" import textwrap diff --git a/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_phasing.py b/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_phasing.py index 449c28f71..bfa3962ba 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_phasing.py +++ b/tests/snappy_pipeline/workflows/test_workflows_variant_denovo_filtration_from_variant_phasing.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Tests for the variant_denovo_filtration workflow starting off variant_phasing. -""" +"""Tests for the variant_denovo_filtration workflow starting off variant_phasing.""" import textwrap diff --git a/tests/snappy_pipeline/workflows/test_workflows_variant_export_external.py b/tests/snappy_pipeline/workflows/test_workflows_variant_export_external.py index c0c2bc310..d585cde7c 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_variant_export_external.py +++ b/tests/snappy_pipeline/workflows/test_workflows_variant_export_external.py @@ -1,11 +1,12 @@ # -*- coding: utf-8 -*- """Tests for the variant_export_external workflow module code""" -from copy import deepcopy + import textwrap +from copy import deepcopy -from pydantic import ValidationError import pytest import ruamel.yaml as ruamel_yaml +from pydantic import ValidationError from snakemake.io import Wildcards from snappy_pipeline.workflows.variant_export_external import VariantExportExternalWorkflow diff --git a/tests/snappy_pipeline/workflows/test_workflows_variant_filtration.py b/tests/snappy_pipeline/workflows/test_workflows_variant_filtration.py index 4008d1473..aa36a8977 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_variant_filtration.py +++ b/tests/snappy_pipeline/workflows/test_workflows_variant_filtration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- """Tests for the variant_filtration workflow module code""" -from pathlib import Path import textwrap +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_pipeline/workflows/test_workflows_variant_phasing.py b/tests/snappy_pipeline/workflows/test_workflows_variant_phasing.py index b98e3b7ca..2ef75810c 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_variant_phasing.py +++ b/tests/snappy_pipeline/workflows/test_workflows_variant_phasing.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Tests for the variant_phasing workflow module code""" - import textwrap import pytest diff --git a/tests/snappy_pipeline/workflows/test_workflows_wgs_cnv_export_external.py b/tests/snappy_pipeline/workflows/test_workflows_wgs_cnv_export_external.py index 4301ff915..1f28ad1f1 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_wgs_cnv_export_external.py +++ b/tests/snappy_pipeline/workflows/test_workflows_wgs_cnv_export_external.py @@ -1,14 +1,14 @@ # -*- coding: utf-8 -*- """Tests for the wgs_cnv_export_external workflow module code""" -from copy import deepcopy + import textwrap +from copy import deepcopy -from pydantic import ValidationError import pytest import ruamel.yaml as ruamel_yaml +from pydantic import ValidationError from snakemake.io import Wildcards -from snappy_pipeline.base import MissingConfiguration from snappy_pipeline.workflows.wgs_cnv_export_external import WgsCnvExportExternalWorkflow from .common import get_expected_log_files_dict, get_expected_output_vcf_files_dict diff --git a/tests/snappy_pipeline/workflows/test_workflows_wgs_sv_export_external.py b/tests/snappy_pipeline/workflows/test_workflows_wgs_sv_export_external.py index 42f1f126f..6a13c3ff0 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_wgs_sv_export_external.py +++ b/tests/snappy_pipeline/workflows/test_workflows_wgs_sv_export_external.py @@ -1,11 +1,12 @@ # -*- coding: utf-8 -*- """Tests for the wgs_sv_export_external workflow module code""" -from copy import deepcopy + import textwrap +from copy import deepcopy -from pydantic import ValidationError import pytest import ruamel.yaml as ruamel_yaml +from pydantic import ValidationError from snakemake.io import Wildcards from snappy_pipeline.workflows.wgs_sv_export_external import WgsSvExportExternalWorkflow diff --git a/tests/snappy_wrappers/tools/conftest.py b/tests/snappy_wrappers/tools/conftest.py index 9a95731dc..85a912cb4 100644 --- a/tests/snappy_wrappers/tools/conftest.py +++ b/tests/snappy_wrappers/tools/conftest.py @@ -3,8 +3,8 @@ from collections import namedtuple -from pyfakefs import fake_filesystem import pytest +from pyfakefs import fake_filesystem @pytest.fixture diff --git a/tests/snappy_wrappers/tools/test_bed_filter_jaccard.py b/tests/snappy_wrappers/tools/test_bed_filter_jaccard.py index dc0c945f1..1260c99cc 100644 --- a/tests/snappy_wrappers/tools/test_bed_filter_jaccard.py +++ b/tests/snappy_wrappers/tools/test_bed_filter_jaccard.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Tests for ``snappy_wrappers.tools.bed_filter_jaccard``""" - import pytest from snappy_wrappers.tools import bed_filter_jaccard diff --git a/tests/snappy_wrappers/tools/test_ped_to_vcf_header.py b/tests/snappy_wrappers/tools/test_ped_to_vcf_header.py index 36cd4daa2..025d6caa2 100644 --- a/tests/snappy_wrappers/tools/test_ped_to_vcf_header.py +++ b/tests/snappy_wrappers/tools/test_ped_to_vcf_header.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -from collections import namedtuple import os import tempfile import textwrap +from collections import namedtuple import pytest diff --git a/tests/snappy_wrappers/tools/test_vcf_first_header.py b/tests/snappy_wrappers/tools/test_vcf_first_header.py index 00f79b3e4..24fecb682 100644 --- a/tests/snappy_wrappers/tools/test_vcf_first_header.py +++ b/tests/snappy_wrappers/tools/test_vcf_first_header.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- """Tests for ``snappy_wrappers.tools.vcf_first_header``""" -from io import StringIO import textwrap +from io import StringIO from unittest.mock import patch from snappy_wrappers.tools import vcf_first_header diff --git a/tests/snappy_wrappers/wrappers/conftest.py b/tests/snappy_wrappers/wrappers/conftest.py index 719cc17a0..e41491c53 100644 --- a/tests/snappy_wrappers/wrappers/conftest.py +++ b/tests/snappy_wrappers/wrappers/conftest.py @@ -1,14 +1,14 @@ """Support code for the snappy pipeline wrapper tests.""" -from collections import namedtuple -from itertools import chain import os import shutil import subprocess +from collections import namedtuple +from itertools import chain from unittest.mock import MagicMock, patch -from pyfakefs import fake_filesystem import pytest +from pyfakefs import fake_filesystem FORCE_RUN = os.environ.get("FORCE_RUN", "false") == "true" DIFF_MASTER = os.environ.get("DIFF_MASTER", "false") == "true" diff --git a/tests/snappy_wrappers/wrappers/test_eb_filter_par.py b/tests/snappy_wrappers/wrappers/test_eb_filter_par.py index d83dc29be..b5253879f 100644 --- a/tests/snappy_wrappers/wrappers/test_eb_filter_par.py +++ b/tests/snappy_wrappers/wrappers/test_eb_filter_par.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- """Code for testing mutect2_par/run wrapper""" -from pathlib import Path + import textwrap +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_wrappers/wrappers/test_gatk_hc_par_run.py b/tests/snappy_wrappers/wrappers/test_gatk_hc_par_run.py index 099e22281..ecebdc7fc 100644 --- a/tests/snappy_wrappers/wrappers/test_gatk_hc_par_run.py +++ b/tests/snappy_wrappers/wrappers/test_gatk_hc_par_run.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- """Code for testing gatk_hc_par/run wrapper""" -from pathlib import Path + import textwrap +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_wrappers/wrappers/test_gatk_read_backed_phasing_par.py b/tests/snappy_wrappers/wrappers/test_gatk_read_backed_phasing_par.py index 17251f2c0..d733aae1b 100644 --- a/tests/snappy_wrappers/wrappers/test_gatk_read_backed_phasing_par.py +++ b/tests/snappy_wrappers/wrappers/test_gatk_read_backed_phasing_par.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- """Code for testing gatk_read_backed_phasing_par wrapper""" -from pathlib import Path + import textwrap +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_wrappers/wrappers/test_gatk_ug_par.py b/tests/snappy_wrappers/wrappers/test_gatk_ug_par.py index 885adc79e..625bde2ef 100644 --- a/tests/snappy_wrappers/wrappers/test_gatk_ug_par.py +++ b/tests/snappy_wrappers/wrappers/test_gatk_ug_par.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- """Code for testing gatk_ug_par wrapper""" -from pathlib import Path + import textwrap +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_wrappers/wrappers/test_jannovar_par_annotate_somatic_vcf.py b/tests/snappy_wrappers/wrappers/test_jannovar_par_annotate_somatic_vcf.py index 489a1771c..a0c81accd 100644 --- a/tests/snappy_wrappers/wrappers/test_jannovar_par_annotate_somatic_vcf.py +++ b/tests/snappy_wrappers/wrappers/test_jannovar_par_annotate_somatic_vcf.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- """Code for testing gatk_hc_par/run wrapper""" -from pathlib import Path + import textwrap +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_wrappers/wrappers/test_jannovar_par_annotate_vcf.py b/tests/snappy_wrappers/wrappers/test_jannovar_par_annotate_vcf.py index 7e7b18490..d21889470 100644 --- a/tests/snappy_wrappers/wrappers/test_jannovar_par_annotate_vcf.py +++ b/tests/snappy_wrappers/wrappers/test_jannovar_par_annotate_vcf.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- """Code for testing gatk_hc_par/run wrapper""" -from pathlib import Path + import textwrap +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_wrappers/wrappers/test_mutect2_par_prepare_panel.py b/tests/snappy_wrappers/wrappers/test_mutect2_par_prepare_panel.py index a2bd9fb96..8c311c065 100644 --- a/tests/snappy_wrappers/wrappers/test_mutect2_par_prepare_panel.py +++ b/tests/snappy_wrappers/wrappers/test_mutect2_par_prepare_panel.py @@ -1,12 +1,13 @@ # -*- coding: utf-8 -*- """Code for testing mutect2_par/run wrapper""" + import importlib.machinery import os -from pathlib import Path import re import tempfile import textwrap import types +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_wrappers/wrappers/test_mutect2_par_run.py b/tests/snappy_wrappers/wrappers/test_mutect2_par_run.py index 504e7026e..36b0d0946 100644 --- a/tests/snappy_wrappers/wrappers/test_mutect2_par_run.py +++ b/tests/snappy_wrappers/wrappers/test_mutect2_par_run.py @@ -1,12 +1,13 @@ # -*- coding: utf-8 -*- """Code for testing mutect2_par/run wrapper""" + import importlib.machinery import os -from pathlib import Path import re import tempfile import textwrap import types +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_wrappers/wrappers/test_mutect_par_run.py b/tests/snappy_wrappers/wrappers/test_mutect_par_run.py index 84cceaa31..4922b2ab2 100644 --- a/tests/snappy_wrappers/wrappers/test_mutect_par_run.py +++ b/tests/snappy_wrappers/wrappers/test_mutect_par_run.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- """Code for testing mutect2_par/run wrapper""" -from pathlib import Path + import textwrap +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml diff --git a/tests/snappy_wrappers/wrappers/test_varscan_par_call_joint.py b/tests/snappy_wrappers/wrappers/test_varscan_par_call_joint.py index 92ff41783..57661f6a3 100644 --- a/tests/snappy_wrappers/wrappers/test_varscan_par_call_joint.py +++ b/tests/snappy_wrappers/wrappers/test_varscan_par_call_joint.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- """Code for testing varscan_par/call_joint wrapper""" -from pathlib import Path + import textwrap +from pathlib import Path import pytest import ruamel.yaml as ruamel_yaml