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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 22 13:48:00 CET 2013


Author: sharapovsodbo
Date: 2013-03-22 13:48:00 +0100 (Fri, 22 Mar 2013)
New Revision: 1169

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
Log:
ver 0.007 help added

Modified: pkg/OmicABEL/src/reshuffle/DONE.txt
===================================================================
--- pkg/OmicABEL/src/reshuffle/DONE.txt	2013-03-21 17:43:38 UTC (rev 1168)
+++ pkg/OmicABEL/src/reshuffle/DONE.txt	2013-03-22 12:48:00 UTC (rev 1169)
@@ -36,9 +36,15 @@
 		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
+		./reshuffle.exe --dataslim=file=very_slim_data.txt--chi=20	: output >> very_slim_data.txt
 		default file's name are as previous 
 	some changes in info messages
-	
+
+ver 0.007 
+	quick help
+		if file's name doesn't set or user set 
+			--help
+		help information would on your screen
 		
+		
 		
\ No newline at end of file

Modified: pkg/OmicABEL/src/reshuffle/Parameters.cpp
===================================================================
--- pkg/OmicABEL/src/reshuffle/Parameters.cpp	2013-03-21 17:43:38 UTC (rev 1168)
+++ pkg/OmicABEL/src/reshuffle/Parameters.cpp	2013-03-22 12:48:00 UTC (rev 1169)
@@ -142,7 +142,9 @@
 	cmdline.erase(0,seppos);//Erase file name
 	iout_fname = filename + ".iout";
 	out_fname = filename + ".out";
-	info = Parameter(cmdline, "info","info.txt");
+	h = Parameter(cmdline,"h","");
+	help = Parameter(cmdline,"help","");
+	info = Parameter(cmdline, "info","");
 	cmdline=info.delfromcmdline(cmdline);
 	datadims = Parameter(cmdline, "datadims","datdims.txt");
 	cmdline=datadims.delfromcmdline(cmdline);

Modified: pkg/OmicABEL/src/reshuffle/Parameters.h
===================================================================
--- pkg/OmicABEL/src/reshuffle/Parameters.h	2013-03-21 17:43:38 UTC (rev 1168)
+++ pkg/OmicABEL/src/reshuffle/Parameters.h	2013-03-22 12:48:00 UTC (rev 1169)
@@ -33,9 +33,11 @@
 
 class Parameters {
 public:
-	Parameter info; // Write info about progeamm's run
 	string iout_fname; //iout_file_name
 	string out_fname;
+	Parameter h; //Print help
+	Parameter help; //Print help
+	Parameter info; // Write info about progeamm's run
 	Parameter datadims;
 	Parameter snpnames;
 	Parameter traitnames;

Modified: pkg/OmicABEL/src/reshuffle/main.cpp
===================================================================
--- pkg/OmicABEL/src/reshuffle/main.cpp	2013-03-21 17:43:38 UTC (rev 1168)
+++ pkg/OmicABEL/src/reshuffle/main.cpp	2013-03-22 12:48:00 UTC (rev 1169)
@@ -15,8 +15,24 @@
 using namespace std;
 
 int main(int argc, char* argv[]) {
-	cout<<"Start reshuffeling"<<endl;
+	//cout<<"Start reshuffeling"<<endl;
 	Parameters Params(argc, argv);
+	if(Params.h.use||Params.help.use||(Params.iout_fname==".iout"&&Params.out_fname==".out")){
+		cout<<"Available commands"<<endl<<endl;
+		cout<<" --datadims | to get data's dimension"<<endl<<endl;
+		cout<<" --snpnames=<indexes> | to get names of SNP by indexes"<<endl<<endl;
+		cout<<" --traitnames=<indexes> | to get names of trait by indexes"<<endl<<endl;
+		cout<<" --traits=<indexes OR/AND names OR/AND regexp> | to get data"<<endl;
+		cout<<"   by trait's indexes OR/AND names OR/AND regexp"<<endl<<endl;
+		cout<<" --snp=<indexes OR/AND names OR/AND focus> | to get data"<<endl;
+		cout<<"   by SNP's indexes OR/AND names"<<endl<<endl;
+		cout<<" --heritabilities=<indexes OR/AND names OR/AND regexp>"<<endl;
+		cout<<"   to get estimates of trait's heritability, sigma, res_sigma and betas"<<endl<<endl;
+		cout<<" --chi=<number> | to get data by snp's, which chi2>number"<<endl<<endl;
+		cout<<" --dataslim | to get slim data [You should set --chi=<number>]"<<endl<<endl;
+		exit(1);
+	}
+
 	if(Params.test.use){
 		test t_datadims("datadims","--datadims--","datadims.txt","data_4test_check/datadims.txt");
 		t_datadims.run();



More information about the Genabel-commits mailing list