-
Notifications
You must be signed in to change notification settings - Fork 0
DNA to Protein #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
DNA to Protein #63
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #63 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 222 234 +12
Branches 31 33 +2
=========================================
+ Hits 222 234 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request implements a new method to convert a DNA sequence to its corresponding protein sequence.
- Introduces the to_protein method in Primer (opr/primer.py) and its supporting function, protein_seq_calc, in opr/functions.py.
- Adds a codon-to-amino acid mapping in opr/params.py and several tests in tests/test_operations.py to validate the protein conversion.
- Updates the README and CHANGELOG to document and track the new functionality.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tests/test_operations.py | Added tests for the new to_protein method with various frames. |
opr/primer.py | Added to_protein method integrating the protein_seq_calc function. |
opr/params.py | Added a CODONS_TO_AMINO_ACIDS table to support protein translation. |
opr/functions.py | Introduced protein_seq_calc to derive protein sequences from RNA. |
README.md | Documented the new to_protein functionality with examples. |
CHANGELOG.md | Updated changelog to include the addition of the to_protein method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new to_protein method to the Primer class to enable conversion of DNA sequences into their corresponding protein sequences.
- Added a new method in opr/primer.py that leverages the new protein_seq_calc function.
- Introduced the CODONS_TO_AMINO_ACIDS mapping in opr/params.py and the protein_seq_calc function in opr/functions.py.
- Updated tests, documentation, and the changelog to reflect these changes.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/test_operations.py | Added multiple test cases to validate conversion of DNA to protein with various reading frames. |
opr/primer.py | Implemented the to_protein method to expose protein conversion functionality. |
opr/params.py | Introduced the CODONS_TO_AMINO_ACIDS mapping for protein translation. |
opr/functions.py | Added the protein_seq_calc function to compute protein sequences from RNA. |
README.md | Documented the to_protein functionality with examples. |
CHANGELOG.md | Recorded the addition of the to_protein method. |
CHANGELOG.md
Outdated
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. | |||
### Changed | |||
- Test system modified | |||
- `Python 3.6` support dropped | |||
### Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Added
...
### Changed
...
README.md
Outdated
@@ -154,6 +154,14 @@ | |||
'CUGGAGGACGGAAGAGGAAGUAA' | |||
``` | |||
|
|||
#### To Protein | |||
```pycon | |||
>>> oprimer_rna = oprimer.to_protein(frame=3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oprimer_rna
--> oprimer_protein
Thanks for the review @sepandhaghighi |
Reference Issues/PRs
#59
What does this implement/fix? Explain your changes.
This PR adds the
to_protein
method so that the OPR object can now have a protein representation.Any other comments?