annotate get_reads/read_file.py @ 85:6b7429975fde draft

Uploaded
author tyty
date Fri, 19 Dec 2014 13:22:06 -0500
parents 297cdb01d656
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
297cdb01d656 Uploaded
tyty
parents:
diff changeset
1 #!/usr/bin/env python
297cdb01d656 Uploaded
tyty
parents:
diff changeset
2 # -*- coding: utf-8 -*-
297cdb01d656 Uploaded
tyty
parents:
diff changeset
3
297cdb01d656 Uploaded
tyty
parents:
diff changeset
4 import sys
297cdb01d656 Uploaded
tyty
parents:
diff changeset
5
297cdb01d656 Uploaded
tyty
parents:
diff changeset
6
297cdb01d656 Uploaded
tyty
parents:
diff changeset
7
297cdb01d656 Uploaded
tyty
parents:
diff changeset
8 def read_t_file(in_file):
297cdb01d656 Uploaded
tyty
parents:
diff changeset
9 f = open(in_file);
297cdb01d656 Uploaded
tyty
parents:
diff changeset
10 result = [];
297cdb01d656 Uploaded
tyty
parents:
diff changeset
11 for aline in f.readlines():
297cdb01d656 Uploaded
tyty
parents:
diff changeset
12 temp = [];
297cdb01d656 Uploaded
tyty
parents:
diff changeset
13 tline = aline.strip();
297cdb01d656 Uploaded
tyty
parents:
diff changeset
14 tl = tline.split('\t');
297cdb01d656 Uploaded
tyty
parents:
diff changeset
15 for i in range(0, len(tl)):
297cdb01d656 Uploaded
tyty
parents:
diff changeset
16 temp.append(tl[i].strip());
297cdb01d656 Uploaded
tyty
parents:
diff changeset
17 result.append(temp);
297cdb01d656 Uploaded
tyty
parents:
diff changeset
18 f.close();
297cdb01d656 Uploaded
tyty
parents:
diff changeset
19 return result;
297cdb01d656 Uploaded
tyty
parents:
diff changeset
20
297cdb01d656 Uploaded
tyty
parents:
diff changeset
21