Skip to content

Commit 484e77a

Browse files
Update .gitignore to exclude sequences.json and modify main.py to load sequences from sequences.json instead of sequences.py, enhancing sequence management and flexibility.
1 parent 79f32da commit 484e77a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ sequences.aln
99
sequences.fasta
1010
sequences.docx
1111
start.bat
12-
sequences.py
12+
sequences.json

main.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import json
2+
13
import os.path
24
import sys
35

@@ -224,9 +226,9 @@ def num_sequences():
224226

225227

226228
if __name__ == "__main__":
227-
# change sequence in sequences.py file. create if not exists.
228-
import sequences as sequences_module
229-
sequences = sequences_module.sequences
229+
# change sequence in sequences.json file. create if it does not exists.
230+
# in json file: change this if you want to have other DNA sequences. add as many as you like in the following syntax: {"Name for sequence": "sequence", "Name for sequence": "sequence", ...}
231+
sequences = json.load(open("sequences.json"))
230232

231233
# skipping generation of DNA alignment if sequence is unchanged
232234
path_hash = ".sequencehash"

0 commit comments

Comments
 (0)