aboutsummaryrefslogtreecommitdiff
path: root/scripts/maintenance/readProbeSetSE_v7.py
diff options
context:
space:
mode:
authorBonfaceKilz2020-08-27 01:18:11 +0300
committerBonfaceKilz2020-08-27 01:42:41 +0300
commit357ca458695fbc60c97de3d1cdf89034a8722bc5 (patch)
tree54179a761cb25a871370d7a815eed97d5e0497df /scripts/maintenance/readProbeSetSE_v7.py
parent768de71f09b116cad0f42c792c22a7dc410ea2f4 (diff)
downloadgenenetwork2-357ca458695fbc60c97de3d1cdf89034a8722bc5.tar.gz
Replace "string.split" & "string.join" with python's inbuilt methods
Diffstat (limited to 'scripts/maintenance/readProbeSetSE_v7.py')
-rwxr-xr-xscripts/maintenance/readProbeSetSE_v7.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/maintenance/readProbeSetSE_v7.py b/scripts/maintenance/readProbeSetSE_v7.py
index 20a846a4..edd9e7b0 100755
--- a/scripts/maintenance/readProbeSetSE_v7.py
+++ b/scripts/maintenance/readProbeSetSE_v7.py
@@ -71,14 +71,14 @@ print('Checking if each line have same number of members')
GeneList = []
isCont = 1
header = fp.readline()
-header = string.split(string.strip(header), '\t')
+header = header.strip().split('\t')
header = list(map(string.strip, header))
nfield = len(header)
line = fp.readline()
kj = 0
while line:
- line2 = string.split(string.strip(line), '\t')
+ line2 = line.strip().split('\t')
line2 = list(map(string.strip, line2))
if len(line2) != nfield:
isCont = 0
@@ -109,7 +109,7 @@ print('Checking if each strain exist in database')
isCont = 1
fp.seek(0)
header = fp.readline()
-header = string.split(string.strip(header), '\t')
+header = header.strip().split('\t')
header = list(map(string.strip, header))
header = list(map(translateAlias, header))
header = header[dataStart:]
@@ -137,8 +137,8 @@ print('Check if each ProbeSet exist in database')
##---- find PID is name or target ----##
line = fp.readline()
line = fp.readline()
-line2 = string.split(string.strip(line), '\t')
-line2 = list(map(string.strip, line2))
+line2 = line.strip().split('\t')
+line2 = [x.strip() for x in line2]
PId = line2[0]
db.execute('select Id from ProbeSet where Name="%s" and ChipId=%d' %
@@ -217,8 +217,8 @@ line = fp.readline()
kj = 0
while line:
- line2 = string.split(string.strip(line), '\t')
- line2 = list(map(string.strip, line2))
+ line2 = line.strip().split('\t')
+ line2 = [x.strip() for x in line2]
CellId = line2[0]
if CellId not in ProbeNameId: