Skip to content

Commit

Permalink
Structure edit (#14)
Browse files Browse the repository at this point in the history
* del : TODO.md removed

* doc : AUTHORS.md updated

* fix : OPR --> Primer

* doc : CHANGELOG.md updated

* fix : minor edit in test_molecular_weight.py
  • Loading branch information
sepandhaghighi authored Jul 2, 2024
1 parent dd726b2 commit 5da704b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 19 deletions.
8 changes: 4 additions & 4 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Authors #
# Core Developers

----------
- Sepand Haghighi - Open Science Laboratory ([Github](https://github.com/sepandhaghighi))
- Sepand Haghighi - Open Science Laboratory ([Github](https://github.com/sepandhaghighi)) **
- AmirHosein Rostami - Open Science Laboratory ([Github](https://github.com/AHReccese)) **
- Sadra Sabouri - Open Science Laboratory ([Github](https://github.com/sadrasabouri))
- AmirHosein Rostami - Open Science Laboratory ([Github](https://github.com/AHReccese))

** **Maintainer**

# Other Contributors #
# Other Contributors
----------

8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
## [0.1] - 2024-06-05
### Added
- Molecular Weight Calculation
- Sequence Validation
- OPR class
- `Primer` class
- Molecular weight calculation
- Sequence validation

[Unreleased]: https://github.com/openscilab/opr/compare/v0.1...dev
[0.1]: https://github.com/openscilab/opr/compare/3598e8b...v0.1
[0.1]: https://github.com/openscilab/opr/compare/0baa8dd...v0.1
2 changes: 0 additions & 2 deletions TODO.md

This file was deleted.

2 changes: 1 addition & 1 deletion opr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""OPR modules."""
from .opr_param import OPR_VERSION
from .opr_obj import OPR
from .opr_obj import Primer

__version__ = OPR_VERSION
12 changes: 6 additions & 6 deletions opr/opr_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
from .opr_param import PRIMER_READ_ONLY_ATTRIBUTE_ERROR, PRIMER_NOT_REMOVABLE_ATTRIBUTE_ERROR
from .opr_param import A_WEIGHT, T_WEIGHT, C_WEIGHT, G_WEIGHT, ANHYDROUS_MOLECULAR_WEIGHT_CONSTANT

class OPR:
class Primer:
"""
The OPR class facilitates working with the primer sequence.
The Primer class facilitates working with the primer sequence.
>>> oprimer = OPR("ATCGATCGATCGATCGAT")
>>> oprimer = Primer("ATCGATCGATCGATCGAT")
>>> oprimer.molecular_weight
"""

def __init__(self, primer_sequence):
"""
Initialize the Optimized Primer(OPR) instance.
Initialize the Primer instance.
:param primer_sequence: primer nucleotides sequence
:type primer_sequence: str
:return: an instance of the OPR class
:return: an instance of the Primer class
"""
self._sequence = OPR.validate_primer(primer_sequence)
self._sequence = Primer.validate_primer(primer_sequence)
self._molecular_weight = None

@staticmethod
Expand Down
4 changes: 2 additions & 2 deletions tests/test_molecular_weight.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from opr.opr_obj import OPR
from opr import Primer

TEST_CASE_NAME = "molecular weight calculation testcase"

def test_mwc():
oprimer = OPR("ATCGATCGATCGATCGAT")
oprimer = Primer("ATCGATCGATCGATCGAT")
assert round(oprimer.molecular_weight, 1) == 5498.7

0 comments on commit 5da704b

Please sign in to comment.