def check_mask(mask, options, pos):
    """
    Check the mask for a single postion. Return True if masked and False if ok. 
    """
    masked=False
    
    if mask:
        mask_chr=mask[options["chrom"]][pos-1].seq
        if mask_chr!="N" and int(mask_chr) < options["mask_value"]:
            masked=True
    return masked