Пример #1
0
 def test_cannot_transcribe_invalid_bases(self):
     print("\nBeginning Invalid Transcription Test.")
     coding = "aaaccctttnggg"
     with self.assertRaises(ValueError):
         helicase.transcribe(coding)
Пример #2
0
logging.basicConfig(level=logging.WARNING)

print("Loading from File:")
strands = helicase.load_strands_from_file("example.dna")
print(strands)

print("\nFraming:")
framed_strands = []
for strand in strands:
    framed_strands.append(helicase.frame_strand(strand))
print(framed_strands)

print("\nTranscription:")
transcribed_strands = []
for strand in strands:
    transcribed_strands.append(helicase.transcribe(strand))
print(transcribed_strands)

print("\nRNA Transcription:")
transcribed_rna_strands = []
for strand in strands:
    transcribed_rna_strands.append(helicase.transcribe_to_rna(strand))
print(transcribed_rna_strands)


print("\nTranslation:")
polypeptides = []
for strand in strands:
    polypeptides.append(helicase.represent_polypeptide(helicase.translate_unframed_strand(strand),helicase.IUPAC_3))
print(polypeptides)
Пример #3
0
 def test_transcription(self):
     print("\nBeginning Transcription Test.")
     coding =   "atcg"
     template = "tagc"
     self.assertEqual(template, helicase.transcribe(coding))