diff --git a/gfp2.py b/gfp2.py index 4ee80d7..836974c 100644 --- a/gfp2.py +++ b/gfp2.py @@ -79,7 +79,43 @@ for feature in record.features: print(f"Product: {feature.qualifiers['product']}") print() #%% - + + +#%% + +# 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 for feature in record.features: @@ -108,9 +144,11 @@ for feature in record.features: if feature.strand == -1: terminator_seq = terminator_seq.reverse_complement() - print(f"Sequence: {terminator_seq}") + print(f"(+) Sequence: {terminator_seq}") print() +#%% + #%% t=record[25:73].seq