aboutsummaryrefslogtreecommitdiff
path: root/scripts/maintenance/readProbeSetSE_v7.py
diff options
context:
space:
mode:
authorBonfaceKilz2020-08-19 02:00:11 +0300
committerBonfaceKilz2020-08-19 02:33:46 +0300
commit06edbb8455f1e85a3818c33c4ef4d42e6a061d43 (patch)
tree2ed7a576394f46e93512815cb6b02951ac64a58e /scripts/maintenance/readProbeSetSE_v7.py
parent4e10f4bd8fb902810ee033abb8d509ab641308e1 (diff)
downloadgenenetwork2-06edbb8455f1e85a3818c33c4ef4d42e6a061d43.tar.gz
Wrap `map()` in a `list` call
Run `2to3-3.8 -f map -w .` See: <https://docs.python.org/2/library/2to3.html#2to3fixer-map>
Diffstat (limited to 'scripts/maintenance/readProbeSetSE_v7.py')
-rwxr-xr-xscripts/maintenance/readProbeSetSE_v7.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/maintenance/readProbeSetSE_v7.py b/scripts/maintenance/readProbeSetSE_v7.py
index 79ed455f..7b2fee87 100755
--- a/scripts/maintenance/readProbeSetSE_v7.py
+++ b/scripts/maintenance/readProbeSetSE_v7.py
@@ -72,14 +72,14 @@ GeneList = []
isCont = 1
header = fp.readline()
header = string.split(string.strip(header), '\t')
-header = map(string.strip, header)
+header = list(map(string.strip, header))
nfield = len(header)
line = fp.readline()
kj = 0
while line:
line2 = string.split(string.strip(line), '\t')
- line2 = map(string.strip, line2)
+ line2 = list(map(string.strip, line2))
if len(line2) != nfield:
isCont = 0
print(("Error : " + line))
@@ -91,7 +91,7 @@ while line:
if kj % 100000 == 0:
print(('checked ', kj, ' lines'))
-GeneList = map(string.lower, GeneList)
+GeneList = list(map(string.lower, GeneList))
GeneList.sort()
if isCont == 0:
@@ -111,8 +111,8 @@ isCont = 1
fp.seek(0)
header = fp.readline()
header = string.split(string.strip(header), '\t')
-header = map(string.strip, header)
-header = map(translateAlias, header)
+header = list(map(string.strip, header))
+header = list(map(translateAlias, header))
header = header[dataStart:]
Ids = []
for item in header:
@@ -139,7 +139,7 @@ print('Check if each ProbeSet exist in database')
line = fp.readline()
line = fp.readline()
line2 = string.split(string.strip(line), '\t')
-line2 = map(string.strip, line2)
+line2 = list(map(string.strip, line2))
PId = line2[0]
db.execute('select Id from ProbeSet where Name="%s" and ChipId=%d' %
@@ -158,7 +158,7 @@ results = db.fetchall()
Names = []
for item in results:
Names.append(item[0])
- Names = map(string.lower, Names)
+ Names = list(map(string.lower, Names))
Names.sort() # -- Fixed the lower case problem of ProbeSets affx-mur_b2_at doesn't exist --#
##---- compare genelist with names ----##
@@ -220,7 +220,7 @@ line = fp.readline()
kj = 0
while line:
line2 = string.split(string.strip(line), '\t')
- line2 = map(string.strip, line2)
+ line2 = list(map(string.strip, line2))
CellId = line2[0]
if not ProbeNameId.has_key(CellId):