def get_samp_con():
    """
     get sample naming  convention
    """
    samp_con, Z = '', ''
    while samp_con == '':
        samp_con = input(
            """
        Sample naming convention:
            [1] XXXXY: where XXXX is an arbitrary length site designation and Y
                is the single character sample designation.  e.g., TG001a is the
                first sample from site TG001.    [default]
            [2] XXXX-YY: YY sample from site XXXX (XXX, YY of arbitrary length)
            [3] XXXX.YY: YY sample from site XXXX (XXX, YY of arbitrary length)
            [4-Z] XXXX[YYY]:  YYY is sample designation with Z characters from site XXX
            [5] site name same as sample
            [6] site is entered under a separate column
            [7-Z] [XXXX]YYY:  XXXX is site designation with Z characters with sample name XXXXYYYY
            NB: all others you will have to customize your self
                 or e-mail ltauxe@ucsd.edu for help.
            select one:
"""
            )
        if samp_con == '' or samp_con == '1':
            samp_con, Z = '1', 1
        if '4' in samp_con:
            if '-' not in samp_con:
                print('option [4] must be in form 4-Z where Z is an integer')
                samp_con = ''
            else:
                Z = samp_con.split('-')[1]
                samp_con = '4'
        if '7' in samp_con:
            if '-' not in samp_con:
                print('option [7] must be in form 7-Z where Z is an integer')
                samp_con = ''
            else:
                Z = samp_con.split('-')[1]
                samp_con = '7'
        if samp_con.isdigit() == False or int(samp_con) > 7:
            print('Try again\n ')
            samp_con = ''
    return samp_con, Z
