From 20be011f8b33fcde94037af19e403d3b76d5c9d1 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Fri, 13 Sep 2013 14:29:18 -0500 Subject: Added file that will convert genofiles to plink ped/map files --- wqflask/wqflask/my_pylmm/data/geno_to_ped.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 wqflask/wqflask/my_pylmm/data/geno_to_ped.py (limited to 'wqflask') 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 -- cgit v1.2.3