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

Bugfix - wrong HGVSp when --shift_hgvs is enabled #1061

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

nakib103
Copy link
Contributor

@nakib103 nakib103 commented Jan 12, 2024

ENSVAR-6131

In #994 we added a update that will convert a delins to dup. An example can be found in the issue reported in Ensembl/ensembl-vep#500 with example (chr1 20978294 . TTTTATTTATTTA TTTTATTTATTTATTTA). The code change was in _clip_allele function which is used to check after clipping alleles the type of HGVS notation changes. We introduced checking whether type changes to dup before checking for ins.

The _clip_allele function is used by both HGVSc and HGVSp. For HGVSp this change caused a problem as the dup calculation in done after _clip_allele - in _check_for_peptide_duplication function, whereas, for HGVSc it is done before.

So in these code changes I have added condition to not revert delins to dup for HGVSp under _clip_allele.

  • also revert back checking = type for only HGVSp (updated in the above mentioned PR without any issue being reported)
  • update some comments and refactoring of codes

Test

HGVSp position -

#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	H_NJ-HCC1395-HCC1395
6	41754573	.	C	CCTT	.	.	.	GT:DP:DP4:BQ:SS:AD:DP2:TAR:TIR:TOR:DP50:FDP50:SUBDP50:FT	0/1:76:13,9,28,26:36:2:12:78:12,12:55,55:12,12:80.52:1.92:0:PASS

HGVSc/HGVSp dup gets corrected still -

chr1 20978294 . TTTTATTTATTTA TTTTATTTATTTATTTA
chr1 20978964 . GGTAGGC GGTAGGCGTAGGC

Copy link
Contributor

@likhitha-surapaneni likhitha-surapaneni left a comment

Choose a reason for hiding this comment

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

Tested and LGTM. Thanks @nakib103

@nakib103 nakib103 merged commit 71d0eba into Ensembl:postreleasefix/112 Feb 2, 2024
1 check passed
@nakib103
Copy link
Contributor Author

nakib103 commented Feb 2, 2024

merged to main and postrealeasefix/112

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