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

Support frame shift with initiation codon change #18

Merged
merged 2 commits into from
Oct 24, 2018

Conversation

totakke
Copy link
Member

@totakke totakke commented Oct 23, 2018

Supports frame shift caused by initiation codon change. That case is sometimes found in BRCA Share database.

(require '[varity.vcf-to-hgvs :as v2h]
         '[clj-hgvs.core :as hgvs])

(->> (v2h/vcf-variant->protein-hgvs {:chr "chr17"
                                     :pos 43124016
                                     :ref "CCAGATGGGACACTCTAAGATTTTCTGCATAGCATTAATGACATTTTGTACTTCTTCAACGCGAAGAGCAGATAAATCCATTTCTTTCTGTTCCAATGAA"
                                     :alt "C"}
                                    "path/to/hg38.fa"
                                    "path/to/refGene.txt.gz")
     (map hgvs/format))
;;=> ("p.Met1SerfsTer13")

This PR also includes performance improvement of variant normalization. Process for finding repeated units from bases is heavy when the too long bases are supplied. I limited maximum size of a repeated unit to avoid process freeze.

I confirmed lein test :all passed.

@codecov
Copy link

codecov bot commented Oct 23, 2018

Codecov Report

Merging #18 into master will increase coverage by 0.2%.
The diff coverage is 23.65%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #18     +/-   ##
=========================================
+ Coverage   36.15%   36.36%   +0.2%     
=========================================
  Files          12       12             
  Lines        1239     1254     +15     
  Branches       24       24             
=========================================
+ Hits          448      456      +8     
- Misses        767      774      +7     
  Partials       24       24
Impacted Files Coverage Δ
src/varity/vcf_to_hgvs/protein.clj 23.48% <17.24%> (+0.38%) ⬆️
src/varity/vcf_to_hgvs.clj 20.51% <4.54%> (+0.15%) ⬆️
src/varity/vcf_to_hgvs/common.clj 62.59% <84.61%> (+0.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61a72ac...814c9ea. Read the comment docs.

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.

LGTM 👍 This changes make ~10% faster in the use of reporting 😺

@federkasten federkasten merged commit 5d8509b into master Oct 24, 2018
@federkasten federkasten deleted the fix/start-codon-fs branch October 24, 2018 07:20
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