aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lmm.cpp13
-rw-r--r--src/param.cpp1
2 files changed, 9 insertions, 5 deletions
diff --git a/src/lmm.cpp b/src/lmm.cpp
index 54ab08e..aef9a0c 100644
--- a/src/lmm.cpp
+++ b/src/lmm.cpp
@@ -115,7 +115,7 @@ void LMM::WriteFiles() {
outfile << "se" << "\t";
}
- if (a_mode != M_LMM3)
+ if (a_mode != M_LMM3 && a_mode != M_LMM9)
outfile << "logl_H1" << "\t";
switch(a_mode) {
@@ -124,6 +124,7 @@ void LMM::WriteFiles() {
<< "p_wald" << endl;
break;
case M_LMM2:
+ case M_LMM9:
outfile << "l_mle" << "\t"
<< "p_lrt" << endl;
break;
@@ -148,7 +149,7 @@ void LMM::WriteFiles() {
outfile << st.se << "\t";
}
- if (a_mode != M_LMM3)
+ if (a_mode != M_LMM3 && a_mode != M_LMM9)
outfile << st.logl_H1 << "\t";
switch(a_mode) {
@@ -157,6 +158,7 @@ void LMM::WriteFiles() {
<< st.p_wald << endl;
break;
case M_LMM2:
+ case M_LMM9:
outfile << st.lambda_mle << "\t"
<< st.p_lrt << endl;
break;
@@ -174,6 +176,7 @@ void LMM::WriteFiles() {
};
+
if (!file_gene.empty()) {
outfile << "geneID" << "\t";
@@ -1527,17 +1530,17 @@ void LMM::Analyze(std::function< SnpNameValues(size_t) >& fetch_snp,
double logl_H1 = 0.0;
// 3 is before 1.
- if (a_mode == 3 || a_mode == 4) {
+ if (a_mode == M_LMM3 || a_mode == M_LMM4 || a_mode == M_LMM9 ) {
CalcRLScore(l_mle_null, param1, beta, se, p_score);
}
- if (a_mode == 1 || a_mode == 4) {
+ if (a_mode == M_LMM1 || a_mode == M_LMM4) {
// for univariate a_mode is 1
CalcLambda('R', param1, l_min, l_max, n_region, lambda_remle, logl_H1);
CalcRLWald(lambda_remle, param1, beta, se, p_wald);
}
- if (a_mode == 2 || a_mode == 4) {
+ if (a_mode == M_LMM2 || a_mode == M_LMM9 || a_mode == M_LMM4) {
CalcLambda('L', param1, l_min, l_max, n_region, lambda_mle, logl_H1);
p_lrt = gsl_cdf_chisq_Q(2.0 * (logl_H1 - logl_mle_H0), 1);
}
diff --git a/src/param.cpp b/src/param.cpp
index db6d8d5..5f2871e 100644
--- a/src/param.cpp
+++ b/src/param.cpp
@@ -510,6 +510,7 @@ void PARAM::CheckParam(void) {
error = true;
}
if (a_mode != 1 && a_mode != 2 && a_mode != 3 && a_mode != 4 && a_mode != 5 &&
+ a_mode != M_LMM9 &&
a_mode != 11 && a_mode != 12 && a_mode != 13 && a_mode != 14 &&
a_mode != 15 && a_mode != 21 && a_mode != 22 && a_mode != 25 &&
a_mode != 26 && a_mode != 27 && a_mode != 28 && a_mode != 31 &&