import glob
import click


def locate_file_by_seq(seq, tag, ext):
    """find file matching current sequence number"""
    m = glob.glob('*_*_{}{}{}'.format(seq, tag, ext))
    if not m:
        click.echo("no file with sequence {} found!".format(seq))
        return
    if len(m) > 1:
        click.echo("found more than 1 file with seq {}: {}".format(seq, len(m)))
        return
    return m[0]