aboutsummaryrefslogtreecommitdiff
path: root/scripts/rqtl2
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-04-03 15:31:26 +0300
committerFrederick Muriuki Muriithi2024-04-03 15:31:26 +0300
commite3e75ae0e866d3571612b4b769ae5214bf8daf67 (patch)
tree84400f0e7fffee52319d804e2fb310e6af211caa /scripts/rqtl2
parent60fde66e02dba842b20fa126ff3b2ed9ec2638e6 (diff)
downloadgn-uploader-e3e75ae0e866d3571612b4b769ae5214bf8daf67.tar.gz
Reduce size of data inserted per query
Reduce the size of data inserted per query since MariDB allows a packet with a maximum size of 1GB. This should hopefully resolve the …OperationalError: (2006, 'Server has gone away') error.
Diffstat (limited to 'scripts/rqtl2')
-rw-r--r--scripts/rqtl2/install_genotypes.py2
-rw-r--r--scripts/rqtl2/install_phenos.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/rqtl2/install_genotypes.py b/scripts/rqtl2/install_genotypes.py
index 709fe0f..d0731a2 100644
--- a/scripts/rqtl2/install_genotypes.py
+++ b/scripts/rqtl2/install_genotypes.py
@@ -176,7 +176,7 @@ def install_genotypes(#pylint: disable=[too-many-arguments, too-many-locals]
cdata = rqtl2.control_data(zfile)
genotypes = rqtl2.genotype_data(zfile)
while True:
- batch = tuple(take(genotypes, 5000))
+ batch = tuple(take(genotypes, 1000))
if len(batch) == 0:
logger.info("Loading Genotypes complete!")
logger.info(
diff --git a/scripts/rqtl2/install_phenos.py b/scripts/rqtl2/install_phenos.py
index 95745d7..b5cab8e 100644
--- a/scripts/rqtl2/install_phenos.py
+++ b/scripts/rqtl2/install_phenos.py
@@ -111,7 +111,7 @@ def install_pheno_files(#pylint: disable=[too-many-arguments, too-many-locals]
phenorows = 0
datarows = 0
while True:
- batch = tuple(take(phenodata, 5000))
+ batch = tuple(take(phenodata, 1000))
if len(batch) == 0:
logger.info("pheno data loading complete!")
logger.info("Inserted a total of %s new ProbeSets and %s "