about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maintenance/delete_genotypes.py2
-rwxr-xr-xscripts/maintenance/load_phenotypes.py10
2 files changed, 6 insertions, 6 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