[Genabel-commits] r684 - in pkg/VariABEL: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 7 18:10:10 CET 2011
Author: maksim
Date: 2011-03-07 18:10:10 +0100 (Mon, 07 Mar 2011)
New Revision: 684
Added:
pkg/VariABEL/man/var_test_gwaa.Rd
Removed:
pkg/VariABEL/man/var.test.homogeneity.Rd
Modified:
pkg/VariABEL/NAMESPACE
pkg/VariABEL/R/var.meta.gwaa.R
pkg/VariABEL/R/var.test.gwaa.R
Log:
fix errors from R CMD check
Modified: pkg/VariABEL/NAMESPACE
===================================================================
--- pkg/VariABEL/NAMESPACE 2011-03-07 15:18:02 UTC (rev 683)
+++ pkg/VariABEL/NAMESPACE 2011-03-07 17:10:10 UTC (rev 684)
@@ -2,7 +2,7 @@
export(
- var.meta.gwaa,
+# var.meta.gwaa,
var.test.gwaa#,
#test_databel
)
Modified: pkg/VariABEL/R/var.meta.gwaa.R
===================================================================
--- pkg/VariABEL/R/var.meta.gwaa.R 2011-03-07 15:18:02 UTC (rev 683)
+++ pkg/VariABEL/R/var.meta.gwaa.R 2011-03-07 17:10:10 UTC (rev 684)
@@ -16,36 +16,36 @@
#=====================================================================================
-
-
-"var.meta.gwaa" <-
-function(input_filenames,
- testname,
- output_filename="output.variance.metaanalysis",
- exclude_snp_below_threshold=F,
- threshold=30,
- all_warnings=F,
- skip_first_lines_amount=0,
- delim=' ') {
-
-
-file_amount <- length(filenames_array)
-
-
-return_val <- .C("var_meta_gwaa_C", input_filenames, as.integer(file_amount), output_filename, as.integer(skip_first_lines_amount), delim,
- lambdas = double(file_amount+1),
- lambdas_NA = integer(file_amount+1),
- as.logical(exclude_snp_below_threshold),
- as.integer(threshold),
- as.logical(all_warnings),
- as.character(testname))
-
-
-return_val$lambdas[return_val$lambdas_NA==1] <- NA
-
-lambda_df <- data.frame(filename=filenames_array, lambda=return_val$lambdas[1:file_amount])
-
-lambda_df <- rbind(lambda_df, data.frame(filename=output_filename, lambda=return_val$lambdas[file_amount+1]))
-
-lambda_df
-}
+#
+#
+#"var.meta.gwaa" <-
+#function(input_filenames,
+# testname,
+# output_filename="output.variance.metaanalysis",
+# exclude_snp_below_threshold=F,
+# threshold=30,
+# all_warnings=F,
+# skip_first_lines_amount=0,
+# delim=' ') {
+#
+#
+#file_amount <- length(filenames_array)
+#
+#
+#return_val <- .C("var_meta_gwaa_C", input_filenames, as.integer(file_amount), output_filename, as.integer(skip_first_lines_amount), delim,
+# lambdas = double(file_amount+1),
+# lambdas_NA = integer(file_amount+1),
+# as.logical(exclude_snp_below_threshold),
+# as.integer(threshold),
+# as.logical(all_warnings),
+# as.character(testname))
+#
+#
+#return_val$lambdas[return_val$lambdas_NA==1] <- NA
+#
+#lambda_df <- data.frame(filename=filenames_array, lambda=return_val$lambdas[1:file_amount])
+#
+#lambda_df <- rbind(lambda_df, data.frame(filename=output_filename, lambda=return_val$lambdas[file_amount+1]))
+#
+#lambda_df
+#}
Modified: pkg/VariABEL/R/var.test.gwaa.R
===================================================================
--- pkg/VariABEL/R/var.test.gwaa.R 2011-03-07 15:18:02 UTC (rev 683)
+++ pkg/VariABEL/R/var.test.gwaa.R 2011-03-07 17:10:10 UTC (rev 684)
@@ -24,7 +24,7 @@
#_____________________________________________________________________________________________________________________________
#Available for user function for genome-wide testing variance homogeneity of trait's distribution.
#
-"var.test.gwaa" <- function(formula, genodata, phenodata, genodata_info=NULL, testname="sqlm", analysis_type="AAvsABvsBB")
+"var_test_gwaa" <- function(formula, genodata, phenodata, genodata_info=NULL, testname="sqlm", analysis_type="AAvsABvsBB")
{
Deleted: pkg/VariABEL/man/var.test.homogeneity.Rd
===================================================================
--- pkg/VariABEL/man/var.test.homogeneity.Rd 2011-03-07 15:18:02 UTC (rev 683)
+++ pkg/VariABEL/man/var.test.homogeneity.Rd 2011-03-07 17:10:10 UTC (rev 684)
@@ -1,54 +0,0 @@
-\name{var.test.homogeneity}
-\alias{var.test.homogeneity}
-\title{Function performs compariosn of genotypic variances.}
-\description{
-Presence of significant difference of genotypic variances points to possible
- Significant variance difference points to possible presence of interaction between a tested SNP and a factor (or set of factors).
-}
-\usage{
-var.test.gwaa(formula, genodata, phenodata, genodata_info=NULL, testname="sqlm", analysis_type="AAvsABvsBB")
-}
-\arguments{
-
- \item{formula} Regression model used for analysis. In the first stage linear regression is run to exclude main snp effect. In this stage adjustment for covariates is performed.
- \item{genodata} The genotypes data in format of genabel or databel object
- \item{phenodata} The phenotypes data in format of data.frame object
- \item{genodata_info} The file with snp information (name, position). Used if genodata is databel object.
- \item{testname} Name of variance heterogeneity test to perform. sqlm (for imputed genotype data), levene, and bartlett test are supported.
- \item{analysis_type} Type of analsysis to perform. AAvsABvsBB - additive model where B allele additivly increase risk, AAvsABandBB - group AA tested agains AB and BB, ABvsAAandBB - AB against AA and BB, BBvsAAandAB - BB against AA and AB. Only available for typed snps.
-}
-\details{
-
-The function var.test.gwaa tests for difference in genotypic variances. This difference points to presence of possible interaction between the tested SNP
-and some factor. In the case sqlm test the analysis consists of two stage: firstly the regular GWA id done where regression analysis is performed with
-covariates specified in the input parameter formula, in the second stage the regression analysis is performed with using residuals from the first stage and
-a sno as a covariate.
-}
-
-\value{
- The ouput is a data.frame object. The table contains the chisq of variance heterogeneity test (the name is chisq) the effects and standart errors of all covariates included into regression model,
- main snp effect (the names are snp_eff and snp_se). In the case of sqlm test the columns snp_eff_dispertion and snp_se_dispertion contain
- effect of a snp on squared vallues of a trait.
-
- }
-
-
-%\references{ http://www.biomedcentral.com/1471-2156/11/92/abstract }
-\author{Maksim Struchalin}
-%\note{ ~~further notes~~
-%}
-\seealso{
- \code{\link{var.meta}},
-}
-\examples{
- library(GenABEL)
- data(srdta)
- result1 <- var.test.gwaa(bt~qt1+qt2, genodata=srdta at gtdata, phenodata=srdta at phdata)
-
-#if there is no covariates needed:
- result2 <- var.test.gwaa("bt", genodata=srdta at gtdata, phenodata=srdta at phdata)
-
-}
-% Add one or more standard keywords, see file 'KEYWORDS' in the
-% R documentation directory.
-\keyword{manip}
Added: pkg/VariABEL/man/var_test_gwaa.Rd
===================================================================
--- pkg/VariABEL/man/var_test_gwaa.Rd (rev 0)
+++ pkg/VariABEL/man/var_test_gwaa.Rd 2011-03-07 17:10:10 UTC (rev 684)
@@ -0,0 +1,52 @@
+\name{var_test_gwaa}
+\alias{var_test_gwaa}
+\title{Function performs compariosn of genotypic variances.}
+\description{
+Presence of significant difference of genotypic variances points to possible
+ Significant variance difference points to possible presence of interaction between a tested SNP and a factor (or set of factors).
+}
+\usage{
+var_test_gwaa(formula, genodata, phenodata, genodata_info=NULL, testname="sqlm", analysis_type="AAvsABvsBB")
+}
+\arguments{\item{formula}{Regression model used for analysis. In the first stage linear regression is run to exclude main snp effect. In this stage adjustment for covariates is performed.}
+\item{genodata}{The genotypes data in format of genabel or databel object.}
+\item{phenodata}{The phenotypes data in format of data.frame object.}
+\item{genodata_info}{The file with snp information (name, position). Used if genodata is databel object.}
+\item{testname}{Name of variance heterogeneity test to perform. sqlm (for imputed genotype data), levene, and bartlett test are supported.}
+\item{analysis_type}{Type of analsysis to perform. AAvsABvsBB - additive model where B allele additivly increase risk, AAvsABandBB - group AA tested agains AB and BB, ABvsAAandBB - AB against AA and BB, BBvsAAandAB - BB against AA and AB. Only available for typed snps.}
+}
+\details{
+
+The function var_test_gwaa tests for difference in genotypic variances. This difference points to presence of possible interaction between the tested SNP
+and some factor. In the case sqlm test the analysis consists of two stage: firstly the regular GWA id done where regression analysis is performed with
+covariates specified in the input parameter formula, in the second stage the regression analysis is performed with using residuals from the first stage and
+a sno as a covariate.
+}
+
+\value{
+ The ouput is a data.frame object. The table contains the chisq of variance heterogeneity test (the name is chisq) the effects and standart errors of all covariates included into regression model,
+ main snp effect (the names are snp_eff and snp_se). In the case of sqlm test the columns snp_eff_dispertion and snp_se_dispertion contain
+ effect of a snp on squared vallues of a trait.
+
+ }
+
+
+%\references{ http://www.biomedcentral.com/1471-2156/11/92/abstract }
+\author{Maksim Struchalin}
+%\note{ ~~further notes~~
+%}
+%\seealso{
+% \code{\link{var.meta}},
+%}
+\examples{
+ library(GenABEL)
+ data(srdta)
+ result1 <- var_test_gwaa(bt~qt1+qt2, genodata=srdta at gtdata, phenodata=srdta at phdata)
+
+#if there is no covariates needed:
+ result2 <- var_test_gwaa("bt", genodata=srdta at gtdata, phenodata=srdta at phdata)
+
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{manip}
More information about the Genabel-commits
mailing list