aboutsummaryrefslogtreecommitdiff
path: root/r_qtl/r_qtl2.py
diff options
context:
space:
mode:
Diffstat (limited to 'r_qtl/r_qtl2.py')
-rw-r--r--r_qtl/r_qtl2.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/r_qtl/r_qtl2.py b/r_qtl/r_qtl2.py
index 9127dce..c2828d2 100644
--- a/r_qtl/r_qtl2.py
+++ b/r_qtl/r_qtl2.py
@@ -12,6 +12,10 @@ from functional_tools import take, chain
from r_qtl.errors import InvalidFormat
+__FILE_TYPES__ = (
+ "geno", "founder_geno", "pheno", "covar", "phenocovar", "gmap", "pmap",
+ "phenose")
+
def control_data(zfile: ZipFile) -> dict:
"""Retrieve the control file from the zip file info."""
files = tuple(filename
@@ -29,9 +33,7 @@ def control_data(zfile: ZipFile) -> dict:
"comment.char": "#",
"sep": ",",
**{
- f"{key}_transposed": False for key in (
- "geno", "founder_geno", "pheno", "covar", "phenocovar", "gmap",
- "pmap", "phenose")
+ f"{key}_transposed": False for key in __FILE_TYPES__
},
**(json.loads(zfile.read(files[0]))
if files[0].endswith(".json")
@@ -297,9 +299,7 @@ def validate_bundle(zfile: ZipFile):
zfile.getinfo(inner)
try:
- for member in (key for key in cdata.keys() if key in (
- "geno", "founder_geno", "pheno", "covar", "phenocovar", "gmap",
- "pmap")):
+ for member in (key for key in cdata.keys() if key in __FILE_TYPES__):
__member_exists_p__(zfile, cdata[member])
if "file" in cdata.get("sex", {}):