import re


def checkFilename(filename):
    """
    Check if filename is in the SAMPLE_S{number}_R{1,2}_001.fastq.gz format
    """
    if re.match(r'.+_S\d+_R\d+_001.fastq.gz', filename):
        return True
    else:
        return False