aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance/get_group_samplelists.py
diff options
context:
space:
mode:
authorzsloan2021-04-30 18:40:13 +0000
committerzsloan2021-04-30 18:40:13 +0000
commit21b2e2a552b8b6bedb789263543a4d6d039ac8a9 (patch)
treefe55511b99a522198c1b840909d7b91c9b45ab22 /wqflask/maintenance/get_group_samplelists.py
parent699b952c7bda5426f3f3e947454f656a4ec7538b (diff)
parent799b25481fffc97e2adb07004adf502096bf371c (diff)
downloadgenenetwork2-21b2e2a552b8b6bedb789263543a4d6d039ac8a9.tar.gz
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into testing
Diffstat (limited to 'wqflask/maintenance/get_group_samplelists.py')
-rw-r--r--wqflask/maintenance/get_group_samplelists.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/wqflask/maintenance/get_group_samplelists.py b/wqflask/maintenance/get_group_samplelists.py
index 3f9d0278..0a450d3f 100644
--- a/wqflask/maintenance/get_group_samplelists.py
+++ b/wqflask/maintenance/get_group_samplelists.py
@@ -4,12 +4,14 @@ import gzip
from base import webqtlConfig
+
def get_samplelist(file_type, geno_file):
if file_type == "geno":
return get_samplelist_from_geno(geno_file)
elif file_type == "plink":
return get_samplelist_from_plink(geno_file)
+
def get_samplelist_from_geno(genofilename):
if os.path.isfile(genofilename + '.gz'):
genofilename += '.gz'
@@ -33,6 +35,7 @@ def get_samplelist_from_geno(genofilename):
samplelist = headers[3:]
return samplelist
+
def get_samplelist_from_plink(genofilename):
genofile = open(genofilename)