Skip to content

Commit

Permalink
code tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzoic committed Apr 5, 2024
1 parent c960dcf commit 805a56b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion countess/plugins/variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from countess import VERSION
from countess.core.logger import Logger
from countess.core.parameters import BooleanParam, ColumnChoiceParam, ColumnOrStringParam, ColumnOrNoneChoiceParam, IntegerParam, StringParam
from countess.core.parameters import BooleanParam, ColumnChoiceParam, ColumnOrStringParam, IntegerParam, StringParam
from countess.core.plugins import PandasTransformDictToDictPlugin
from countess.utils.variant import find_variant_string

Expand Down
2 changes: 1 addition & 1 deletion countess/utils/variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def _ref(ref_offset):

if opcode.tag == "delete":
assert dest_pro == ""
if ref_pro[src_end] == '*':
if ref_pro[src_end] == "*":
# if the codon just after this deletion is a terminator,
# consider this an early termination.
yield f"{_ref(src_start)}Ter"
Expand Down
6 changes: 2 additions & 4 deletions tests/plugins/test_variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

logger = MultiprocessLogger()


def test_variant_ref_value():
input_df = pd.DataFrame(
[{"seq": "TGAAGTAGAGG"}, {"seq": "AGAAGTTGTGG"}, {"seq": "ATAAGAAGAGG"}]
)
input_df = pd.DataFrame([{"seq": "TGAAGTAGAGG"}, {"seq": "AGAAGTTGTGG"}, {"seq": "ATAAGAAGAGG"}])
plugin = VariantPlugin()
plugin.set_parameter("column", "seq")
plugin.set_parameter("reference", "AGAAGTAGAGG")
Expand All @@ -26,7 +25,6 @@ def test_variant_ref_value():
assert output[2]["out"] == "g.[2G>T;6T>A]"



def test_variant_ref_column():
input_df = pd.DataFrame(
[{"ref": "TACACACAG", "seq": "TACAGACAG"}, {"ref": "ATGGTTGGTTC", "seq": "ATGGTTGGTGGTTCG"}]
Expand Down

0 comments on commit 805a56b

Please sign in to comment.