WARNING: MutationInfo is based in outdated packages (read more) and its development has been stalled. Some thoughts on a second and redesigned version exist. Stay tuned!
MutationInfo is a python package to extract the position, the reference and the alternative sequence of a genomic variant. It accepts variants in dbSNP rs format or in HGVS format.
The main purpose of MutationInfo is to simplify the process of locating a variant in a dataset (i.e. of sequences or variants) that is aligned in a human reference genome (for example hg19 or hg38). It mainly wraps a collection of existing tools with a simple interface.
Example:
from MutationInfo import MutationInfo
mi = MutationInfo()
mi.get_info('rs53576')
{'chrom': '3', 'source': 'UCSC', 'genome': 'hg19',
'offset': 8804371L, 'alt': 'G', 'ref': 'A'}
mi.get_info('NM_006446.4:c.1198T>G')
{'chrom': '12', 'source': 'NC_transcript', 'genome': 'GRCh37.p13',
'offset': 21355487, 'alt': 'G', 'ref': 'T'}
The documentation is here: http://mutationinfo.readthedocs.io/en/latest/
MIT License (MIT)