Skip to content

Commit

Permalink
fix : autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Jul 16, 2024
1 parent 8560548 commit 21b7b6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions opr/opr_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .opr_param import A_WEIGHT, T_WEIGHT, C_WEIGHT, G_WEIGHT, ANHYDROUS_MOLECULAR_WEIGHT_CONSTANT
from .opr_param import DNA_COMPLEMENT_MAP


class Primer:
"""
The Primer class facilitates working with the primer sequence.
Expand All @@ -27,7 +28,6 @@ def __init__(self, primer_sequence):
self._sequence = Primer.validate_primer(primer_sequence)
self._molecular_weight = None


def reverse(self, inplace=False):
"""
Reverse sequence.
Expand All @@ -42,7 +42,6 @@ def reverse(self, inplace=False):
else:
return Primer(primer_sequence=new_seq)


def complement(self, inplace=False):
"""
Complement sequence.
Expand Down Expand Up @@ -116,8 +115,9 @@ def molecular_weight(self):
c_count = self._sequence.count('C')
g_count = self._sequence.count('G')
# Anhydrous Molecular Weight = (An x 313.21) + (Tn x 304.2) + (Cn x 289.18) + (Gn x 329.21) - 61.96
self._molecular_weight = (a_count * A_WEIGHT) + (t_count * T_WEIGHT) + (c_count * C_WEIGHT) + (g_count * G_WEIGHT) - ANHYDROUS_MOLECULAR_WEIGHT_CONSTANT
return self._molecular_weight
self._molecular_weight = (a_count * A_WEIGHT) + (t_count * T_WEIGHT) + (c_count * \
C_WEIGHT) + (g_count * G_WEIGHT) - ANHYDROUS_MOLECULAR_WEIGHT_CONSTANT
return self._molecular_weight

@molecular_weight.setter
def molecular_weight(self, _):
Expand Down
3 changes: 1 addition & 2 deletions opr/opr_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Parameters and constants."""
OPR_VERSION = "0.1"
VALID_BASES = set('ATCG')
DNA_COMPLEMENT_MAP = {"A":"T", "C":"G", "G":"C", "T":"A"}
DNA_COMPLEMENT_MAP = {"A": "T", "C": "G", "G": "C", "T": "A"}

PRIMER_LOWER_LENGTH = 18
PRIMER_HIGHEST_LENGTH = 30
Expand All @@ -21,4 +21,3 @@
PRIMER_SEQUENCE_VALID_GC_CONTENT_RANGE_ERROR = "Primer GC content should be between 30% and 80%."
PRIMER_READ_ONLY_ATTRIBUTE_ERROR = "This attribute is read-only."
PRIMER_NOT_REMOVABLE_ATTRIBUTE_ERROR = "This attribute is not removable."

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def read_description():
setup(
name='opr',
packages=[
'opr',],
'opr', ],
version='0.1',
description='TODO',
long_description=read_description(),
Expand Down

0 comments on commit 21b7b6f

Please sign in to comment.