def map_gene_to_pos(x):
    """helper function to infer the gene based on nucleotide position of SARS-CoV-2 genome"""
    pos = x
    if pos <= 265:
        return '5UTR'
    elif pos > 265 and pos <= 13466:
        return 'ORF1a'
    elif pos > 13466 and pos <= 21555:
        return 'ORF1b'
    elif pos > 21562 and pos <= 25384:
        return 'S'
    elif pos > 25392 and pos <= 26220:
        return 'ORF3a'
    elif pos > 26244 and pos <= 26472:
        return 'E'
    elif pos > 26522 and pos <= 27191:
        return 'M'
    elif pos > 27201 and pos <= 27387:
        return 'ORF6'
    elif pos > 27393 and pos <= 27759:
        return 'ORF7a'
    elif pos > 27755 and pos <= 27887:
        return 'ORF7b'
    elif pos > 27893 and pos <= 28259:
        return 'ORF8'
    elif pos > 28273 and pos <= 29533:
        return 'N'
    elif pos > 29557 and pos <= 29674:
        return 'ORF10'
    elif pos > 29674:
        return '3UTR'
    return 'nan'