def isInPar(db, chrom, start, end):
    """ return None if not in PAR or "1" or "2" if genome is hg19 or hg38 and chrom:start-end is in a PAR1/2 region """
    if db not in ("hg19", "hg38"):
        return None
    if not chrom in ("chrX", "chrY"):
        return None

    # all coordinates are from https://en.wikipedia.org/wiki/Pseudoautosomal_region
    # and look like they're 1-based
    if db=="hg38":
        if chrom=="chrX":
            if start >= 10001 and end < 2781479:
                return "1"
            if start >= 155701383 and end < 156030895:
                return "2"
        elif chrom=="chrY":
            if start >= 10001 and end < 2781479:
                return "1"
            if start >= 56887903 and end < 57217415:
                return "2"
    elif db=="hg19":
        if chrom=="chrX":
            if start >= 60001 and end < 2699520:
                return "1"
            if start >= 154931044 and end < 155260560:
                return "2"
        elif chrom=="chrY":
            if start >= 10001 and end < 2649520:
                return "1"
            if start >= 59034050 and end < 59363566:
                return "2"

    return None