From 21b7b6f68df874d4368f3474d5fb0b717a8fb8db Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 16 Jul 2024 21:04:26 +0430 Subject: [PATCH] fix : autopep8 --- opr/opr_obj.py | 8 ++++---- opr/opr_param.py | 3 +-- setup.py | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/opr/opr_obj.py b/opr/opr_obj.py index e4569a1..94f8666 100644 --- a/opr/opr_obj.py +++ b/opr/opr_obj.py @@ -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. @@ -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. @@ -42,7 +42,6 @@ def reverse(self, inplace=False): else: return Primer(primer_sequence=new_seq) - def complement(self, inplace=False): """ Complement sequence. @@ -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, _): diff --git a/opr/opr_param.py b/opr/opr_param.py index 893679b..b1ecde8 100644 --- a/opr/opr_param.py +++ b/opr/opr_param.py @@ -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 @@ -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." - diff --git a/setup.py b/setup.py index 40ae994..1a8afb4 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ def read_description(): setup( name='opr', packages=[ - 'opr',], + 'opr', ], version='0.1', description='TODO', long_description=read_description(),