def _check_sequence_accuracy(self, wild_type_residue, position, dna_sequence, start_site): print "position is:", position start = ((int(position) * 3) + int(start_site)) - 3 stop = start + 3 residue = BioModules.dna2protein(dna_sequence[start:stop]) print "residue is: ", residue print "what i think the residue is: ", wild_type_residue
def get_protein_sequence(self): for i in range(len(self.dna_sequences)): for sequence in self.dna_sequences[i]: self.protein_sequences.append(BioModules.dna2protein(sequence[1][100:-100])) seq_list = [] for gene, sequence in zip(self.genes, self.protein_sequences): seq_list.append((gene, sequence)) self._write_fasta(seq_list)