opencb / cellbase

High-Performance NoSQL database and RESTful web services to access to most relevant biological data
Apache License 2.0
87 stars 53 forks source link

Fix decomposed mnv codon change #665

Closed awab-ahmed closed 9 months ago

awab-ahmed commented 9 months ago

Bug fix for negative strand codon changes which are being miscalculated. Example:

variant 12:44779924:AA:CC
no decompose:
12:44779924:AA:CC
strand: - cdsPosition: 430 TTG/GGG ENST00000395487
LEU => GLY
decompose:
12:44779924:A:C
strand: - cdsPosition: 431 TTg/CCg ENST00000395487
LEU => PRO
12:44779925:A:C
strand: - cdsPosition: 431 TTg/CCg ENST00000395487
LEU => PRO 

Decomposed variants should return similar codon and amino acid change as the original non-decomposed variant LEU => GLY. In this PR, this is fixed by correcting the if condition that checks if a variant is on a negative strand transcript.