Skip to content

Commit

Permalink
deleted print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
fboehm committed Apr 16, 2022
1 parent fb54a36 commit 1b03372
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
10 changes: 0 additions & 10 deletions scr/calc_asymptotic_variance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,33 +159,23 @@ std::vector<std::string> readTestBim(string test_bim){

vector <POS> makePosObjectForTestBim(std::vector<std::string> base_nums, vector <POS> inter){
vector <POS> result;
cout << "inter.size() is: " << inter.size() << endl;
cout << "base_nums.size() is: " << base_nums.size() << endl;
for (int j = 0; j < inter.size(); j++){
for (int i = 0; i < base_nums.size(); i++){
if (stol(base_nums[i]) == inter[j].ps){
//result[j] = inter[j]; IS THIS LINE ACCEPTABLE???
cout << "we've a match!!!" <<endl;
// change index value!!
POS foo;
foo.pos = i;
cout << "i is: " << i << endl;
foo.a1 = inter[j].a1;
foo.maf = inter[j].maf;
foo.P = inter[j].P;
foo.ps = inter[j].ps;
foo.snp = inter[j].snp;
foo.z = inter[j].z;
cout << "populated foo" <<endl;
result.push_back(foo);
cout << "base_nums[i] is: " << base_nums[i] << " i is: " << i << endl;
cout << "inter[j].ps is: " << inter[j].ps << " j is: " << j << endl;
break;
}//end if
}
}
cout << "exiting makePosObject function" << endl;
cout << "length of result is: " << result.size() << endl;
return result;
}

Expand Down
13 changes: 3 additions & 10 deletions scr/dbslmm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,31 +255,24 @@ void DBSLMM::BatchRun(PARAM &cPar) {
int n_s = cIO.readSumm(cPar.s, separate, summ_s); //readSumm is defined in scr/dtpr.cpp
// What is n_s?? clearly, an integer, but is it the number of small effect snps? or is it a number of subjects,
// like the number of subjects used to get small effect snps?
vector <POS> inter_s; // what does POS mean here? I get that it's the class for inter_s, but what exactly does it mean?
vector <POS> inter_s; // what does POS mean here? I get that it's the class for elements of inter_s, but what exactly does it mean?
// see scr/dtpr.hpp for definition of POS class
bool badsnp_s[n_s] = {false};
cSP.matchRef(summ_s, ref_bim, inter_s, cPar.mafMax, badsnp_s); //matchRef is defined in scr/dtpr.cpp
cout << "After filtering, " << inter_s.size() << " small effect SNPs are selected." << endl;
cout << "We started with " <<summ_s.size() << " small effect SNPs" << endl;
//read the test bim rs ids into a string vector
std::vector <std::string> base_nums = readTestBim(cPar.dat_str + ".bim");
cout << "length of base_nums: " << base_nums.size() << endl;
cout << "first entry in base_nums is: " << base_nums[0] << endl;
cout << "last entry in base_nums is: " << base_nums[base_nums.size() -1] << endl;
//
cout << "length of inter_s is: " << inter_s.size() << endl;
vector<POS> test_inter_s = makePosObjectForTestBim(base_nums, inter_s);
cout << "length of test_inter_s is: " << test_inter_s.size() << endl;


vector <INFO> info_s;
vector <INFO> test_info_s;

int num_block_s = cSP.addBlock(inter_s, block_dat, info_s); //addBlock is defined in scr/dtpr.cpp & populates info_s
int test_num_block_s = cSP.addBlock(test_inter_s, block_dat, test_info_s); //addBlock is defined in scr/dtpr.cpp & populates info_s

cout << "test_num_block_s: " << test_num_block_s << endl;
cout << "num_block_s: " << num_block_s << endl;


// output samll effect badsnps
string badsnps_str = cPar.eff + ".badsnps";
ofstream badsnpsFout(badsnps_str.c_str());
Expand Down

0 comments on commit 1b03372

Please sign in to comment.