-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* MeltingTemperatureMode enum added * Melting Temperature basic calculations added to Primer * add warning message of not-supported methods for melting temperature calculation * tests for basic melting temperature calculations added * `CHANGELOG.md` updated * autopep8.sh applied * feedback applied * feedback applied * feedback applied
- Loading branch information
Showing
4 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
from opr import Primer | ||
from opr.primer import MeltingTemperature | ||
|
||
TEST_CASE_NAME = "Calculations tests" | ||
|
||
def test_mwc(): | ||
oprimer = Primer("ATCGATCGATCGATCGAT") | ||
assert round(oprimer.molecular_weight, 1) == 5498.7 | ||
|
||
|
||
def test_gc_content_1(): #Reference: https://jamiemcgowan.ie/bioinf/gc_content.html | ||
oprimer = Primer("ATCG") | ||
assert oprimer.gc_content == 0.5 | ||
|
||
|
||
def test_gc_content_2(): #Reference: https://jamiemcgowan.ie/bioinf/gc_content.html | ||
oprimer = Primer("ATTCG") | ||
assert oprimer.gc_content == 0.4 | ||
|
||
def test_gc_content_3(): #Reference: https://jamiemcgowan.ie/bioinf/gc_content.html | ||
oprimer = Primer("ATTTTTT") | ||
assert oprimer.gc_content == 0 | ||
|
||
def test_melt_temp_1(): #Reference: http://biotools.nubic.northwestern.edu/OligoCalc.html | ||
oprimer = Primer("ATCGATCGATCGATCGATCG") | ||
basic_melt_temp = oprimer.melting_temperature(MeltingTemperature.BASIC) | ||
assert round(basic_melt_temp,1) == 51.8 | ||
|
||
def test_melt_temp_2(): #Reference: http://biotools.nubic.northwestern.edu/OligoCalc.html | ||
oprimer = Primer("ATCG") | ||
basic_melt_temp = oprimer.melting_temperature(method=MeltingTemperature.BASIC) | ||
assert round(basic_melt_temp,1) == 12 |