diff options
author | zsloan | 2020-12-18 14:53:01 -0600 |
---|---|---|
committer | zsloan | 2020-12-18 14:53:01 -0600 |
commit | 453ac34383d54910e821609b80b69ff41c48d0ce (patch) | |
tree | 9dae1a144c1e670cad9c494e31cb3195d609eefd | |
parent | 03de3751bd003117dce2bc4bf085092bd8f9a0fe (diff) | |
download | genenetwork2-453ac34383d54910e821609b80b69ff41c48d0ce.tar.gz |
Added Additive Effect when using LOCO with GEMMA
-rw-r--r-- | wqflask/wqflask/marker_regression/gemma_mapping.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py index 630a3afa..ab3a7278 100644 --- a/wqflask/wqflask/marker_regression/gemma_mapping.py +++ b/wqflask/wqflask/marker_regression/gemma_mapping.py @@ -54,7 +54,7 @@ def run_gemma(this_trait, this_dataset, samples, vals, covariates, use_loco, maf TEMPDIR, trait_filename) if covariates != "": - gemma_command += ' -c %s/%s_covariates.txt -a %s/%s_snps.txt -lmm 2 -maf %s > %s/gn2/%s.json' % (flat_files('mapping'), + gemma_command += ' -c %s/%s_covariates.txt -a %s/%s_snps.txt -lmm 9 -maf %s > %s/gn2/%s.json' % (flat_files('mapping'), this_dataset.group.name, flat_files('genotype/bimbam'), genofile_name, @@ -62,7 +62,7 @@ def run_gemma(this_trait, this_dataset, samples, vals, covariates, use_loco, maf TEMPDIR, gwa_output_filename) else: - gemma_command += ' -a %s/%s_snps.txt -lmm 2 -maf %s > %s/gn2/%s.json' % (flat_files('genotype/bimbam'), + gemma_command += ' -a %s/%s_snps.txt -lmm 9 -maf %s > %s/gn2/%s.json' % (flat_files('genotype/bimbam'), genofile_name, maf, TEMPDIR, @@ -184,11 +184,8 @@ def parse_loco_output(this_dataset, gwa_output_filename, loco="True"): else: marker['chr'] = line.split("\t")[0] marker['Mb'] = float(line.split("\t")[2]) / 1000000 - if loco == "True": - marker['p_value'] = float(line.split("\t")[9]) - else: - marker['p_value'] = float(line.split("\t")[10]) - marker['additive'] = float(line.split("\t")[7]) + marker['p_value'] = float(line.split("\t")[10]) + marker['additive'] = float(line.split("\t")[7]) if math.isnan(marker['p_value']) or (marker['p_value'] <= 0): marker['lod_score'] = 0 #marker['lrs_value'] = 0 |