def containedSequences(inputFile):
    lookup = dict()
    prev = ''
    for (header, seq) in fastaRead(inputFile):
        if ('|1|' not in header):
            assert (len(lookup) == 0)
            return None
        else:
            idx = header.find('|1|')
            name = header[:idx]
            offset = header[(idx + 3):]
            if (offset.isdigit() == False):
                assert (len(lookup) == 0)
                return None
            if (int(offset) == 0):
                assert (lookup.has_key(name) == False)
                lookup[name] = (len(seq), False)
            elif (lookup.has_key(name) == True):
                lookup[name] = (max(lookup[name][0], (int(offset) + len(seq))), lookup[name][1])
            if ((name != prev) and lookup.has_key(prev)):
                lookup[prev] = (lookup[prev][0], True)
            prev = name
    return lookup
def containedSequences(inputFile):
    lookup = dict()
    prev = 
    for (header, seq) in fastaRead(inputFile):
        if ('|1|' not in header):
            assert (len(lookup) == 0)
            return None
        else:
            idx = header.find('|1|')
            name = header[:idx]
            offset = header[(idx + 3):]
            if (offset.isdigit() == False):
                assert (len(lookup) == 0)
                return None
            if (int(offset) == 0):
                assert (lookup.has_key(name) == False)
                lookup[name] = (len(seq), False)
            elif (lookup.has_key(name) == True):
                lookup[name] = (max(lookup[name][0], (int(offset) + len(seq))), lookup[name][1])
            if ((name != prev) and lookup.has_key(prev)):
                lookup[prev] = (lookup[prev][0], True)
            prev = name
    return lookup