Closed bpow closed 8 years ago
good idea, what do you think about keeping
if 'Amino_Acid_change' in self.effects:
return self.effects['Amino_Acid_change']
after your addition? Then it can handle the older snpEff as well.
... or placing that snippet inside of OldSnpEff.aa_change
Could go either way (include 2nd 'if' statement in SnpEff.aa_change or override in OldSnpEff.aa_change) depending on how strictly SnpEff should be with regards to expecting specifically ANN-formatted changes. I agree that should go back in there somewhere to prevent the parsing of the old format from breaking. I hadn't realized that the OldSnpEff didn't already have an aa_change
property,
OldSnpEff inherits from SnpEff, so it had it implicitly. I think it should go in OldSnpEff.aa_change. If you don't beat me to it, I'll add it and a test in the next few days.
OK, rebased and updated the pull request with the ability for OldSnpEff to populate aa_change
as well.
Frustratingly, some versions of SnpEff use Amino_Acid_Change
and some use Amino_Acid_change
, so I added the ability to parse from both...
Tests also updated/included.
cheers!
This isn't the exact same as how
aa_change
has been represented in the past (it uses HGVS representation likep.Arg457His
instead ofR457H
, but they are semantically the same.To unify representations would require removing the
p.
prefix and changing three-letter AA codes to single letter AA codes.