-
Notifications
You must be signed in to change notification settings - Fork 94
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
Wrong normalization result #464
Comments
The correct normalization result should be |
I find out this is caused by the share of start and end position instance when the start and end is the same. In hgvs parser, when the start and end is same, they will use the same instance. Thus, when changing the end position of such variants in the normalizer, the start position will also be changed. This leads to this bug. Example code: import hgvs
import hgvs.parser
import hgvs.normalizer
import hgvs.dataproviders.uta
hdp = hgvs.dataproviders.uta.connect()
hp = hgvs.parser.Parser()
hn = hgvs.normalizer.Normalizer(hdp)
var_g = 'NC_000001.10:g.1647893delinsCTTTCTT'
var = hp.parse_hgvs_variant(var_g)
var.posedit.pos.start is var.posedit.pos.end
var_g = 'NC_000001.10:g.1647893_1647894delinsCTTTCTT'
var = hp.parse_hgvs_variant(var_g)
var.posedit.pos.start is var.posedit.pos.end
I think the start and end position should always be two different instances no matter the start and end positions are equal or not. |
Thanks a lot for the quick reply and fix. |
…d_in_position make start and end position independent when start and end are equal
Running
print(hn.normalize(hp.parse_hgvs_variant('NC_000001.10:g.1647893delinsCTTTCTT')))
in the hgvs-shell resulted in
NC_000001.10:g.1647900dup
, which looks incorrect since the length of the inserted sequence does not match. If I am not mistaken, it should beNC_000001.10:g.1647894_1647899dup
(orNC_000001.10:g.1647893_1647894insTTTCTT
).The text was updated successfully, but these errors were encountered: