Skip to content
Snippets Groups Projects
Commit ccb681fa authored by Vincent  LAVILLE's avatar Vincent LAVILLE
Browse files

Change function name

parent 6817cd42
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
export(calculateParamsFromCounts)
export(calculateParamsFromIndParams)
export(calculateVarFrac)
export(calculateVarExp)
export(checkInput)
export(getGenoCorMatrix)
export(standardizeBeta)
......
......@@ -144,15 +144,15 @@ standardizeBeta <- function(betaG,betaINT,maf,meanE,varE,type) {
#' matcor <- cor(matrix(runif(5*5, 1, 5), nrow = 5))
#' varY <- 2.25
#' N <- 100000
#' calculateVarFrac(std_bG, std_bI, matcor, varY, N, "G")
#' calculateVarFrac(std_bG, std_bI, matcor, varY, N, "I")
#' calculateVarFrac(std_bG, std_bI, matcor, varY, N, "J")
#' calculateVarExp(std_bG, std_bI, matcor, varY, N, "G")
#' calculateVarExp(std_bG, std_bI, matcor, varY, N, "I")
#' calculateVarExp(std_bG, std_bI, matcor, varY, N, "J")
#'
#' @importFrom MASS ginv
#'
#' @export
#'
calculateVarFrac <- function(std_bG, std_bI, matcor, varY, N, type) {
calculateVarExp <- function(std_bG, std_bI, matcor, varY, N, type) {
if (type == "G") {
std_bI <- rep(0, length(std_bG))
}
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/varFrac.R
% Please edit documentation in R/varExp.R
\name{calculateParamsFromCounts}
\alias{calculateParamsFromCounts}
\title{Calculate the mean and variance of a binary variable in a pooled sample
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/varFrac.R
% Please edit documentation in R/varExp.R
\name{calculateParamsFromIndParams}
\alias{calculateParamsFromIndParams}
\title{Calculate the mean and variance of a quantitative variable in a pooled sample
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/varFrac.R
\name{calculateVarFrac}
\alias{calculateVarFrac}
% Please edit documentation in R/varExp.R
\name{calculateVarExp}
\alias{calculateVarExp}
\title{Calculate the fraction of phenotypic variance explained by as set of
significant genetic effect and/or interaction effects.}
\usage{
calculateVarFrac(std_bG, std_bI, matcor, varY, N, type)
calculateVarExp(std_bG, std_bI, matcor, varY, N, type)
}
\arguments{
\item{std_bG}{is the vector of standardized genetic effect sizes}
......@@ -37,8 +37,8 @@ std_bI <- rnorm(5, 0, 0.001)
matcor <- cor(matrix(runif(5*5, 1, 5), nrow = 5))
varY <- 2.25
N <- 100000
calculateVarFrac(std_bG, std_bI, matcor, varY, N, "G")
calculateVarFrac(std_bG, std_bI, matcor, varY, N, "I")
calculateVarFrac(std_bG, std_bI, matcor, varY, N, "J")
calculateVarExp(std_bG, std_bI, matcor, varY, N, "G")
calculateVarExp(std_bG, std_bI, matcor, varY, N, "I")
calculateVarExp(std_bG, std_bI, matcor, varY, N, "J")
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/varFrac.R
% Please edit documentation in R/varExp.R
\name{checkInput}
\alias{checkInput}
\title{Make sure}
\title{Make sure SNPs in the input file and SNPs included
in the correlation matrix are the same.}
\usage{
checkInput(df, v)
}
......@@ -15,7 +16,8 @@ checkInput(df, v)
A data frame only with rows corresponding to SNPs in the vector \code{v}
}
\description{
Make sure
This step is necessary because some SNPs in the input may be not
found in the reference panel or excluded from the matrix after the pruning step.
}
\examples{
df <- data.frame(c("rs1", "rs2", "rs3"), rnorm(3))
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/varFrac.R
% Please edit documentation in R/varExp.R
\name{standardizeBeta}
\alias{standardizeBeta}
\title{Derive betas in the standardized model from betas in the general model}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment