def expand_nucleotides(self):
s = list(self.seq)<EOL>for i in range(len(s)):<EOL><INDENT>if s[i] in redundant_nts:<EOL><INDENT>s[i] = '<STR_LIT>'.join(redundant_nts[s[i]])<EOL><DEDENT><DEDENT>seqs = []<EOL>for x in itertools.product(*s):<EOL><INDENT>seqs.append(Fasta(self.id + '<STR_LIT:.>' + str(len(seqs) + <NUM_LIT:1>), '<STR_LIT>'.join(x)))<EOL><DEDENT>return seqs<EOL>
Assumes sequence is nucleotides. Returns list of all combinations of redundant nucleotides. e.g. R is A or G, so CRT would have combinations CAT and CGT