about summary refs log tree commit diff
path: root/scripts/maintenance
diff options
context:
space:
mode:
authorBonfaceKilz2020-08-19 03:45:49 +0300
committerBonfaceKilz2020-08-19 03:45:49 +0300
commit3aaa28ea762c496eeb84e09e45194e3fd2a51673 (patch)
treea572b34f4237fefd02eaba12bbe1aeac74d77497 /scripts/maintenance
parent9d5dff44fb4d07f926659dde0c6205bf12a1ca5b (diff)
downloadgenenetwork2-3aaa28ea762c496eeb84e09e45194e3fd2a51673.tar.gz
Make Python more idiomatic
Run `2to3-3.8 -f idioms -w .`

See: <https://docs.python.org/2/library/2to3.html#2to3fixer-idioms>
Diffstat (limited to 'scripts/maintenance')
-rwxr-xr-xscripts/maintenance/readProbeSetMean_v7.py6
-rwxr-xr-xscripts/maintenance/readProbeSetSE_v7.py6
2 files changed, 4 insertions, 8 deletions
diff --git a/scripts/maintenance/readProbeSetMean_v7.py b/scripts/maintenance/readProbeSetMean_v7.py
index 97767715..864b4e08 100755
--- a/scripts/maintenance/readProbeSetMean_v7.py
+++ b/scripts/maintenance/readProbeSetMean_v7.py
@@ -80,8 +80,7 @@ while line:
 	if kj%100000 == 0:
 		print(('checked ',kj,' lines'))
 
-GeneList = list(map(string.lower, GeneList))
-GeneList.sort()
+GeneList = sorted(map(string.lower, GeneList))
 	
 if isCont==0:
 	sys.exit(0)
@@ -148,9 +147,8 @@ for item in results:
 	
 print(Names)
 
-Names = list(map(string.lower, Names))
+Names = sorted(map(string.lower, Names))
 
-Names.sort() # -- Fixed the lower case problem of ProbeSets affx-mur_b2_at  doesn't exist --#
 
 
 ##---- compare genelist with names ----##
diff --git a/scripts/maintenance/readProbeSetSE_v7.py b/scripts/maintenance/readProbeSetSE_v7.py
index 833c3f5f..20a846a4 100755
--- a/scripts/maintenance/readProbeSetSE_v7.py
+++ b/scripts/maintenance/readProbeSetSE_v7.py
@@ -91,8 +91,7 @@ while line:
     if kj % 100000 == 0:
         print(('checked ', kj, ' lines'))
 
-GeneList = list(map(string.lower, GeneList))
-GeneList.sort()
+GeneList = sorted(map(string.lower, GeneList))
 
 if isCont == 0:
     sys.exit(0)
@@ -158,8 +157,7 @@ results = db.fetchall()
 Names = []
 for item in results:
     Names.append(item[0])
-    Names = list(map(string.lower, Names))
-    Names.sort()  # -- Fixed the lower case problem of ProbeSets affx-mur_b2_at  doesn't exist --#
+    Names = sorted(map(string.lower, Names))
 
 ##---- compare genelist with names ----##
 x = y = 0