Skip to content

Commit

Permalink
v1.5.3 Merge pull request #16 from hmgu-itg/step2-dev
Browse files Browse the repository at this point in the history
v1.5.3
  • Loading branch information
youngchanpark committed Aug 11, 2021
2 parents 7a02780 + 06dc4bd commit f716941
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ From: ubuntu:18.04
perl -MCPAN -e 'foreach (@ARGV) { CPAN::Shell->rematein("notest", "install", $_) }' Module::Build DBI Try::Tiny JSON Data::Dumper File::Basename Getopt::Long Data::Types File::Path

cd /usr/local/bin
git clone --depth 1 --branch v1.5.2 https://github.com/hmgu-itg/burden_testing
git clone --depth 1 --branch v1.5.3 https://github.com/hmgu-itg/burden_testing

cd /usr/local/bin
mkdir UCSC.tools
Expand Down Expand Up @@ -81,7 +81,7 @@ From: ubuntu:18.04

%labels
Author Arthur Gilly, Andrei Barysenka, Daniel Suveges, Young-Chan Park
Version v1.5.2
Version v1.5.3

%help
This container allows you to run rare variant aggregation tests using MONSTER and SMMAT; for more information run this container with the help command line option.
Expand Down
8 changes: 4 additions & 4 deletions step2
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ check_args=function(args, parser){
}
}

run_SMMAT = function(cohort_prefix, matrix_prefix, GDFList, phenofile, group_file, matrix_type="GCTA", fam_file=NULL, nthread = 1, outfile=NA){
run_SMMAT = function(cohort_prefix, matrix_prefix, GDFList, phenofile, group_file, matrix_type="GCTA", fam_file=NULL, nthread = 1, outfile=NA, method_optim="AI"){
grm=NULL
grm.mat=NULL
if(matrix_type=="GCTA"){
Expand Down Expand Up @@ -90,7 +90,7 @@ run_SMMAT = function(cohort_prefix, matrix_prefix, GDFList, phenofile, group_fil
pheno=pheno[,(phenoname) := mean(.SD[[1]]), by=id, .SDcols=phenoname]
}
cat("[INFO] Fitting Null model.\n")
model0=glmmkin(as.formula(paste(colnames(pheno)[2], "~ 1")), data=pheno, id="id", family= gaussian(link = "identity"), kins=grm.mat)
model0=glmmkin(as.formula(paste(colnames(pheno)[2], "~ 1")), data=pheno, id="id", family= gaussian(link = "identity"), kins=grm.mat, method.optim=method_optim)
cat("[INFO] Done. Fitting alternative model.\n")

if(nthread>1){
Expand Down Expand Up @@ -139,7 +139,7 @@ p = add_argument(p, "--group-file", "SMMAT group file as xxprovided by the analy
p = add_argument(p, "--fam-file", "[optional] fam file for GEMMA matrices.", type="character")
p = add_argument(p, "--threads", "[optional] Number of parallel threads.", default=1, type="integer")
p = add_argument(p, "--out", "[optional] Output file. If not set, [cohort].[trait].out will be used.", type="character")

p = add_argument(p, "--method-optim", "[optional] Optimisation method for running GLMM", default = "AI", type="character")
args=parse_args(p, argv = commandArgs(trailingOnly = TRUE))
check_args(args, p)

Expand All @@ -151,7 +151,7 @@ if(is.na(args$out)){
outfn=args$out
}

ret=run_SMMAT(cohort_prefix=args$cohort_name, matrix_prefix=args$matrix_prefix, GDFList=args$GDS, pheno=args$pheno, group_file=args$group_file, matrix_type=args$matrix_type, fam_file=args$fam_file, nthread=args$threads, outfile=outfn)
ret=run_SMMAT(cohort_prefix=args$cohort_name, matrix_prefix=args$matrix_prefix, GDFList=args$GDS, pheno=args$pheno, group_file=args$group_file, matrix_type=args$matrix_type, fam_file=args$fam_file, nthread=args$threads, outfile=outfn, method_optim=args$method_optim)
cat("[INFO] Done. Writing output.\n")


Expand Down

0 comments on commit f716941

Please sign in to comment.