-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathRcppExports.cpp
More file actions
125 lines (119 loc) · 7.81 KB
/
RcppExports.cpp
File metadata and controls
125 lines (119 loc) · 7.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif
// compute_LD_gcta_cpp
arma::mat compute_LD_gcta_cpp(const Rcpp::NumericMatrix& X, int ncpus);
RcppExport SEXP _pecotmr_compute_LD_gcta_cpp(SEXP XSEXP, SEXP ncpusSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type X(XSEXP);
Rcpp::traits::input_parameter< int >::type ncpus(ncpusSEXP);
rcpp_result_gen = Rcpp::wrap(compute_LD_gcta_cpp(X, ncpus));
return rcpp_result_gen;
END_RCPP
}
// dentist_iterative_impute
List dentist_iterative_impute(const arma::mat& LD_mat, size_t nSample, const arma::vec& zScore, double pValueThreshold, float propSVD, bool gcControl, int nIter, double gPvalueThreshold, int ncpus, bool correct_chen_et_al_bug, bool verbose);
RcppExport SEXP _pecotmr_dentist_iterative_impute(SEXP LD_matSEXP, SEXP nSampleSEXP, SEXP zScoreSEXP, SEXP pValueThresholdSEXP, SEXP propSVDSEXP, SEXP gcControlSEXP, SEXP nIterSEXP, SEXP gPvalueThresholdSEXP, SEXP ncpusSEXP, SEXP correct_chen_et_al_bugSEXP, SEXP verboseSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::mat& >::type LD_mat(LD_matSEXP);
Rcpp::traits::input_parameter< size_t >::type nSample(nSampleSEXP);
Rcpp::traits::input_parameter< const arma::vec& >::type zScore(zScoreSEXP);
Rcpp::traits::input_parameter< double >::type pValueThreshold(pValueThresholdSEXP);
Rcpp::traits::input_parameter< float >::type propSVD(propSVDSEXP);
Rcpp::traits::input_parameter< bool >::type gcControl(gcControlSEXP);
Rcpp::traits::input_parameter< int >::type nIter(nIterSEXP);
Rcpp::traits::input_parameter< double >::type gPvalueThreshold(gPvalueThresholdSEXP);
Rcpp::traits::input_parameter< int >::type ncpus(ncpusSEXP);
Rcpp::traits::input_parameter< bool >::type correct_chen_et_al_bug(correct_chen_et_al_bugSEXP);
Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
rcpp_result_gen = Rcpp::wrap(dentist_iterative_impute(LD_mat, nSample, zScore, pValueThreshold, propSVD, gcControl, nIter, gPvalueThreshold, ncpus, correct_chen_et_al_bug, verbose));
return rcpp_result_gen;
END_RCPP
}
// prs_cs_rcpp
Rcpp::List prs_cs_rcpp(double a, double b, Rcpp::Nullable<double> phi, Rcpp::NumericVector bhat, Rcpp::Nullable<Rcpp::NumericVector> maf, int n, Rcpp::List ld_blk, int n_iter, int n_burnin, int thin, bool verbose, Rcpp::Nullable<unsigned int> seed);
RcppExport SEXP _pecotmr_prs_cs_rcpp(SEXP aSEXP, SEXP bSEXP, SEXP phiSEXP, SEXP bhatSEXP, SEXP mafSEXP, SEXP nSEXP, SEXP ld_blkSEXP, SEXP n_iterSEXP, SEXP n_burninSEXP, SEXP thinSEXP, SEXP verboseSEXP, SEXP seedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< double >::type a(aSEXP);
Rcpp::traits::input_parameter< double >::type b(bSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable<double> >::type phi(phiSEXP);
Rcpp::traits::input_parameter< Rcpp::NumericVector >::type bhat(bhatSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::NumericVector> >::type maf(mafSEXP);
Rcpp::traits::input_parameter< int >::type n(nSEXP);
Rcpp::traits::input_parameter< Rcpp::List >::type ld_blk(ld_blkSEXP);
Rcpp::traits::input_parameter< int >::type n_iter(n_iterSEXP);
Rcpp::traits::input_parameter< int >::type n_burnin(n_burninSEXP);
Rcpp::traits::input_parameter< int >::type thin(thinSEXP);
Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable<unsigned int> >::type seed(seedSEXP);
rcpp_result_gen = Rcpp::wrap(prs_cs_rcpp(a, b, phi, bhat, maf, n, ld_blk, n_iter, n_burnin, thin, verbose, seed));
return rcpp_result_gen;
END_RCPP
}
// qtl_enrichment_rcpp
Rcpp::List qtl_enrichment_rcpp(SEXP r_gwas_pip, SEXP r_qtl_susie_fit, double pi_gwas, double pi_qtl, int ImpN, double shrinkage_lambda, int num_threads);
RcppExport SEXP _pecotmr_qtl_enrichment_rcpp(SEXP r_gwas_pipSEXP, SEXP r_qtl_susie_fitSEXP, SEXP pi_gwasSEXP, SEXP pi_qtlSEXP, SEXP ImpNSEXP, SEXP shrinkage_lambdaSEXP, SEXP num_threadsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< SEXP >::type r_gwas_pip(r_gwas_pipSEXP);
Rcpp::traits::input_parameter< SEXP >::type r_qtl_susie_fit(r_qtl_susie_fitSEXP);
Rcpp::traits::input_parameter< double >::type pi_gwas(pi_gwasSEXP);
Rcpp::traits::input_parameter< double >::type pi_qtl(pi_qtlSEXP);
Rcpp::traits::input_parameter< int >::type ImpN(ImpNSEXP);
Rcpp::traits::input_parameter< double >::type shrinkage_lambda(shrinkage_lambdaSEXP);
Rcpp::traits::input_parameter< int >::type num_threads(num_threadsSEXP);
rcpp_result_gen = Rcpp::wrap(qtl_enrichment_rcpp(r_gwas_pip, r_qtl_susie_fit, pi_gwas, pi_qtl, ImpN, shrinkage_lambda, num_threads));
return rcpp_result_gen;
END_RCPP
}
// sdpr_rcpp
Rcpp::List sdpr_rcpp(const std::vector<double>& bhat, const Rcpp::List& LD, int n, Rcpp::Nullable<Rcpp::NumericVector> per_variant_sample_size, Rcpp::Nullable<Rcpp::IntegerVector> array, double a, double c, size_t M, double a0k, double b0k, int iter, int burn, int thin, unsigned n_threads, int opt_llk, bool verbose);
RcppExport SEXP _pecotmr_sdpr_rcpp(SEXP bhatSEXP, SEXP LDSEXP, SEXP nSEXP, SEXP per_variant_sample_sizeSEXP, SEXP arraySEXP, SEXP aSEXP, SEXP cSEXP, SEXP MSEXP, SEXP a0kSEXP, SEXP b0kSEXP, SEXP iterSEXP, SEXP burnSEXP, SEXP thinSEXP, SEXP n_threadsSEXP, SEXP opt_llkSEXP, SEXP verboseSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const std::vector<double>& >::type bhat(bhatSEXP);
Rcpp::traits::input_parameter< const Rcpp::List& >::type LD(LDSEXP);
Rcpp::traits::input_parameter< int >::type n(nSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::NumericVector> >::type per_variant_sample_size(per_variant_sample_sizeSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type array(arraySEXP);
Rcpp::traits::input_parameter< double >::type a(aSEXP);
Rcpp::traits::input_parameter< double >::type c(cSEXP);
Rcpp::traits::input_parameter< size_t >::type M(MSEXP);
Rcpp::traits::input_parameter< double >::type a0k(a0kSEXP);
Rcpp::traits::input_parameter< double >::type b0k(b0kSEXP);
Rcpp::traits::input_parameter< int >::type iter(iterSEXP);
Rcpp::traits::input_parameter< int >::type burn(burnSEXP);
Rcpp::traits::input_parameter< int >::type thin(thinSEXP);
Rcpp::traits::input_parameter< unsigned >::type n_threads(n_threadsSEXP);
Rcpp::traits::input_parameter< int >::type opt_llk(opt_llkSEXP);
Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
rcpp_result_gen = Rcpp::wrap(sdpr_rcpp(bhat, LD, n, per_variant_sample_size, array, a, c, M, a0k, b0k, iter, burn, thin, n_threads, opt_llk, verbose));
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_pecotmr_compute_LD_gcta_cpp", (DL_FUNC) &_pecotmr_compute_LD_gcta_cpp, 2},
{"_pecotmr_dentist_iterative_impute", (DL_FUNC) &_pecotmr_dentist_iterative_impute, 11},
{"_pecotmr_prs_cs_rcpp", (DL_FUNC) &_pecotmr_prs_cs_rcpp, 12},
{"_pecotmr_qtl_enrichment_rcpp", (DL_FUNC) &_pecotmr_qtl_enrichment_rcpp, 7},
{"_pecotmr_sdpr_rcpp", (DL_FUNC) &_pecotmr_sdpr_rcpp, 16},
{NULL, NULL, 0}
};
RcppExport void R_init_pecotmr(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}