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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 18 11:08:45 CET 2013


Author: sharapovsodbo
Date: 2013-03-18 11:08:45 +0100 (Mon, 18 Mar 2013)
New Revision: 1157

Modified:
   pkg/OmicABEL/src/reshuffle/DONE.txt
   pkg/OmicABEL/src/reshuffle/Parameters.cpp
   pkg/OmicABEL/src/reshuffle/Parameters.h
   pkg/OmicABEL/src/reshuffle/main.cpp
   pkg/OmicABEL/src/reshuffle/reshuffle.cpp
   pkg/OmicABEL/src/reshuffle/reshuffle.h
   pkg/OmicABEL/src/reshuffle/test.cpp
Log:
ver 0.006 default output+user's outfile's names

Modified: pkg/OmicABEL/src/reshuffle/DONE.txt
===================================================================
--- pkg/OmicABEL/src/reshuffle/DONE.txt	2013-03-17 16:13:04 UTC (rev 1156)
+++ pkg/OmicABEL/src/reshuffle/DONE.txt	2013-03-18 10:08:45 UTC (rev 1157)
@@ -23,6 +23,22 @@
 	Write data by snp's name and snps around it 
 	Write data by regexp in the begining of trait's	names
 	
+ver 0.004
+	makefile
+	resolved problem of compiling in Linux/MacOS X systems
 	
+ver 0.005
+	output corrected
+		in data/chi_data/slim_data column names are 
+			SNP TRAIT ... ... ... (Chi) 
+ver 0.006
+	default output
+		if there are no input parameters(only file's path) output is whole data 
+	you can set outfile's name for all parameters. Like this
+		./reshuffle.exe --datadims=file=datadimension.txt : output >> datadimension.txt
+		./reshuffle.exe --datadslim=file=very_slim_data.txt--chi=20	: output >> very_slim_data.txt
+		default file's name are as previous 
+	some changes in info messages
+	
 		
 		
\ No newline at end of file

Modified: pkg/OmicABEL/src/reshuffle/Parameters.cpp
===================================================================
--- pkg/OmicABEL/src/reshuffle/Parameters.cpp	2013-03-17 16:13:04 UTC (rev 1156)
+++ pkg/OmicABEL/src/reshuffle/Parameters.cpp	2013-03-18 10:08:45 UTC (rev 1157)
@@ -17,8 +17,8 @@
 	for (int i = 1; i < argc; i++) {
 		cmd_line += argv[i];
 	}
+	cout<<cmd_line<<endl;
 	cmd_line += sep; // Need for cmdline parsing
-	cout<<cmd_line<<endl;
 	return cmd_line;
 }
 //Default constructor
@@ -28,6 +28,7 @@
 	value = "all";
 }
 
+//Overloading operator cout for class Parameter
 ostream &operator <<(ostream &os, Parameter par) {
 	os << "PARAMETR" << "\t" << par.name << "\t" << "USE" << "\t" << par.use
 			<< "\t" << "VALUE" << "\t" << par.value;
@@ -37,10 +38,12 @@
 	cout<<"\tNames set ";
 	for (set<string>::iterator it= par.namesset.begin();it!=par.namesset.end();it++)
 		os <<*it<<" ";
+	os<<"\toutfile="<<par.outfile;
 	os<<endl;
 	return os;
 }
 
+//Overloading operator cout for class Parameters
 ostream &operator <<(ostream &os, Parameters par) {
 	os << "IOUT file is "<<par.iout_fname<<endl;
 	os << "OUT file is "<<par.out_fname<<endl;
@@ -55,13 +58,15 @@
 	return os;
 }
 
+// default constructor
 Parameters::Parameters(){
 }
 
 //Constructor-parser from command line
-Parameter::Parameter(string cmdline, string paramname) {
+Parameter::Parameter(string cmdline, string paramname,string ofile) {
 
 	name = paramname;
+	outfile=ofile;
 	int parpos = cmdline.find("--"+name)+2; //	position of substring with param's name
 	if (parpos != string::npos+2) { //	check  [FOUND OR NOT]
 		string val = "";
@@ -98,14 +103,21 @@
 					}else if(atoi(str_tmp.c_str())!=0){
 						numbersset.insert(atoi(str_tmp.c_str())-1);
 					}else{
-						namesset.insert(str_tmp);
+						if(str_tmp.find("file=")!=string::npos){//Fill outfile name
+							str_tmp=str_tmp.erase(0,5);
+							outfile=str_tmp;
+							value.erase(value.find("file="),5+str_tmp.size());//kill filename substring in value
+						}else
+							namesset.insert(str_tmp);
 					}
-
 					str_tmp="";
 				}
 			}
 		} else
 			value = "all"; // default value for parameters is "all"
+		if(value.size()==0)
+			value="all";
+
 	} else { // If parameter aren't in cmdline
 		use = false;
 		value = "None";
@@ -130,26 +142,32 @@
 	cmdline.erase(0,seppos);//Erase file name
 	iout_fname = filename + ".iout";
 	out_fname = filename + ".out";
-	info = Parameter(cmdline, "info");
+	info = Parameter(cmdline, "info","info.txt");
 	cmdline=info.delfromcmdline(cmdline);
-	datadims = Parameter(cmdline, "datadims");
+	datadims = Parameter(cmdline, "datadims","datdims.txt");
 	cmdline=datadims.delfromcmdline(cmdline);
-	snpnames = Parameter(cmdline, "snpnames");
+	snpnames = Parameter(cmdline, "snpnames","snpnames.txt");
 	cmdline=snpnames.delfromcmdline(cmdline);
-	traitnames = Parameter(cmdline, "traitnames");
+	traitnames = Parameter(cmdline, "traitnames","traitnames.txt");
 	cmdline=traitnames.delfromcmdline(cmdline);
-	traits = Parameter(cmdline, "traits");
+	traits = Parameter(cmdline, "traits","data.txt");
 	cmdline=traits.delfromcmdline(cmdline);
-	snps = Parameter(cmdline, "snps");
+	snps = Parameter(cmdline, "snps","data.txt");
 	cmdline=snps.delfromcmdline(cmdline);
-	heritabilities = Parameter(cmdline, "heritabilities");
+	heritabilities = Parameter(cmdline, "heritabilities","estimates.txt");
 	cmdline=heritabilities.delfromcmdline(cmdline);
-	chi = Parameter(cmdline, "chi");
+	chi = Parameter(cmdline, "chi","chi_data.txt");
 	cmdline=	chi.delfromcmdline(cmdline);
-	dataslim= Parameter(cmdline, "dataslim");
+	dataslim= Parameter(cmdline, "dataslim","slim_data.txt");
 	cmdline=	dataslim.delfromcmdline(cmdline);
-	test= Parameter(cmdline, "test");
+	test= Parameter(cmdline, "test","test.txt");
 	cmdline=test.delfromcmdline(cmdline);
+	defaultstate=datadims.use+snpnames.use+traitnames.use+traits.use+snps.use+heritabilities.use+chi.use+dataslim.use+test.use;
+	if(traits.outfile!="data.txt"&&snps.outfile!="data.txt"){
+		cout<<"You've set outfile name in <<traits>> and <<snps>> parameters"<<endl;
+		cout<<"Please, set outfile name for data ones"<<endl;
+		exit(1);
+	}
 }
 
 void Parameter::setbynames(vector<string> names){

Modified: pkg/OmicABEL/src/reshuffle/Parameters.h
===================================================================
--- pkg/OmicABEL/src/reshuffle/Parameters.h	2013-03-17 16:13:04 UTC (rev 1156)
+++ pkg/OmicABEL/src/reshuffle/Parameters.h	2013-03-18 10:08:45 UTC (rev 1157)
@@ -20,12 +20,13 @@
 	string name; 	//name of parametr
 	bool use; 	// Parameter use or not (Is paameter in command line?)
 	string value; 	// value of parametr,chars after "=" symbol
-	Parameter(string,string); 	//constructor
-	Parameter();		//default constructor
 	set<int> numbersset;
 	set<string> namesset;
 	string delfromcmdline(string);
 	void setbynames(vector<string>);
+	string outfile;
+	Parameter(string,string,string); 	//constructor
+	Parameter();		//default constructor
 };
 
 ostream &operator <<(ostream &, Parameter);
@@ -47,6 +48,7 @@
 	Parameters();
 	Parameters(int, char*[]);		//	Constructor from cmdline
 	static string get_cmd_line(int,char*[]);
+	bool defaultstate;//Check: are there parameters instead of infile's path
 
 };
 

Modified: pkg/OmicABEL/src/reshuffle/main.cpp
===================================================================
--- pkg/OmicABEL/src/reshuffle/main.cpp	2013-03-17 16:13:04 UTC (rev 1156)
+++ pkg/OmicABEL/src/reshuffle/main.cpp	2013-03-18 10:08:45 UTC (rev 1157)
@@ -15,9 +15,8 @@
 using namespace std;
 
 int main(int argc, char* argv[]) {
-	//cout << "Every day I'm [re]shuffeling!" << endl;
+	cout<<"Start reshuffeling"<<endl;
 	Parameters Params(argc, argv);
-	//mkdir("TEST");
 	if(Params.test.use){
 		test t_datadims("datadims","--datadims--","datadims.txt","data_4test_check/datadims.txt");
 		t_datadims.run();
@@ -97,7 +96,7 @@
 	if(Params.info.use)
 		cout << Params;
 	iout_file iout_F(Params);
-	cout << "finish iout_file read " << double(clock()) / CLOCKS_PER_SEC << endl;
+	cout << "Finish iout_file read\t" << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 	if(Params.info.use){
 		cout<<iout_F.header;
 		cout<<iout_F.labels;
@@ -110,6 +109,6 @@
 		Params.heritabilities.setbynames(*(iout_F.labels.trait_names));
 	Reshuffle reshh(iout_F,Params);
 	reshh.run();
-	cout << "finish_reshuffling " << double(clock()) / CLOCKS_PER_SEC << endl;
+	cout << "Finish reshuffling " << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 	return (0);
 }

Modified: pkg/OmicABEL/src/reshuffle/reshuffle.cpp
===================================================================
--- pkg/OmicABEL/src/reshuffle/reshuffle.cpp	2013-03-17 16:13:04 UTC (rev 1156)
+++ pkg/OmicABEL/src/reshuffle/reshuffle.cpp	2013-03-18 10:08:45 UTC (rev 1157)
@@ -39,6 +39,7 @@
 	txt_datadims << "Number of traits\t" << (*p_iout_file).header.t << endl;
 	txt_datadims << "Number of SNP\t" << (*p_iout_file).header.m << endl;
 	txt_datadims << "Number of covariates\t" << ((*p_iout_file).header.p - 2);
+	cout<<"End_write_data_dimension\t"<< double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 }
 
 void Reshuffle::write_snpnames(ofstream& txt_snpnames){
@@ -50,7 +51,7 @@
 	}
 	for(set<int>::iterator it= (*p_Parameters).snpnames.numbersset.begin();it!=(*p_Parameters).snpnames.numbersset.end();++it)
 		txt_snpnames << "SNP #"<<(*it+1)<<"\t"<<(*(*p_iout_file).labels.snp_names)[*it]<<endl;
-	cout<<"END WRITE SNPNAMES"<<endl;
+	cout<<"END WRITE SNPNAMES\t" << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 }
 
 void Reshuffle::write_traitnames(ofstream& txt_traitnames){
@@ -62,32 +63,29 @@
 	}
 	for(std::set<int>::iterator it= (*p_Parameters).traitnames.numbersset.begin();it!=p_Parameters->traitnames.numbersset.end();++it)
 		txt_traitnames<<"TRAIT #"<<(*it+1)<<"\t"<<(*(*p_iout_file).labels.trait_names)[*it]<<endl;
-	cout<<"END WRITE TRAITNAMES"<<endl;
+	cout<<"END WRITE TRAITNAMES\t" << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 }
 
-void Reshuffle::write_data(ifstream& out_file){
+void Reshuffle::write_data(ifstream& out_file,ofstream& data){
 	out_file.seekg(0, ios_base::beg);
-	cout << "startwritetxt=" << double(clock()) / CLOCKS_PER_SEC << endl;
-	ofstream txt_trait(create_filename("data").c_str());
-	//	cout<<(*(*p_iout_file).labels.trait_names)[*trait]<<endl;
-	txt_trait.precision(PRECISION_DOUBLE);
-	txt_trait<<"SNP\t";
-	txt_trait<<	"Trait\t";
+	cout << "Start_write_data\t" << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
+	data.precision(PRECISION_DOUBLE);
+	data<<"SNP\t";
+	data<<	"Trait\t";
 	for (int beta = 0;	beta < (*(*p_iout_file).labels.beta).size(); beta++)
-		txt_trait << (*(*p_iout_file).labels.beta)[beta] << "\t";
+		data << (*(*p_iout_file).labels.beta)[beta] << "\t";
 	for (int se = 0;se < (*(*p_iout_file).labels.se).size(); se++)
-		txt_trait << (*(*p_iout_file).labels.se)[se] << "\t";
+		data << (*(*p_iout_file).labels.se)[se] << "\t";
 	for (int cov = 0;cov < (*(*p_iout_file).labels.cov).size(); cov++)
-		txt_trait << (*(*p_iout_file).labels.cov)[cov] << "\t";
-	txt_trait << endl;
+		data << (*(*p_iout_file).labels.cov)[cov] << "\t";
+	data << endl;
 	for (set<int>::iterator trait= (*p_Parameters).traits.numbersset.begin();trait!=(*p_Parameters).traits.numbersset.end();trait++) {
-		cout << "endwritetrait_colnames" << *trait << clock() << endl;
 		double* buf = new double[per_trait_per_snp];
 		int oldPos = 0;
 		char s[30];
 		for (set<int>::iterator snp= (*p_Parameters).snps.numbersset.begin();snp!=(*p_Parameters).snps.numbersset.end();snp++) {
-			txt_trait << (*(*p_iout_file).labels.snp_names)[*snp] << "\t";
-			txt_trait << (*(*p_iout_file).labels.trait_names)[*trait]<<"\t";
+			data << (*(*p_iout_file).labels.snp_names)[*snp] << "\t";
+			data << (*(*p_iout_file).labels.trait_names)[*trait]<<"\t";
 			int pos = (*p_iout_file).tilecoordinates(*trait, *snp);
 			//cout << oldPos << "-" << pos << endl;
 			if(pos != oldPos)
@@ -98,23 +96,22 @@
 			out_file.read((char *)buf, sizeof(double)*per_trait_per_snp);
 			for (int i = 0; i < per_trait_per_snp; i++) {
 				sprintf(s, "%.15g", buf[i]);
-				txt_trait << s << "\t";
+				data << s << "\t";
 			}
-			txt_trait << endl;
+			data << endl;
 		}
 		delete buf;
 		//txt_trait.close();
-		cout << "endwritetrait " << (*(*p_iout_file).labels.trait_names)[*trait] << " "<< double(clock()) / CLOCKS_PER_SEC << endl;
+		cout << "End_write_trait\t" << (*(*p_iout_file).labels.trait_names)[*trait] << " "<< double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 	}
-	cout << "finishwritetxt=" << double(clock()) / CLOCKS_PER_SEC << endl;
+	cout << "Finish_write_data\t" << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 }
 
-void Reshuffle::write_data_chi(ifstream& out_file){
+void Reshuffle::write_data_chi(ifstream& out_file,ofstream& txt_chi){
 	out_file.seekg(0, ios_base::beg);
 	double chi = 0;
 	double CheckChi = (*p_Parameters).chi.value == "all" ? -1.0 : atof((*p_Parameters).chi.value.c_str());
-	cout << "startwritetxt=" << double(clock()) / CLOCKS_PER_SEC << endl;
-	ofstream txt_chi(create_filename("chi_data").c_str());
+	cout << "Start_write_chi_data=" << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 	txt_chi.precision(PRECISION_DOUBLE);
 	txt_chi << "SNP\t";
 	txt_chi << "Trait\t";
@@ -152,18 +149,18 @@
 		}
 		delete buf;
 		//txt_chi.close();
-		cout << "endwritechitrait " << (*(*p_iout_file).labels.trait_names)[*trait] << " "<< double(clock()) / CLOCKS_PER_SEC << endl;
+		cout << "End_write_chi_trait\t" << (*(*p_iout_file).labels.trait_names)[*trait] << " "<< double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 	}
-	cout << "finishwritechitxt=" << double(clock()) / CLOCKS_PER_SEC << endl;
+	cout << "Finish_write_chi_data\t" << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 }
 
-void Reshuffle::write_slim_data(ifstream& out_file){
+void Reshuffle::write_slim_data(ifstream& out_file, ofstream& txt_slim){
 	out_file.seekg(0, ios_base::beg);
 	set<int> goodtraits;
 	set<int> goodsnps;
 	double chi = 0;
 	if((*p_Parameters).chi.value=="all"||(*p_Parameters).chi.value=="None"){
-		cout << "ERROR" << "Chi value doesn't set"<<endl;
+		cout << "ERROR: " << "Chi value doesn't set"<<endl;
 		cout << "Please, set Chi value to get slim data" << endl;
 		exit(1);
 	}
@@ -190,7 +187,6 @@
 		delete buf;
 	}
 	out_file.seekg(0, ios_base::beg);
-	ofstream txt_slim(create_filename("slim_data").c_str());
 	txt_slim << "SNP\t";
 	txt_slim << "Trait\t";
 	for (int beta = 0;	beta < (*(*p_iout_file).labels.beta).size(); beta++)
@@ -223,8 +219,8 @@
 			txt_slim << chi << endl;
 		}
 		delete buf;
-		//txt_slim.close();
 	}
+	cout <<"End_write_slim_data\t" << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 }
 
 int Reshuffle::est_shift(int counter){
@@ -239,7 +235,7 @@
 	return shift;
 }
 
-void Reshuffle::write_herest(ifstream& out_file){
+void Reshuffle::write_herest(ifstream& out_file, ofstream& herest){
 	ofstream txt_est("estimates.txt");
 	out_file.seekg(herest_startpos, ios_base::beg);
 	if (p_Parameters->heritabilities.value == "all")
@@ -287,25 +283,23 @@
 			beta++;
 		}
 	}
+	cout << "End_write_estimates\t" << double(clock()) / CLOCKS_PER_SEC <<" sec" << endl;
 }
 
 void Reshuffle::run(){
 	if((*p_Parameters).datadims.use){
-		//mkdir("datadims");
-		ofstream datadims("datadims.txt");
+		ofstream datadims((*p_Parameters).datadims.outfile.c_str());
 		write_datadims(datadims);
 	}
 	if((*p_Parameters).snpnames.use){
-		//mkdir("snpnames");
-		ofstream snpnames("snpnames.txt");
+		ofstream snpnames((*p_Parameters).snpnames.outfile.c_str());
 		write_snpnames(snpnames);
 	}
 
 	if((*p_Parameters).traitnames.use){
-		//mkdir("traitnames");
-		ofstream* traitnames = new ofstream("traitnames.txt");
-		write_traitnames(*traitnames);
-		delete traitnames;
+		ofstream traitnames((*p_Parameters).traitnames.outfile.c_str());
+		write_traitnames(traitnames);
+		//delete traitnames;
 	}
 
 	//Open *.out to read data
@@ -318,7 +312,7 @@
 
 	//If any of parameters traits||snps||chi use, this block fill traits.numbersset and snps.numbersset
 	//(if their values are default all)
-	if((*p_Parameters).traits.use||(*p_Parameters).snps.use||(*p_Parameters).chi.use){
+	if((*p_Parameters).traits.use||(*p_Parameters).snps.use||(*p_Parameters).chi.use||!(*p_Parameters).defaultstate){
 
 			if((*p_Parameters).traits.value=="all"||(*p_Parameters).traits.value=="None"){
 				for(int i=0;i<(*(*p_iout_file).labels.trait_names).size();i++)
@@ -333,25 +327,32 @@
 		}
 	}
 
-	if(((*p_Parameters).traits.use||(*p_Parameters).snps.use)&&!(*p_Parameters).chi.use){
-		//mkdir("data");
-		write_data(out_file);
+	if((((*p_Parameters).traits.use||(*p_Parameters).snps.use)&&!(*p_Parameters).chi.use)||!(*p_Parameters).defaultstate){
+		ofstream data;
+		if((*p_Parameters).traits.outfile!="data.txt"){
+			data.open((*p_Parameters).traits.outfile.c_str());
+		}else
+			if((*p_Parameters).snps.outfile!="data.txt"){
+				data.open((*p_Parameters).snps.outfile.c_str());
+			}else
+				data.open("data.txt");
+		write_data(out_file,data);
 	}
 
 	if((*p_Parameters).chi.use&&!(*p_Parameters).dataslim.use){
-		//mkdir("chi_data");
-		write_data_chi(out_file);
+		ofstream chi_data((*p_Parameters).chi.outfile.c_str());
+		write_data_chi(out_file,chi_data);
 
 	}
 
 	if((*p_Parameters).dataslim.use){
-		//mkdir("slimdata");
-		write_slim_data(out_file);
+		ofstream dataslim((*p_Parameters).dataslim.outfile.c_str());
+		write_slim_data(out_file,dataslim);
 
 	}
 
 	if((*p_Parameters).heritabilities.use){
-		//mkdir("estimates");
-		write_herest(out_file);
+		ofstream herest((*p_Parameters).heritabilities.outfile.c_str());
+		write_herest(out_file,herest);
 	}
 }

Modified: pkg/OmicABEL/src/reshuffle/reshuffle.h
===================================================================
--- pkg/OmicABEL/src/reshuffle/reshuffle.h	2013-03-17 16:13:04 UTC (rev 1156)
+++ pkg/OmicABEL/src/reshuffle/reshuffle.h	2013-03-18 10:08:45 UTC (rev 1157)
@@ -24,10 +24,10 @@
 	void write_datadims(ofstream&);
 	void write_snpnames(ofstream&);
 	void write_traitnames(ofstream&);
-	void write_data(ifstream&);
-	void write_data_chi(ifstream&);
-	void write_slim_data(ifstream&);
-	void write_herest(ifstream&);
+	void write_data(ifstream&,ofstream&);
+	void write_data_chi(ifstream&,ofstream&);
+	void write_slim_data(ifstream&,ofstream&);
+	void write_herest(ifstream&,ofstream&);
 	int herest_startpos;
 	int est_shift(int);
 	int est_beta_shift(int);

Modified: pkg/OmicABEL/src/reshuffle/test.cpp
===================================================================
--- pkg/OmicABEL/src/reshuffle/test.cpp	2013-03-17 16:13:04 UTC (rev 1156)
+++ pkg/OmicABEL/src/reshuffle/test.cpp	2013-03-18 10:08:45 UTC (rev 1157)
@@ -19,31 +19,31 @@
 	Params_test->iout_fname="data_4test/4test.iout";
 	Params_test->out_fname="data_4test/4test.out";
 	if(name=="datadims")
-		Params_test->datadims = Parameter(cmd,"datadims");
+		Params_test->datadims = Parameter(cmd,"datadims","datadims.txt");
 	if(name=="traitnamesdef"||name=="traitnames")
-		Params_test->traitnames = Parameter(cmd,"traitnames");
-	if(name=="snpnamesdef"||name=="snpnames")
-		Params_test->snpnames = Parameter(cmd,"snpnames");
+		Params_test->traitnames = Parameter(cmd,"traitnames","traitnames.txt");
+	if(name=="snpnamesdef"||name=="snpnames","snpnames.txt")
+		Params_test->snpnames = Parameter(cmd,"snpnames","snpnames.txt");
 	if(name=="traitsnumbers"||name=="traitsdef"||name=="traitsbynames")
-		Params_test->traits = Parameter(cmd,"traits");
+		Params_test->traits = Parameter(cmd,"traits","data.txt");
 	if(name=="snpsnumbers"||name=="snpsdef"||name=="snpsbynames")
-		Params_test->snps = Parameter(cmd,"snps");
+		Params_test->snps = Parameter(cmd,"snps","data.txt");
 	if(name=="traitssnpscombo"){
-		Params_test->traits=Parameter(cmd,"traits");
-		Params_test->snps=Parameter(cmd,"snps");
+		Params_test->traits=Parameter(cmd,"traits","data.txt");
+		Params_test->snps=Parameter(cmd,"snps","data.txt");
 	}
 	if(name=="chiall"||name=="chiover")
-		Params_test->chi = Parameter(cmd,"chi");
+		Params_test->chi = Parameter(cmd,"chi","chi_data.txt");
 	if(name=="traitssnpschicombo"){
-		Params_test->traits=Parameter(cmd,"traits");
-		Params_test->snps=Parameter(cmd,"snps");
-		Params_test->chi = Parameter(cmd,"chi");
+		Params_test->traits=Parameter(cmd,"traits","data.txt");
+		Params_test->snps=Parameter(cmd,"snps","data.txt");
+		Params_test->chi = Parameter(cmd,"chi","chi_data.txt");
 	}
 	if(name=="estdef"||name=="estnumbers"||name=="estnames")
-		Params_test->heritabilities = Parameter(cmd,"heritabilities");
+		Params_test->heritabilities = Parameter(cmd,"heritabilities","estimates.txt");
 	if(name=="dataslim"){
-		Params_test->dataslim = Parameter(cmd,"dataslim");
-		Params_test->chi = Parameter(cmd,"chi");
+		Params_test->dataslim = Parameter(cmd,"dataslim","slim_data.txt");
+		Params_test->chi = Parameter(cmd,"chi","chi_data.txt");
 	}
 }
 



More information about the Genabel-commits mailing list