commit
0bf9fa9bd8
|
@ -0,0 +1,16 @@
|
|||
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.")
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
>Sample_2 Próbka 2 - ITS1
|
||||
GTAGGTGAACCTGCGGAGGGATCATTACCGAGTTATACAACTCATCAACCCTGTGAACAT
|
||||
ACCTAAACGTTGCCTCGGCGGGAACAGACGGCCCCGTGAAACGGGCCGCCCCCGCCAGAG
|
||||
GA
|
Loading…
Reference in New Issue