hgvs.easyΒΆ

simplified imports for the hgvs package

hgvs.easy simplifies using the hgvs package by providing a single import path and objects that are instantiated with common defaults.

With default logging levels, using hgvs.easy is straightforward and requires no code changes:

>> from hgvs.easy import parser, projector
>> var_g = parser.parse("NC_000017.11:g.43091687delC")
>> projector.relevant_transcripts(var_g)
['NM_007294.3', 'NM_007297.3', 'NR_027676.1', 'NM_007298.3', 'NM_007299.3', 'NM_007300.3']
>> projector.g_to_t(var_g, "NM_007294.3")
SequenceVariant(ac=NM_007294.3, type=c, posedit=3844del)

hgvs.easy also introduces new functional forms for common methods. For example:

>> from hgvs.easy import parse, get_relevant_transcripts, g_to_t
>> var_g = parse("NC_000017.11:g.43091687delC")
>> get_relevant_transcripts(var_g)
['NM_007294.3', 'NM_007297.3', 'NR_027676.1', 'NM_007298.3', 'NM_007299.3', 'NM_007300.3']
>> g_to_t(var_g, "NM_007294.3")
SequenceVariant(ac=NM_007294.3, type=c, posedit=3844del)

NOTE: A consequence of making imports easy is a loss of configurability by the caller. The database connection is made with no arguments (i.e., connect()), so it honors the UTA_DB_URL and HGVS_SEQREPO_DIR environment variables but is otherwise not configurable by the caller.