Begun writing illumina data to ftsv converter.

This commit is contained in:
Einar Ryeng 2010-09-24 15:18:52 +00:00
parent b6d1eb022e
commit 3d68d27a56

View File

@ -0,0 +1,45 @@
#!/usr/bin/python
import getopt
import sys
from laydi import dataset
def parse_options():
s_opts = ""
l_opts = []
options, params = getopt.getopt(sys.argv[1:], s_opts, l_opts)
return params
def read_illumina_file(fn):
fd = open(fn)
line = fd.readline()
if line != "Illumina Inc. GenomeStudio version 1.7.0":
raise Exception("File cannot be recognized as Illumina textual data")
headers = {}
line= fd.readline()
while line.strip() != "":
key, val = line.split("=", 1)
headers[key.strip()] = val.strip()
line = fd.readline()
col_headers = fd.readline().split('\t')
values = []
line = fd.readline()
while line != "":
values.append[x.strip() for x in line.split('\t')
probe_col = col_headers.find("ProbeID")
if __name__ == '__main__':
fn = params[0]
read_illumina_file(fn)