Skip to content

Commit

Permalink
Merge branch 'build-test'
Browse files Browse the repository at this point in the history
  • Loading branch information
choishingwan committed Mar 10, 2020
2 parents e960c6e + 3d86cec commit fa0951f
Show file tree
Hide file tree
Showing 20 changed files with 2,983 additions and 421 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required(VERSION 3.1)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
Expand All @@ -7,13 +7,19 @@ endif()
set(PROJECT_NAME PRSice)
project(${PROJECT_NAME})
set(CMAKE_CXX_FLAGS "-g -Wall")

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17)
if(COMPILER_SUPPORTS_CXX17)
message(STATUS "${COMPILER_SUPPORTS_CXX17}")
else(COMPILER_SUPPORTS_CXX17)
message(FATAL_ERROR "${COMPILER_SUPPORTS_CXX17}")
endif(COMPILER_SUPPORTS_CXX17)
option(march "Use --march." OFF)
if(march)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
endif()
# Use C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Require (at least) it
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Don't use e.g. GNU extension (like -std=gnu++11) for portability
Expand Down
8 changes: 4 additions & 4 deletions PRSice.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In_Regression <-
R2 <-
print.p <- R <- P <- value <- Phenotype <- Set <- PRS.R2 <- LCI <- UCI <- quant.ref <- NULL

r.version <- "2.2.12"
r.version <- "2.2.13"
# Help Messages --------------------------------------
help_message <-
"usage: Rscript PRSice.R [options] <-b base_file> <-t target_file> <--prsice prsice_location>\n
Expand Down Expand Up @@ -298,7 +298,7 @@ help_message <-
--keep-ambig Keep ambiguous SNPs. Only use this option\n
if you are certain that the base and target\n
has the same A1 and A2 alleles\n
--keep-ambig-as-is Will not flip ambiguous SNPs when they are kept.\n
--flip-ambig Force flipping of ambiguous SNPs when they are kept.\n
Will also set the --keep-ambig flag\n
--id-delim This parameter causes sample IDs to be parsed as\n
<FID><delimiter><IID>; the default delimiter\n
Expand Down Expand Up @@ -541,7 +541,7 @@ option_list <- list(
make_option(c("--id-delim"), type = "character"),
make_option(c("--logit-perm"), action = "store_true", dest = "logit_perm"),
make_option(c("--keep-ambig"), action = "store_true", dest = "keep_ambig"),
make_option(c("--keep-ambig-as-is"), action = "store_true", dest = "keep_ambig_as_is"),
make_option(c("--flip-ambig"), action = "store_true", dest = "flip_ambig"),
make_option(c("--memory"), type = "character", dest="memory"),
make_option(c("-o", "--out"), type = "character", default = "PRSice"),
make_option(c("--perm"), type = "numeric"),
Expand Down Expand Up @@ -691,7 +691,7 @@ flags <-
"ignore-fid",
"index",
"keep-ambig",
"keep-ambig-as-is",
"flip-ambig",
"logit-perm",
"no-clump",
"no-default",
Expand Down
1 change: 1 addition & 0 deletions Release/packing.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
rm *.zip
zip PRSice_linux.zip PRSice.R TOY* PRSice_linux
zip PRSice_mac.zip PRSice.R TOY* PRSice_mac
zip PRSice_win64.zip PRSice.R TOY* PRSice_win64.exe
Expand Down
12 changes: 5 additions & 7 deletions helpers/help_messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ m_help_message =
"usage: PRSice [options] <-b base_file> <-t target_file>\n"
// Base file
"\nBase File:\n"
" --A1 Column header containing allele 1 (effective allele)\n"
" --a1 Column header containing allele 1 (effective allele)\n"
" Default: A1\n"
" --A2 Column header containing allele 2 (non-effective allele)\n"
" --a2 Column header containing allele 2 (non-effective allele)\n"
" Default: A2\n"
" --base | -b Base association file\n"
" --base-info Base INFO score filtering. Format should be\n"
" <Column name>,<Threshold>. SNPs with info \n"
" <Column name>:<Threshold>. SNPs with info \n"
" score less than <Threshold> will be ignored\n"
" Column name default: INFO\n"
" Threshold default: 0.9\n"
" --base-maf Base MAF filtering. Format should be\n"
" <Column name>,<Threshold>. SNPs with maf\n"
" <Column name>:<Threshold>. SNPs with maf\n"
" less than <Threshold> will be ignored. An\n"
" additional column can also be added (e.g.\n"
" also filter MAF for cases), using the\n"
" following format:\n"
" <Column name>,<Threshold>:<Column name>,<Threshold>\n"
" <Column name>:<Threshold>,<Column name>:<Threshold>\n"
" --beta Whether the test statistic is in the form of \n"
" BETA or OR. If set, test statistic is assume\n"
" to be in the form of BETA. Mutually exclusive\n"
Expand Down Expand Up @@ -259,8 +259,6 @@ m_help_message =
" --keep-ambig Keep ambiguous SNPs. Only use this option\n"
" if you are certain that the base and target\n"
" has the same A1 and A2 alleles\n"
" --keep-ambig-as-is Will not flip ambiguous SNPs when they are kept.\n"
" Will also set the --keep-ambig flag\n"
" --logit-perm When performing permutation, still use logistic\n"
" regression instead of linear regression. This\n"
" will substantially slow down PRSice\n"
Expand Down
Loading

0 comments on commit fa0951f

Please sign in to comment.