[Genabel-commits] r1262 - pkg/OmicABEL/src/reshuffle

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jun 30 20:53:54 CEST 2013


Author: sharapovsodbo
Date: 2013-06-30 20:53:54 +0200 (Sun, 30 Jun 2013)
New Revision: 1262

Modified:
   pkg/OmicABEL/src/reshuffle/reshuffle.cpp
   pkg/OmicABEL/src/reshuffle/reshuffle.h
Log:
ver 0.008 
-fixed bug for reshuffling big data.
-fixed some comments (grammatic errors) 



Modified: pkg/OmicABEL/src/reshuffle/reshuffle.cpp
===================================================================
--- pkg/OmicABEL/src/reshuffle/reshuffle.cpp	2013-06-30 18:00:02 UTC (rev 1261)
+++ pkg/OmicABEL/src/reshuffle/reshuffle.cpp	2013-06-30 18:53:54 UTC (rev 1262)
@@ -126,10 +126,11 @@
 	for (set<int>::iterator trait= (*p_Parameters).traits.numbersset.begin();trait!=(*p_Parameters).traits.numbersset.end();trait++) {
 		//ofstream txt_chi(create_filename("chi_data//chi", (*(*p_iout_file).labels.trait_names)[*trait]).c_str());
 		double* buf = new double[per_trait_per_snp];
-		int oldPos = 0;
+		int64_t oldPos = 0;
+		int64_t pos = 0;
 		char s[30];
 		for (set<int>::iterator snp= (*p_Parameters).snps.numbersset.begin();snp!=(*p_Parameters).snps.numbersset.end();snp++) {
-			int pos = (*p_iout_file).tilecoordinates(*trait, *snp);
+			pos = (*p_iout_file).tilecoordinates(*trait, *snp);
 			//cout << oldPos << "-" << pos << endl;
 			if(pos != oldPos)
 			{
@@ -168,10 +169,11 @@
 	double CheckChi = atof((*p_Parameters).chi.value.c_str());
 	for (set<int>::iterator trait= (*p_Parameters).traits.numbersset.begin();trait!=(*p_Parameters).traits.numbersset.end();trait++) {
 		double* buf = new double[per_trait_per_snp];
-		int oldPos = 0;
+		int64_t oldPos = 0;
+		int64_t pos = 0;
 		char s[30];
 		for (set<int>::iterator snp= (*p_Parameters).snps.numbersset.begin();snp!=(*p_Parameters).snps.numbersset.end();snp++) {
-			int pos = (*p_iout_file).tilecoordinates(*trait, *snp);
+			pos = (*p_iout_file).tilecoordinates(*trait, *snp);
 			//cout << oldPos << "-" << pos << endl;
 			if(pos != oldPos)
 			{
@@ -199,12 +201,13 @@
 	txt_slim << "Chi2" << endl;
 	for (set<int>::iterator trait= goodtraits.begin();trait!=goodtraits.end();trait++) {
 		double* buf = new double[per_trait_per_snp];
-		int oldPos = 0;
+		int64_t oldPos = 0;
 		char s[30];
+		int64_t pos = 0;
 		for (set<int>::iterator snp= goodsnps.begin();snp!=goodsnps.end();snp++) {
 			txt_slim << (*(*p_iout_file).labels.snp_names)[*snp] << "\t";
 			txt_slim << (*(*p_iout_file).labels.trait_names)[*trait]<<"\t";
-			int pos = (*p_iout_file).tilecoordinates(*trait, *snp);
+			pos = (*p_iout_file).tilecoordinates(*trait, *snp);
 			//cout << oldPos << "-" << pos << endl;
 			if(pos != oldPos)
 			{

Modified: pkg/OmicABEL/src/reshuffle/reshuffle.h
===================================================================
--- pkg/OmicABEL/src/reshuffle/reshuffle.h	2013-06-30 18:00:02 UTC (rev 1261)
+++ pkg/OmicABEL/src/reshuffle/reshuffle.h	2013-06-30 18:53:54 UTC (rev 1262)
@@ -28,7 +28,7 @@
 	void write_data_chi(ifstream&,ofstream&);
 	void write_slim_data(ifstream&,ofstream&);
 	void write_herest(ifstream&,ofstream&);
-	int herest_startpos;
+	int64_t herest_startpos;
 	int est_shift(int);
 	int est_beta_shift(int);
 	void run(Parameters);



More information about the Genabel-commits mailing list