aboutsummaryrefslogtreecommitdiff
path: root/scripts/maintenance
diff options
context:
space:
mode:
authorBonfaceKilz2020-08-19 02:00:11 +0300
committerBonfaceKilz2020-08-19 02:33:46 +0300
commit06edbb8455f1e85a3818c33c4ef4d42e6a061d43 (patch)
tree2ed7a576394f46e93512815cb6b02951ac64a58e /scripts/maintenance
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')
-rwxr-xr-xscripts/maintenance/QTL_Reaper_v6.py2
-rwxr-xr-xscripts/maintenance/readProbeSetMean_v7.py16
-rwxr-xr-xscripts/maintenance/readProbeSetSE_v7.py16
3 files changed, 17 insertions, 17 deletions
diff --git a/scripts/maintenance/QTL_Reaper_v6.py b/scripts/maintenance/QTL_Reaper_v6.py
index 7fb56eca..2fbeb53b 100755
--- a/scripts/maintenance/QTL_Reaper_v6.py
+++ b/scripts/maintenance/QTL_Reaper_v6.py
@@ -23,7 +23,7 @@ for item in results:
ProbeSetFreezeIds=sys.argv[1:]
if ProbeSetFreezeIds:
#####convert the Ids to integer
- ProbeSetFreezeIds=map(int, ProbeSetFreezeIds)
+ ProbeSetFreezeIds=list(map(int, ProbeSetFreezeIds))
else:
#####get all of the dataset that need be updated
diff --git a/scripts/maintenance/readProbeSetMean_v7.py b/scripts/maintenance/readProbeSetMean_v7.py
index fea26731..97767715 100755
--- a/scripts/maintenance/readProbeSetMean_v7.py
+++ b/scripts/maintenance/readProbeSetMean_v7.py
@@ -61,14 +61,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:
print(("Error : " + line))
isCont = 0
@@ -80,7 +80,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:
@@ -100,8 +100,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:
@@ -128,7 +128,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' % (PId, GeneChipId) )
@@ -148,7 +148,7 @@ for item in results:
print(Names)
-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 --#
@@ -223,7 +223,7 @@ values1 = []
values2 = []
while line:
line2 = string.split(string.strip(line),'\t')
- line2 = map(string.strip, line2)
+ line2 = list(map(string.strip, line2))
PId = line2[0]
recordId = NameIds[PId]
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):