Skip to content
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

return no-effect when ter site is inserted around ter site and fix extension determine process #115

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

nokara26
Copy link
Contributor

@nokara26 nokara26 commented Jan 20, 2025

I found :clj-hgvs.coordinate/protein-coordinate error when ter site is inserted around ter site and some extension varints are determined as frameshift.
So I fixed protein-alteration type determine process.

@nokara26 nokara26 self-assigned this Jan 20, 2025
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 9.75610% with 37 lines in your changes missing coverage. Please review.

Project coverage is 48.13%. Comparing base (d88d5dc) to head (1663bc4).
Report is 45 commits behind head on master.

Files with missing lines Patch % Lines
src/varity/vcf_to_hgvs/protein.clj 9.75% 36 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #115      +/-   ##
==========================================
+ Coverage   46.93%   48.13%   +1.19%     
==========================================
  Files          16       16              
  Lines        2124     2273     +149     
  Branches       71       72       +1     
==========================================
+ Hits          997     1094      +97     
- Misses       1056     1107      +51     
- Partials       71       72       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

(if new-aa-pos
(coord/protein-coordinate new-aa-pos)
(coord/unknown-coordinate)))))))
:else
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just change indent and move alt-prot-seq* let binding to line 581

(let [alt-prot-seq* (format-alt-prot-seq seq-info)]
(cond
(and (not= ppos 1)
(ter-site-same-pos? ref-prot-seq alt-prot-seq*))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change c-ter-adjusted-alt-prot-seq to alt-prot-seq*

@nokara26 nokara26 requested a review from federkasten January 20, 2025 00:11
t (cond
ref-include-from-ter-start-and-over-ter-end :frame-shift
(and ref-include-from-ter-start-and-over-ter-end
(not first-diff-aa-is-ter-site)) :frame-shift
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

treat as extension when sequence is same until before ter site.

@nokara26 nokara26 changed the title return no-effect when ter site is inserted around ter site return no-effect when ter site is inserted around ter site and fix extension determine process Jan 20, 2025
Comment on lines 182 to 186
(let [ref-ter-pos (count ref-prot-seq)
alt-ter-pos (inc (count (first (string/split alt-prot-seq #"\*"))))]
(and (string/includes? ref-prot-seq "*")
(string/includes? alt-prot-seq "*")
(= ref-ter-pos alt-ter-pos))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a possibility of a NullPointerException occurring.

Suggested change
(let [ref-ter-pos (count ref-prot-seq)
alt-ter-pos (inc (count (first (string/split alt-prot-seq #"\*"))))]
(and (string/includes? ref-prot-seq "*")
(string/includes? alt-prot-seq "*")
(= ref-ter-pos alt-ter-pos))))
(and (string/includes? ref-prot-seq "*")
(string/includes? alt-prot-seq "*")
(let [ref-ter-pos (count ref-prot-seq)
alt-ter-pos (inc (count (first (string/split alt-prot-seq #"\*"))))]
(= ref-ter-pos alt-ter-pos))))

@nokara26 nokara26 requested a review from federkasten January 21, 2025 06:52
@nokara26 nokara26 force-pushed the fix/fix-ter-site-ins-around-ter-site branch from 083360e to aaf40df Compare January 21, 2025 06:59
Copy link
Member

@federkasten federkasten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for promptly resolving the issue! LGTM 🙆‍♂️

@federkasten federkasten merged commit bf3dff0 into master Jan 21, 2025
30 checks passed
@federkasten federkasten deleted the fix/fix-ter-site-ins-around-ter-site branch January 21, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants