commit 0bf9fa9bd895af8a864ffc079d01879145be93b9 Author: email Date: Thu Nov 7 12:10:09 2024 +0100 init add seq2fasta diff --git a/cmd/seq2fasta.py b/cmd/seq2fasta.py new file mode 100644 index 0000000..9840c10 --- /dev/null +++ b/cmd/seq2fasta.py @@ -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.") + diff --git a/data/sequence.fasta b/data/sequence.fasta new file mode 100644 index 0000000..2723380 --- /dev/null +++ b/data/sequence.fasta @@ -0,0 +1,4 @@ +>Sample_2 Próbka 2 - ITS1 +GTAGGTGAACCTGCGGAGGGATCATTACCGAGTTATACAACTCATCAACCCTGTGAACAT +ACCTAAACGTTGCCTCGGCGGGAACAGACGGCCCCGTGAAACGGGCCGCCCCCGCCAGAG +GA diff --git a/doc/main.tex b/doc/main.tex new file mode 100644 index 0000000..e69de29