Skip to content

Commit

Permalink
Remove Strelka and Mutect2 from somatic variant calling (#513)
Browse files Browse the repository at this point in the history
* remove strelka and mutect2

* coveralls

* stepS

* test only for certain path

* refactor env

* remove cython

* coveralls version unlock

* remove --user from pip install

* remove unused run

* pip as module

* remove activate

* put activate back

* good old source activate instead of conda

* login bash

* proper py.test

* test help

* get germline dynamic

* remove unused lines

* replace coveralls with codecov

* codecov simpler
  • Loading branch information
hassanfa authored Nov 23, 2020
1 parent 6cf6c66 commit 58c17b2
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docker_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- develop
tags-ignore:
- "**"
paths:
- 'BALSAMIC/containers/**'


jobs:
main:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/pytest_and_coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: PyTest and Coveralls

on: ["push", "pull_request"]

jobs:
pytest_coveralls:
name: run PyTest
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
python-version: [3.6]

steps:
# Checkout BALSAMIC
- name: Git checkout
id: git_checkout
uses: actions/checkout@v2

# Get branch name
- name: Get branch name
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"

# Conda env create
- name: setup conda
id: setup_conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: balsamic
environment-file: BALSAMIC/conda/balsamic.yaml
python-version: ${{ matrix.python-version }}

# Install BALSAMIC
- name: Install BALSAMIC
id: install_balsamic
shell: bash -l {0}
run: |
conda activate balsamic
pip install --no-cache-dir -r requirements-dev.txt -r requirements.txt
pip install -e .
# Run PyTest
- name: Run PyTest
id: pytest
shell: bash -l {0}
run: |
conda activate balsamic
py.test --cov-report=xml --cov=BALSAMIC -rsxv tests/*
# Run Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true
18 changes: 0 additions & 18 deletions BALSAMIC/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,12 @@
"analysis_type": ["paired", "single"],
"workflow_solution": ["BALSAMIC"]
},
"mutect": {
"mutation": "somatic",
"type": "SNV",
"analysis_type": ["paired", "single"],
"workflow_solution": ["BALSAMIC"]
},
"vardict": {
"mutation": "somatic",
"type": "SNV",
"analysis_type": ["paired", "single"],
"workflow_solution": ["BALSAMIC"]
},
"strelka": {
"mutation": "somatic",
"type": "SNV",
"analysis_type": ["paired"],
"workflow_solution": ["BALSAMIC"]
},
"manta_germline": {
"mutation": "germline",
"type": "SV",
Expand All @@ -109,12 +97,6 @@
"analysis_type": ["paired", "single"],
"workflow_solution": ["BALSAMIC"]
},
"strelka_germline": {
"mutation": "germline",
"type": "SNV",
"analysis_type": ["paired", "single"],
"workflow_solution": ["BALSAMIC"]
}
}

# Minimum required QC-values from HS metrics to be able to pass analysis
Expand Down
3 changes: 0 additions & 3 deletions BALSAMIC/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,12 @@ class VCFModel(BaseModel):
tnsnv: VarcallerAttribute
manta: VarcallerAttribute
cnvkit: VarcallerAttribute
mutect: VarcallerAttribute
vardict: VarcallerAttribute
strelka: VarcallerAttribute
tnscope: VarcallerAttribute
dnascope: VarcallerAttribute
tnhaplotyper: VarcallerAttribute
manta_germline: VarcallerAttribute
haplotypecaller: VarcallerAttribute
strelka_germline: VarcallerAttribute


class AnalysisModel(BaseModel):
Expand Down
13 changes: 12 additions & 1 deletion BALSAMIC/workflows/balsamic.smk
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,18 @@ else:
"snakemake_rules/variant_calling/germline.rule",
"snakemake_rules/variant_calling/split_bed.rule"
]
germline_caller = ["haplotypecaller", "strelka_germline", "manta_germline"]

germline_caller_SNV = get_variant_callers(config=config, analysis_type="paired",
workflow_solution="BALSAMIC",
mutation_type="SNV",
mutation_class="germline")
germline_caller_SV = get_variant_callers(config=config, analysis_type="paired",
workflow_solution="BALSAMIC",
mutation_type="SV",
mutation_class="germline")

germline_caller = germline_caller_SNV + germline_caller_SV


if sentieon:
germline_caller.append("dnascope")
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest>=3.7.1
pytest-cov==2.8.1
coveralls==2.0.0
coveralls
pylint

0 comments on commit 58c17b2

Please sign in to comment.