def get_indices_from_sequence(seq, as_dict={}):
    """function which tries to find a pattern provided as dict of the form {643:'Q', 671:'L', 742:'Y', 744:'S', 795:'L'}
	in a sequence, the pattern does not have to start with zero !"""
    if as_dict == {}:
        print('as_idx must be supplied !!')
        exit()
    min_idx = min(as_dict.keys())
    zero_idx2as_dict = {}
    for index, AS in list(as_dict.items()):
        zero_idx2as_dict[index - min_idx] = AS
    index = 0
    for item in seq:
        if item == zero_idx2as_dict[0]:
            temp_dict = {}
            comp_dict = {}
            for key in zero_idx2as_dict:
                if index + key <= len(seq):
                    temp_dict[index + key] = seq[index + key]
                    comp_dict[key] = seq[index + key]
            if comp_dict == zero_idx2as_dict:
                print('Matching sequence pattern found:')
                print(temp_dict)
                return temp_dict
        index += 1
    print('Matching sequence pattern could not be found')
