From a56e5e9d5d0c3f157599677e937deb0bbb71debb Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Thu, 29 Oct 2020 01:23:22 +0300 Subject: Replace map on strip with a list comprehension that calls strip() * scripts/maintenance/readProbeSetSE_v7.py: In Python3 you can't map string.strip on a list of strings. Instead use a list comprehension and apply strip() on each element of the list. * wqflask/wqflask/marker_regression/plink_mapping.py: Ditto. * wqflask/wqflask/snp_browser/snp_browser.py: Ditto. --- scripts/maintenance/readProbeSetSE_v7.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/maintenance') diff --git a/scripts/maintenance/readProbeSetSE_v7.py b/scripts/maintenance/readProbeSetSE_v7.py index edd9e7b0..2cfe2e07 100755 --- a/scripts/maintenance/readProbeSetSE_v7.py +++ b/scripts/maintenance/readProbeSetSE_v7.py @@ -72,14 +72,14 @@ GeneList = [] isCont = 1 header = fp.readline() header = header.strip().split('\t') -header = list(map(string.strip, header)) +header = [item.strip() for item in header] nfield = len(header) line = fp.readline() kj = 0 while line: line2 = line.strip().split('\t') - line2 = list(map(string.strip, line2)) + line2 = [item.strip() for item in line2] if len(line2) != nfield: isCont = 0 print(("Error : " + line)) @@ -110,7 +110,7 @@ isCont = 1 fp.seek(0) header = fp.readline() header = header.strip().split('\t') -header = list(map(string.strip, header)) +header = [item.strip() for item in header] header = list(map(translateAlias, header)) header = header[dataStart:] Ids = [] -- cgit v1.2.3