monarch-initiative / pheval.exomiser

Exomiser plugin for PhEval.
4 stars 1 forks source link

Strip angled brackets from Exomiser json `alt` field #33

Closed yaseminbridges closed 1 year ago

yaseminbridges commented 1 year ago

Structural variants are reported in the Exomiser json results in angled brackets, e.g., <DEL> or <INS>. These need to be removed for accurate comparison with what is reported in the phenopackets

yaseminbridges commented 1 year ago

Looks good but note that you cant call .strip on None, so you should be certain you are guarded against that possibility. Safer would be

if "alt" in result_entry and result["alt"]  != None:
        return result_entry["alt"].strip(">").strip("<")
else:
    return ""

Yes, you're right, better to be safe!