aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Sloan2013-09-13 14:29:18 -0500
committerZachary Sloan2013-09-13 14:29:18 -0500
commit20be011f8b33fcde94037af19e403d3b76d5c9d1 (patch)
tree382b8b524ad948980a66e8ce6af747d331d8e708
parentc5fc931621707865357ace4b637db7481e0be552 (diff)
downloadgenenetwork2-20be011f8b33fcde94037af19e403d3b76d5c9d1.tar.gz
Added file that will convert genofiles to plink ped/map files
-rw-r--r--wqflask/wqflask/my_pylmm/data/geno_to_ped.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/wqflask/wqflask/my_pylmm/data/geno_to_ped.py b/wqflask/wqflask/my_pylmm/data/geno_to_ped.py
new file mode 100644
index 00000000..9091ad9a
--- /dev/null
+++ b/wqflask/wqflask/my_pylmm/data/geno_to_ped.py
@@ -0,0 +1,22 @@
+from __future__ import absolute_import, division, print_function
+
+import csv
+
+class ConvertToPed(object):
+
+ def __init__(self, input_file, output_file):
+ self.input_file = input_file
+ self.output_file = output_file
+
+ def convert(self):
+
+ self.haplotype_notation = {
+ '@mat': "1",
+ '@pat': "0",
+ '@het': "0.5",
+ '@unk': "NA"
+ }
+
+ with open(self.output_file, "w") as self.output_fh:
+ self.process_csv()
+ \ No newline at end of file