View source: R/functions_for_RGWAS.R
score.calc.LR.MC  R Documentation 
This function calculates log10(p) of each SNPset by the LR (likelihoodratio) test. First, the function solves the multikernel mixed model and calaculates the maximum restricted log likelihood. Then it performs the LR test by using the fact that the deviance
D = 2 \times (LL _ {alt}  LL _ {null})
follows the chisquare distribution.
score.calc.LR.MC(
M.now,
y,
X.now,
ZETA.now,
package.MM = "gaston",
LL0,
eigen.SGS = NULL,
eigen.G = NULL,
n.core = 2,
parallel.method = "mclapply",
map,
kernel.method = "linear",
kernel.h = "tuned",
haplotype = TRUE,
num.hap = NULL,
test.effect = "additive",
window.size.half = 5,
window.slide = 1,
optimizer = "nlminb",
chi0.mixture = 0.5,
weighting.center = TRUE,
weighting.other = NULL,
gene.set = NULL,
min.MAF = 0.02,
count = TRUE
)
M.now 
A 
y 
A 
X.now 
A 
ZETA.now 
A list of variance (relationship) matrix (K; 
package.MM 
The package name to be used when solving mixedeffects model. We only offer the following three packages:
"RAINBOWR", "MM4LMM" and "gaston". Default package is 'gaston'.
See more details at 
LL0 
The loglikelihood for the null model. 
eigen.SGS 
A list with
The result of the eigen decompsition of 
eigen.G 
A list with
The result of the eigen decompsition of 
n.core 
Setting n.core > 1 will enable parallel execution on a machine with multiple cores. This argument is not valid when 'parallel.method = "furrr"'. 
parallel.method 
Method for parallel computation. We offer three methods, "mclapply", "furrr", and "foreach". When 'parallel.method = "mclapply"', we utilize When 'parallel.method = "furrr"', we utilize When 'parallel.method = "foreach"', we utilize We recommend that you use the option 'parallel.method = "mclapply"', but for Windows users, this parallelization method is not supported. So, if you are Windows user, we recommend that you use the option 'parallel.method = "foreach"'. 
map 
Data frame of map information where the first column is the marker names, the second and third column is the chromosome amd map position, and the forth column is log10(p) for each marker. 
kernel.method 
It determines how to calculate kernel. There are three methods.

kernel.h 
The hyper parameter for gaussian or exponential kernel. If kernel.h = "tuned", this hyper parameter is calculated as the median of offdiagonals of distance matrix of genotype data. 
haplotype 
If the number of lines of your data is large (maybe > 100), you should set haplotype = TRUE. When haplotype = TRUE, haplotypebased kernel will be used for calculating log10(p). (So the dimension of this gram matrix will be smaller.) The result won't be changed, but the time for the calculation will be shorter. 
num.hap 
When haplotype = TRUE, you can set the number of haplotypes which you expect. Then similar arrays are considered as the same haplotype, and then make kernel(K.SNP) whose dimension is num.hap x num.hap. When num.hap = NULL (default), num.hap will be set as the maximum number which reflects the difference between lines. 
test.effect 
Effect of each marker to test. You can choose "test.effect" from "additive", "dominance" and "additive+dominance". You also can choose more than one effect, for example, test.effect = c("additive", "aditive+dominance") 
window.size.half 
This argument decides how many SNPs (around the SNP you want to test) are used to calculated K.SNP. More precisely, the number of SNPs will be 2 * window.size.half + 1. 
window.slide 
This argument determines how often you test markers. If window.slide = 1, every marker will be tested. If you want to perform SNP set by bins, please set window.slide = 2 * window.size.half + 1. 
optimizer 
The function used in the optimization process. We offer "optim", "optimx", and "nlminb" functions. 
chi0.mixture 
RAINBOWR assumes the deviance is considered to follow a x chisq(df = 0) + (1  a) x chisq(df = r). where r is the degree of freedom. The argument chi0.mixture is a (0 <= a < 1), and default is 0.5. 
weighting.center 
In kernelbased GWAS, weights according to the Gaussian distribution (centered on the tested SNP) are taken into account when calculating the kernel if Rainbow = TRUE. If weighting.center = FALSE, weights are not taken into account. 
weighting.other 
You can set other weights in addition to weighting.center. The length of this argument should be equal to the number of SNPs. For example, you can assign SNP effects from the information of gene annotation. 
gene.set 
If you have information of gene, you can use it to perform kernelbased GWAS. You should assign your gene information to gene.set in the form of a "data.frame" (whose dimension is (the number of gene) x 2). In the first column, you should assign the gene name. And in the second column, you should assign the names of each marker, which correspond to the marker names of "geno" argument. 
min.MAF 
Specifies the minimum minor allele frequency (MAF). If a marker has a MAF less than min.MAF, it is assigned a zero score. 
count 
When count is TRUE, you can know how far RGWAS has ended with percent display. 
log10(p) for each SNPset
Listgarten, J. et al. (2013) A powerful and efficient set test for genetic markers that handles confounders. Bioinformatics. 29(12): 15261533.
Lippert, C. et al. (2014) Greater power and computational efficiency for kernelbased association testing of sets of genetic variants. Bioinformatics. 30(22): 32063214.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.