summaryrefslogtreecommitdiff
path: root/wk6/pset/dna/dna.py
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-05-06 06:51:29 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-05-06 06:51:29 +0000
commit1007603cd53c466b7bf48020b2cb395f60e9365a (patch)
treea9df65f1f2f54e424f98c9161e4fe6133b6e1615 /wk6/pset/dna/dna.py
parent59473b1611c4d81771dd96d24dbc4a501d60ffea (diff)
Sun, May 5, 2024, 11:51 PM -07:00
Diffstat (limited to 'wk6/pset/dna/dna.py')
-rw-r--r--wk6/pset/dna/dna.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/wk6/pset/dna/dna.py b/wk6/pset/dna/dna.py
index 3199f73..b6955f7 100644
--- a/wk6/pset/dna/dna.py
+++ b/wk6/pset/dna/dna.py
@@ -18,16 +18,17 @@ def main():
# return
# TODO: Read database file into a variable
+ database = 'databases/' + sys.argv[1]
rows = []
- with open(sys.argv[1]) as file:
+ with open(database) as file:
reader = csv.DictReader(file)
for row in reader:
rows.append(row)
# TODO: Read DNA sequence file into a variable
- database = 'databases/' + sys.argv[2]
+ text = 'sequences/' + sys.argv[2]
sequence = ''
- with open(database) as file:
+ with open(text) as file:
sequence = sequence.join(file.readlines())
# TODO: Find longest match of each STR in DNA sequence