blob: 9159fd7fdb23a1f02a42c4faecc751484c6958bd (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
import utilities
import datastructure
import genotypes
import probesets
import calculate
"""
For: Rob, GeneNetwork
Date: 2014-02-04
Function:
For BXD group, fetch probesets with given locus (mapping info).
locus="rs3663871"
"""
def bxd_probesets_locus(locus, inbredsetid):
#
file = open('probesets_%s.txt' % (locus), 'w+')
file.write("GN Dataset ID\t")
file.write("Dataset Full Name\t")
file.write("ProbeSet Name\t")
file.write("Symbol\t")
file.write("ProbeSet Description\t")
file.write("Probe Target Description\t")
file.write("ProbeSet Chr\t")
file.write("ProbeSet Mb\t")
file.write("Mean\t")
file.write("LRS\t")
file.write("Geno Chr\t")
file.write("Geno Mb\t")
file.write("\n")
file.flush()
#
results = probesets.get_normalized_probeset(locus=locus, inbredsetid=inbredsetid)
for row in results:
file.write("%s\t" % (row[0]))
file.write("%s\t" % (utilities.clearspaces(row[2], default='')))
file.write("%s\t" % (utilities.clearspaces(row[3], default='')))
file.write("%s\t" % (utilities.clearspaces(row[4], default='')))
file.write("%s\t" % (utilities.clearspaces(row[5], default='')))
file.write("%s\t" % (utilities.clearspaces(row[6], default='')))
file.write("%s\t" % (utilities.clearspaces(row[7], default='')))
file.write("%s\t" % (row[8]))
file.write("%s\t" % (row[9]))
file.write("%s\t" % (row[10]))
file.write("%s\t" % (utilities.clearspaces(row[11], default='')))
file.write("%s\t" % (row[12]))
file.write('\n')
file.flush()
file.close()
locus='rs3663871'
inbredsetid=1
bxd_probesets_locus(locus=locus, inbredsetid=inbredsetid)
|