aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/maintenance/delete_genotypes.py2
-rwxr-xr-xscripts/maintenance/load_phenotypes.py10
-rw-r--r--wqflask/wqflask/collect.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/scripts/maintenance/delete_genotypes.py b/scripts/maintenance/delete_genotypes.py
index 060640e1..b7f83758 100755
--- a/scripts/maintenance/delete_genotypes.py
+++ b/scripts/maintenance/delete_genotypes.py
@@ -18,7 +18,7 @@ def main(argv):
# datafile
datafile = open(config.get('config', 'datafile'), 'r')
datafile = csv.reader(datafile, delimiter='\t', quotechar='"')
- datafile.next()
+ next(datafile)
delrowcount = 0
for row in datafile:
if len(row) == 0:
diff --git a/scripts/maintenance/load_phenotypes.py b/scripts/maintenance/load_phenotypes.py
index 61d527d4..759d2eec 100755
--- a/scripts/maintenance/load_phenotypes.py
+++ b/scripts/maintenance/load_phenotypes.py
@@ -22,22 +22,22 @@ def main(argv):
# datafile
datafile = open(config.get('config', 'datafile'), 'r')
phenotypedata = csv.reader(datafile, delimiter='\t', quotechar='"')
- phenotypedata_head = phenotypedata.next()
+ phenotypedata_head = next(phenotypedata)
print(("phenotypedata head:\n\t%s" % phenotypedata_head))
strainnames = phenotypedata_head[1:]
strains = datastructure.get_strains_bynames(inbredsetid=inbredsetid, strainnames=strainnames, updatestrainxref="yes")
# metafile
metafile = open(config.get('config', 'metafile'), 'r')
phenotypemeta = csv.reader(metafile, delimiter='\t', quotechar='"')
- phenotypemeta_head = phenotypemeta.next()
+ phenotypemeta_head = next(phenotypemeta)
print(("phenotypemeta head:\n\t%s" % phenotypemeta_head))
print()
# load
for metarow in phenotypemeta:
#
- datarow_value = phenotypedata.next()
- datarow_se = phenotypedata.next()
- datarow_n = phenotypedata.next()
+ datarow_value = next(phenotypedata)
+ datarow_se = next(phenotypedata)
+ datarow_n = next(phenotypedata)
# Phenotype
sql = """
INSERT INTO Phenotype
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py
index 42a09fed..4c6e38e6 100644
--- a/wqflask/wqflask/collect.py
+++ b/wqflask/wqflask/collect.py
@@ -193,7 +193,7 @@ def view_collection():
params = request.args
uc_id = params['uc_id']
- uc = (collection for collection in g.user_session.user_collections if collection["id"] == uc_id).next()
+ uc = next((collection for collection in g.user_session.user_collections if collection["id"] == uc_id))
traits = uc["members"]
trait_obs = []