def _align_with_substrings(self, chains_to_skip = set()):
        '''Simple substring-based matching'''
        for c in self.representative_chains:
            if c not in chains_to_skip:
                fasta_sequence = self.fasta[c]
                substring_matches = {}
                for uniparc_id, uniparc_sequence in sorted(self.uniparc_sequences.iteritems()):
                    uniparc_sequence = str(uniparc_sequence)
                    idx = uniparc_sequence.find(fasta_sequence)
                    if idx != -1:
                        substring_matches[uniparc_id] = 0
                    elif len(fasta_sequence) > 30:
                        idx = uniparc_sequence.find(fasta_sequence[5:-5])
                        if idx != -1:
                            substring_matches[uniparc_id] = 5
                        else:
                            idx = uniparc_sequence.find(fasta_sequence[7:-7])
                            if idx != -1:
                                substring_matches[uniparc_id] = 7
                    elif len(fasta_sequence) > 15:
                        idx = uniparc_sequence.find(fasta_sequence[3:-3])
                        if idx != -1:
                            substring_matches[uniparc_id] = 3
                self.substring_matches[c] = substring_matches
        colortext.pcyan('*' * 100)
        pprint.pprint(self.substring_matches)
        if self.restrict_to_uniparc_values:
            for c in self.representative_chains:
                if set(map(str, self.substring_matches[c].keys())).intersection(set(self.restrict_to_uniparc_values)) > 0:
                    restricted_matches = dict((str(k), self.substring_matches[c][k]) for k in self.substring_matches[c].keys() if str(k) in self.restrict_to_uniparc_values)
                    if len(restricted_matches) != len(self.substring_matches[c]):
                        removed_matches = sorted(set(self.substring_matches[c].keys()).difference(set(restricted_matches)))
                    self.substring_matches[c] = restricted_matches
        for c_1, related_chains in self.equivalence_fiber.iteritems():
            for c_2 in related_chains:
                self.substring_matches[c_2] = self.substring_matches[c_1]