A vector containing the names of the results
files to meta-analyse. These can be outputs from GEMMA
multivariate analysis or similar (see Details).
Furthermore they can be single-chromosome or genome-wide
results.
N
A vector containing sample sizes for each of the
above files. This parameter is optional and is only
required for computing the overall allele frequency.
output.file
The name of the output file.
size.chunks
Size of each chunk to be read and
processed. Default is 5,000,000 (5 Mb). This size will
require very low memory usage. Increase this parameter if
more memory is allocated or if the number of cohorts is
limited. Read more about the chunks in Details.
min.pop
Minimum number of populations required per
SNP to compute meta-analysis. Default is 2, it can be any
number up to the total number of cohorts analysed.
sep
Separator for reading input files.
Details
This function applies an inverse-variance based method to
meta-analyse multivariate GWAS results. In particular,
given n different cohorts, for which p
phenotypes have been tested for genome-wide association,
the results for each cohort will have p different
effect size coefficients i.e. beta values (one per each
phenotype) and a variance/covariance pxp matrix
representing beta's variances and covariances. In
particular, the function is built to consider the output
from the GEMMA software multivariate association testing.
If your output is not produced with GEMMA, the function
works on any results file containing the following column
names:
chr Chromosome
ps Position
rs SNP name
allele1 Effect allele
allele0 Non-effect allele
af Effect-allele frequency
beta_1, beta_2, ...,
beta_p Effect sizes for each of the p
traits
Vbeta_1_1, Vbeta_1_2,
..., Vbeta_1_p, Vbeta_2_2, ...,
Vbeta_2_p, ..., Vbeta_p_p
variance-covariance matrix entries (diagonal and upper
triangle values only, since this matrix is symmetric)
The function divides input files into chunks based on
position. Only one chunk at a time is read and analysed;
thus a limited amount of data is loaded in the workspace
at one given time. Default chunk dimension is 5 Mb for
which low memory is required (<250 MB for 2 cohorts). If
you have larger RAM availability, sparse markers or a
limited number of cohorts, change chunks' dimension from
the command line.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MultiMeta)
Loading required package: gtable
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MultiMeta/multi_meta.Rd_%03d_medium.png", width=480, height=480)
> ### Name: multi_meta
> ### Title: Meta-analysis of multivariate GWAS results
> ### Aliases: multi_meta
>
> ### ** Examples
>
> file1=system.file("extdata", "Example_file_1.txt", package="MultiMeta")
> file2=system.file("extdata", "Example_file_2.txt", package="MultiMeta")
> multi_meta(files=c(file1,file2), N=c(1200,600), sep=" ",
+ output.file="Output_from_running_example.txt")
There were 50 or more warnings (use warnings() to see the first 50)
>
>
>
>
>
> dev.off()
null device
1
>