import re


def is_fastq_file(args, file_name):
    """Check if this a FASTQ file."""
    if args.get('fasta'):
        return False
    if args.get('fastq'):
        return True

    parts = file_name.lower().split('.')
    index = -2 if re.search(r'[zp2]$', parts[-1]) and len(parts) > 2 else -1
    return parts[index].startswith('f') and parts[index].endswith('q')