From 14d0a6649f6ecbb374a24f37efcd3a73982cf4c2 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 26 Aug 2021 19:00:12 +0000 Subject: Added # permutations to verbose print --- scripts/rqtl_wrapper.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/rqtl_wrapper.R b/scripts/rqtl_wrapper.R index f7e0406..f6788c5 100644 --- a/scripts/rqtl_wrapper.R +++ b/scripts/rqtl_wrapper.R @@ -195,18 +195,18 @@ if (opt$nperm > 0) { if (!is.null(opt$addcovar) || !is.null(opt$control)){ if (!is.null(opt$pstrata)) { - verbose_print('Running permutations with cofactors and strata\n') + verbose_print('Running ', opt$nperm, ' permutations with cofactors and strata\n') perm_results = scanone(cross_object, pheno.col=1, addcovar=covars, n.perm=opt$nperm, perm.strata=perm_strata, model=opt$model, method=opt$method) } else { - verbose_print('Running permutations with cofactors\n') + verbose_print('Running ', opt$nperm, ' permutations with cofactors\n') perm_results = scanone(cross_object, pheno.col=1, addcovar=covars, n.perm=opt$nperm, model=opt$model, method=opt$method) } } else { if (!is.null(opt$pstrata)) { - verbose_print('Running permutations with strata\n') + verbose_print('Running ', opt$nperm, ' permutations with strata\n') perm_results = scanone(cross_object, pheno.col=1, n.perm=opt$nperm, perm.strata=perm_strata, model=opt$model, method=opt$method) } else { - verbose_print('Running permutations\n') + verbose_print('Running ', opt$nperm, ' permutations\n') perm_results = scanone(cross_object, pheno.col=1, n.perm=opt$nperm, model=opt$model, method=opt$method) } } -- cgit v1.2.3 From 79d19f4ce5cdce7f78128e8d7321dfa701e1d04b Mon Sep 17 00:00:00 2001 From: zsloan Date: Sat, 28 Aug 2021 00:47:39 +0000 Subject: Fix issue that caused R/qtl to not use the first covariate when using stratified permutations + covariates --- scripts/rqtl_wrapper.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rqtl_wrapper.R b/scripts/rqtl_wrapper.R index f6788c5..7518175 100644 --- a/scripts/rqtl_wrapper.R +++ b/scripts/rqtl_wrapper.R @@ -167,7 +167,7 @@ if (!is.null(opt$addcovar)) { if (!is.null(opt$pstrata)) { covar_names = trait_names[3:length(trait_names) - 1] } else { - covar_names = trait_names[3:length(trait_names)] + covar_names = trait_names[2:length(trait_names)] } covars <- pull.pheno(cross_object, covar_names) } -- cgit v1.2.3 From 396aed0ca760bc3073abee634d56d141525af1f0 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sat, 28 Aug 2021 09:09:17 +0200 Subject: Add explanation of using a guix profile --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index c3a9848..66c780d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,30 @@ and try again. See also instructions in [.guix.scm](.guix.scm). +#### Using a Guix profile (or rolling back) + +Create a new profile with + +``` +env GUIX_PACKAGE_PATH=~/guix-bioinformatics/ ~/.config/guix/current/bin/guix package -i genenetwork3 -p ~/opt/genenetwork3 +``` + +and load the profile settings with + +``` +source ~/opt/genenetwork3/etc/profile +start server... +``` + +Note that GN2 profiles include the GN3 profile (!). To roll genenetwork3 back you can use either in the same fashion (probably best to start a new shell first) + +``` +bash +source ~/opt/genenetwork2-older-version/etc/profile +set|grep store +run tests, server etc... +``` + #### Running Tests (assuming you are in a guix container; otherwise use venv!) -- cgit v1.2.3 From 2cf220a11936125f059dc9b6a494d0f70eac068d Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sat, 28 Aug 2021 09:17:22 +0200 Subject: README: updated install instructions --- README.md | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 66c780d..750f55d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,17 @@ GeneNetwork3 REST API for data science and machine learning ## Installation -#### Using guix +#### GNU Guix packages + +Install GNU Guix - this can be done on every running Linux system. + +There are at least three ways to start GeneNetwork3 with GNU Guix: + +1. Create an environment with `guix environment` +2. Create a container with `guix environment -C` +3. Use a profile and shell settings with `source ~/opt/genenetwork3/etc/profile` + +#### Create an environment: Simply load up the environment (for development purposes): @@ -19,23 +29,12 @@ python3 import redis ``` -Better run a proper container +#### Run a Guix container ``` env GUIX_PACKAGE_PATH=~/guix-bioinformatics/ ~/.config/guix/current/bin/guix environment -C --network --load=guix.scm ``` -If you get a Guix error, such as `ice-9/boot-9.scm:1669:16: In procedure raise-exception: -error: python-sqlalchemy-stubs: unbound variable` it typically means an update to guix latest is required (i.e., guix pull): - -``` -guix pull -source ~/.config/guix/current/etc/profile -``` - -and try again. - -See also instructions in [.guix.scm](.guix.scm). #### Using a Guix profile (or rolling back) @@ -61,7 +60,21 @@ set|grep store run tests, server etc... ``` -#### Running Tests +#### Troubleshooting Guix packages + +If you get a Guix error, such as `ice-9/boot-9.scm:1669:16: In procedure raise-exception: +error: python-sqlalchemy-stubs: unbound variable` it typically means an update to guix latest is required (i.e., guix pull): + +``` +guix pull +source ~/.config/guix/current/etc/profile +``` + +and try again. Also make sure your ~/guix-bioinformatics is up to date. + +See also instructions in [.guix.scm](.guix.scm). + +## Running Tests (assuming you are in a guix container; otherwise use venv!) @@ -83,7 +96,7 @@ Running mypy(type-checker): mypy . ``` -#### Running the flask app +## Running the GN3 web service To spin up the server on its own (for development): @@ -112,7 +125,7 @@ And for the scalable production version run gunicorn --bind 0.0.0.0:8080 --workers 8 --keep-alive 6000 --max-requests 10 --max-requests-jitter 5 --timeout 1200 wsgi:app ``` -##### Using python-pip +## Using python-pip IMPORTANT NOTE: we do not recommend using pip tools, use Guix instead -- cgit v1.2.3