simple DNA complement.func

This commit is contained in:
mpabi 2024-06-12 14:02:41 +02:00
parent 9ad74c1745
commit 787f19edb4
1 changed files with 21 additions and 7 deletions

26
gfp2.py
View File

@ -115,24 +115,38 @@ for feature in record.features:
#%%
t=record[25:73].seq
#%%
a = str (t)
#%%
class Rev:
class Model:
def __init__ (self, seq=None):
self.seq = seq
def rev (self):
pass
def complement_dna(self):
# Tworzenie słownika komplementarnych zasad
complement = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
# Tworzenie komplementarnej sekwencji
complementary_sequence = ''.join(complement[base] for base in self.seq)
return complementary_sequence
#%%
r = Rev(a)
r = Model(a)
#%%
r.seq
#%%
r.seq[::-1]
#%%
r.complement_dna()
#%%
# Sekwencja DNA
dna_seq = record.seq