17 lines
615 B
Python
17 lines
615 B
Python
|
from Bio.Seq import Seq
|
||
|
from Bio.SeqRecord import SeqRecord
|
||
|
from Bio import SeqIO
|
||
|
|
||
|
# Sekwencja do zapisania
|
||
|
sequence_str = "GTAGGTGAACCTGCGGAGGGATCATTACCGAGTTATACAACTCATCAACCCTGTGAACATACCTAAACGTTGCCTCGGCGGGAACAGACGGCCCCGTGAAACGGGCCGCCCCCGCCAGAGGA"
|
||
|
|
||
|
# Tworzenie obiektu SeqRecord, który przechowuje sekwencję i opis
|
||
|
seq_record = SeqRecord(Seq(sequence_str), id="Sample_2", description="Próbka 2 - ITS1")
|
||
|
|
||
|
# Zapis do pliku FASTA
|
||
|
with open("../data/sequence.fasta", "w") as output_handle:
|
||
|
SeqIO.write(seq_record, output_handle, "fasta")
|
||
|
|
||
|
print("Sekwencja zapisana do pliku 'sequence.fasta' w formacie FASTA.")
|
||
|
|