record.features
This commit is contained in:
parent
787f19edb4
commit
da06cb4ca6
40
gfp2.py
40
gfp2.py
|
@ -81,6 +81,42 @@ for feature in record.features:
|
||||||
#%%
|
#%%
|
||||||
|
|
||||||
|
|
||||||
|
#%%
|
||||||
|
|
||||||
|
# Przejdź przez wszystkie funkcje w rekordzie i wypisz ich szczegółowe informacje
|
||||||
|
for feature in record.features:
|
||||||
|
if feature.type in ["promoter", "RBS","CDS", "protein_bind", "misc_feature", "rep_origin"]:
|
||||||
|
print(f"Type: {feature.type}")
|
||||||
|
print(f"Location: {feature.location}")
|
||||||
|
print(f"Strand: {'+' if feature.strand == 1 else '-'}")
|
||||||
|
|
||||||
|
# Szczegółowe opisy
|
||||||
|
if feature.type == "CDS":
|
||||||
|
gene_name = feature.qualifiers.get('gene', ['Unknown gene'])[0]
|
||||||
|
product = feature.qualifiers.get('product', ['Unknown product'])[0]
|
||||||
|
print(f"Gene Name: {gene_name}")
|
||||||
|
print(f"Product: {product}")
|
||||||
|
elif feature.type == "protein_bind":
|
||||||
|
binding_site = feature.qualifiers.get('bound_moiety', ['Unknown binding site'])[0]
|
||||||
|
print(f"Binding Site: {binding_site}")
|
||||||
|
elif feature.type == "misc_feature":
|
||||||
|
note = feature.qualifiers.get('note', ['No additional information'])[0]
|
||||||
|
print(f"Note: {note}")
|
||||||
|
elif feature.type == "rep_origin":
|
||||||
|
print("This is a replication origin.")
|
||||||
|
|
||||||
|
# Pobierz sekwencję funkcji
|
||||||
|
feature_seq = record.seq[feature.location.start:feature.location.end]
|
||||||
|
|
||||||
|
|
||||||
|
print(f"Sequence ( ): {feature_seq}\n")
|
||||||
|
# Uwzględnij orientację nici (strand)
|
||||||
|
if feature.strand == -1:
|
||||||
|
feature_seq = feature_seq.reverse_complement()
|
||||||
|
print(f"Sequence (^): {feature_seq}\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Znajdź i wyświetl sekwencję terminatora T7
|
# Znajdź i wyświetl sekwencję terminatora T7
|
||||||
for feature in record.features:
|
for feature in record.features:
|
||||||
if feature.type == "terminator" and "T7" in feature.qualifiers.get('note', [''])[0]:
|
if feature.type == "terminator" and "T7" in feature.qualifiers.get('note', [''])[0]:
|
||||||
|
@ -108,9 +144,11 @@ for feature in record.features:
|
||||||
if feature.strand == -1:
|
if feature.strand == -1:
|
||||||
terminator_seq = terminator_seq.reverse_complement()
|
terminator_seq = terminator_seq.reverse_complement()
|
||||||
|
|
||||||
print(f"Sequence: {terminator_seq}")
|
print(f"(+) Sequence: {terminator_seq}")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
#%%
|
||||||
|
|
||||||
|
|
||||||
#%%
|
#%%
|
||||||
t=record[25:73].seq
|
t=record[25:73].seq
|
||||||
|
|
Loading…
Reference in New Issue