summaryrefslogtreecommitdiff
path: root/client.py
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2014-06-07 22:31:42 +0300
committerYuval Adam <yuv.adm@gmail.com>2014-06-07 22:31:42 +0300
commit1694574137ac7ea4df149663d64e69a0fc68a592 (patch)
tree9ed9f66c5c05b537c7c10006962fe4834a8edcdd /client.py
parentf28d277126d971216a3c4cacc07fff4162721e80 (diff)
Initial client
Diffstat (limited to 'client.py')
-rw-r--r--client.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/client.py b/client.py
index e69de29..768d9b3 100644
--- a/client.py
+++ b/client.py
@@ -0,0 +1,19 @@
+from unipath import FSPath as Path
+
+DATA_DIR = Path(__file__).absolute().ancestor(1).child('data')
+
+sequences = {}
+
+with open(DATA_DIR.child('data.txt'), 'r') as f:
+ data = f.read()
+ sequence_data, composition_data = data.split('\n===\n')
+
+ for sequence in sequence_data.split('#')[1:]:
+ lines = sequence.split('\n')
+ name, sequence_data = lines[0].strip(), filter(lambda x: x != '', lines[1:]).split()
+ sequences[name] = sequence_data
+
+ composition = composition_data.split('\n')[1:]
+
+ print composition
+ print sequences