Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Refactor/pip freeze version #480

Merged
merged 4 commits into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions BALSAMIC/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,11 @@

umiworkflow_params = {
"common": {
"align_header": "'@RG\\tID:Group\\tSM:{sample}\\tLB:TargetPanel\\tPL:ILLUMINA'",
"align_header":
"'@RG\\tID:Group\\tSM:{sample}\\tLB:TargetPanel\\tPL:ILLUMINA'",
"align_intbases": 1000000,
"filter_tumor_af": 0.0005
},
},
"consensuscall": {
"align_format": "BAM",
"filter_minreads": "3,1,1",
Expand All @@ -422,6 +423,7 @@
"vardict_filters": "-c 1 -S 2 -E 3 -g 4 -r 1 -F 0"
},
"vep": {
"vep_filters": "--compress_output bgzip --vcf --everything --allow_non_variant --dont_skip --buffer_size 10000 --format vcf --offline --variant_class --merged --cache --verbose --force_overwrite"
"vep_filters":
"--compress_output bgzip --vcf --everything --allow_non_variant --dont_skip --buffer_size 10000 --format vcf --offline --variant_class --merged --cache --verbose --force_overwrite"
}
}
4 changes: 4 additions & 0 deletions BALSAMIC/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ class UMIParamsConsensuscall(BaseModel):
filter_minreads: str = '3,1,1'
tag: str = 'XR'


class UMIParamsTNscope(BaseModel):
"""This class defines the params settings used as constants in UMI workflow- rule tnscope.

Expand All @@ -538,6 +539,7 @@ class UMIParamsTNscope(BaseModel):
prunefactor: int
disable_detect: str


class UMIParamsVardict(BaseModel):
"""This class defines the params settings used as constants in UMIworkflow-rule vardict.

Expand All @@ -546,6 +548,7 @@ class UMIParamsVardict(BaseModel):
"""
vardict_filters: str


class UMIParamsVEP(BaseModel):
"""This class defines the params settings used as constants in UMIworkflow-rule vep.

Expand All @@ -554,6 +557,7 @@ class UMIParamsVEP(BaseModel):
"""
vep_filters: str


class UMIworkflowConfig(BaseModel):
""" Defines set of rules in UMI workflow.

Expand Down
32 changes: 16 additions & 16 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
click
pyyaml
yapf
graphviz
pygments
coloredlogs
psutil
snakemake==5.13.0
gsutil
six>=1.12.0
jinja2
networkx
colorclass
pydantic
numpy
click>=7.1.2
colorclass>=2.2.0
coloredlogs>=14.0
cyvcf2<0.10.0
graphviz>=0.14
gsutil>=4.50
jinja2>=2.11.2
matplotlib>=3.3.0
networkx>=2.4
numpy>=1.18.4
pandas>1.1.0
psutil>=5.7.0
pydantic>=1.5.1
pygments>=2.6.1
pyyaml>=5.3.1
seaborn>=0.11.0
matplotlib>=3.3.0
six>=1.12.0
snakemake==5.13.0
yapf>=0.30.0
33 changes: 14 additions & 19 deletions tests/utils/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,13 @@ def test_sample_instance_model():

def test_umiparams_common():
""" test UMIParamsCommon model for correct validation """

# GIVEN a UMI workflow common params
test_commonparams = {
"align_header": "test_header_name",
"align_intbases": 100,
"filter_tumor_af": 0.01
}
}
# WHEN building the model
test_commonparams_built = UMIParamsCommon(**test_commonparams)
# THEN assert values
Expand All @@ -304,9 +304,7 @@ def test_umiparams_common():
def test_umiparams_umiextract():
""" test UMIParamsUMIextract model for correct validation """
# GIVEN umiextract params
test_umiextractparams = {
"read_structure": "['mode', 'r1,r2']"
}
test_umiextractparams = {"read_structure": "['mode', 'r1,r2']"}

# WHEN building the model
test_umiextractparams_built = UMIParamsUMIextract(**test_umiextractparams)
Expand All @@ -320,17 +318,17 @@ def test_umiparams_consensuscall():

#GIVEN consensuscall params
test_consensuscall = {
"align_format":"BAM",
"filter_minreads":"6,3,3",
"tag":"XZ"
"align_format": "BAM",
"filter_minreads": "6,3,3",
"tag": "XZ"
}

#WHEN building the model
test_consensuscall_built = UMIParamsConsensuscall(**test_consensuscall)

#THEN assert values
assert test_consensuscall_built.align_format == "BAM"
assert test_consensuscall_built.filter_minreads == "6,3,3"
assert test_consensuscall_built.filter_minreads == "6,3,3"
assert test_consensuscall_built.tag == "XZ"


Expand All @@ -343,9 +341,9 @@ def test_umiparams_tnscope():
"min_tumorLOD": 6,
"error_rate": 5,
"prunefactor": 3,
"disable_detect":"abc"
"disable_detect": "abc"
}

#WHEN building the model
test_tnscope_params_built = UMIParamsTNscope(**test_tnscope_params)

Expand All @@ -356,13 +354,12 @@ def test_umiparams_tnscope():
assert test_tnscope_params_built.prunefactor == 3
assert test_tnscope_params_built.disable_detect == "abc"


def test_umiparams_vardict():
""" test UMIParamsVardict model for correct validation"""

#GIVEN vardict params
test_umivardict={
"vardict_filters": "-a 1 -b 2 -c 5"
}
test_umivardict = {"vardict_filters": "-a 1 -b 2 -c 5"}

#WHEN building the model
test_umivardict_built = UMIParamsVardict(**test_umivardict)
Expand All @@ -375,9 +372,7 @@ def test_umiparams_vep():
""" test UMIParamsVEP model for correct validation"""

#GIVEN vardict params
test_umivep={
"vep_filters": "all defaults params"
}
test_umivep = {"vep_filters": "all defaults params"}

#WHEN building the model
test_umivep_built = UMIParamsVEP(**test_umivep)
Expand Down