22 lines
744 B
Python
22 lines
744 B
Python
|
from Bio.Seq import Seq
|
||
|
from Bio.SeqRecord import SeqRecord
|
||
|
from Bio import SeqIO
|
||
|
|
||
|
# Sekwencje starterów
|
||
|
primer_ITS1 = "TCCGTAGGTGAACCTGCGG"
|
||
|
primer_ITS4 = "TCCTCCGCTTATTGATATGC"
|
||
|
|
||
|
# Tworzenie obiektów SeqRecord dla starterów
|
||
|
its1_record = SeqRecord(Seq(primer_ITS1), id="ITS1", description="ITS1 primer sequence")
|
||
|
its4_record = SeqRecord(Seq(primer_ITS4), id="ITS4", description="ITS4 primer sequence")
|
||
|
|
||
|
# Zapis do plików FASTA w katalogu ../data
|
||
|
with open("../data/ITS1.fasta", "w") as its1_file:
|
||
|
SeqIO.write(its1_record, its1_file, "fasta")
|
||
|
|
||
|
with open("../data/ITS4.fasta", "w") as its4_file:
|
||
|
SeqIO.write(its4_record, its4_file, "fasta")
|
||
|
|
||
|
print("Sekwencje starterów zapisano do plików ../data/ITS1.fasta i ../data/ITS4.fasta.")
|
||
|
|