about summary refs log tree commit diff
path: root/src/gemma_io.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gemma_io.cpp')
-rw-r--r--src/gemma_io.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/gemma_io.cpp b/src/gemma_io.cpp
index 08f25ca..e183e3f 100644
--- a/src/gemma_io.cpp
+++ b/src/gemma_io.cpp
@@ -651,37 +651,6 @@ bool ReadFile_fam(const string &file_fam, vector<vector<int>> &indicator_pheno,
   return true;
 }
 
-#include <tuple>
-
-std::tuple<size_t, size_t, size_t> compute_ratio(size_t ni_total, const gsl_vector *gs) {
-  size_t n_0 = 0;
-  size_t n_1 = 0;
-  size_t n_2 = 0;
-  for (size_t i = 0; i < ni_total; ++i) { // read genotypes
-    double geno = gsl_vector_get(gs, i);
-    if (geno >= 0 && geno <= 0.5) {
-      n_0++;
-    }
-    if (geno > 0.5 && geno < 1.5) {
-      n_1++;
-    }
-    if (geno >= 1.5 && geno <= 2.0) {
-      n_2++;
-    }
-  }
-  return {n_0,n_1,n_2};
-}
-
-double compute_maf(size_t ni_total, size_t ni_test, size_t n_miss, const gsl_vector *gs) {
-  double maf = 0.0;
-
-  for (size_t i = 0; i < ni_total; ++i) { // read genotypes
-    double geno = gsl_vector_get(gs, i);
-    maf += geno;
-  }
-  maf /= 2.0 * (double)(ni_test - n_miss);
-  return maf;
-}
 
 // Read bimbam mean genotype file, the first time, to obtain #SNPs for
 // analysis (ns_test) and total #SNP (ns_total).