diff options
author | Frederick Muriuki Muriithi | 2024-01-10 08:00:25 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-01-10 08:02:52 +0300 |
commit | a4313e2cc0f8548946186838a4ce67e358e46bbe (patch) | |
tree | e59e844775ec8992b8bbecb78bc291e8bf25079e /r_qtl/r_qtl2.py | |
parent | 0d0b284a76bee863b97c46e8275cd62e02552a93 (diff) | |
download | gn-uploader-a4313e2cc0f8548946186838a4ce67e358e46bbe.tar.gz |
Provide convenience functions to avoid subtle call errors
Diffstat (limited to 'r_qtl/r_qtl2.py')
-rw-r--r-- | r_qtl/r_qtl2.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/r_qtl/r_qtl2.py b/r_qtl/r_qtl2.py index d8231bb..b2a7acf 100644 --- a/r_qtl/r_qtl2.py +++ b/r_qtl/r_qtl2.py @@ -289,3 +289,8 @@ def validate_bundle(zfile: ZipFile): __member_exists_p__(zfile, cdata["cross_info"]["file"]) except KeyError as kerr: raise InvalidFormat(*kerr.args) from kerr + +def genotype_data(zfile: ZipFile): + """Convenience function to genotype data from R/qtl2 bundle.""" + cdata = control_data(zfile) + return file_data(zfile, "geno", cdata, *make_process_data_geno(cdata)) |