[Genabel-commits] r654 - in pkg/VariABEL: R src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 16 22:35:53 CET 2011


Author: maksim
Date: 2011-02-16 22:35:53 +0100 (Wed, 16 Feb 2011)
New Revision: 654

Modified:
   pkg/VariABEL/R/var.test.gwaa.R
   pkg/VariABEL/src/var_homogeneity_test_C.cpp
Log:
Output of main effect is added

Modified: pkg/VariABEL/R/var.test.gwaa.R
===================================================================
--- pkg/VariABEL/R/var.test.gwaa.R	2011-02-16 00:23:06 UTC (rev 653)
+++ pkg/VariABEL/R/var.test.gwaa.R	2011-02-16 21:35:53 UTC (rev 654)
@@ -165,7 +165,6 @@
 #print(dim(design_matrix_df))
 
 
-print(c(gtNrow, gtNcol))
 print("Start variance analysis...")
 results_C <- .Call("iterator", genodata,
 														 as.integer(gtNrow), as.integer(gtNcol),
@@ -180,8 +179,8 @@
 														 as.integer(p),
 														 as.integer(analysis_type),
 														 as.integer(testname),
-														 double(p),#betas 
-														 double(p),#se 
+														 double(p+1),#betas 
+														 double(p+1),#se 
 														 double(1),#chi2
 														 integer(1),#df
 														 double(idnum),#residuals
@@ -214,9 +213,12 @@
 for(i in 2:p)
 	{
 	output_column_names <- c(output_column_names, paste(cov_names[i], "_effect", sep=""))
-	output_column_names <- c(output_column_names, paste(cov_names[i], "_sd", sep=""))
+	output_column_names <- c(output_column_names, paste(cov_names[i], "_se", sep=""))
 	}
 
+output_column_names <- c(output_column_names, "main_snp_effect")
+output_column_names <- c(output_column_names, "main_snp_effect_se")
+
 colnames(results_df) <- output_column_names
 
 

Modified: pkg/VariABEL/src/var_homogeneity_test_C.cpp
===================================================================
--- pkg/VariABEL/src/var_homogeneity_test_C.cpp	2011-02-16 00:23:06 UTC (rev 653)
+++ pkg/VariABEL/src/var_homogeneity_test_C.cpp	2011-02-16 21:35:53 UTC (rev 654)
@@ -188,8 +188,10 @@
 
 	//___________________________________________
 
-
+  double beta_snp   = betas[1];
+	double sebeta_snp = se[1];
 	
+		
 
 
 //	std::cout<<"main effect: beta0="<<betas[0]<<", se0="<<se[0]<<"\n";
@@ -213,8 +215,9 @@
 
 	*chi2 = (betas[p-1]/se[p-1])*(betas[p-1]/se[p-1]);
 	*df = 1;
+	betas[p] = beta_snp;
+  se[p]	   = sebeta_snp;
 	
-	
 	}
 
 //std::cout<<"variance_homogeneity_test_C: END\n";



More information about the Genabel-commits mailing list