a character vector of file names containing the summary results of SNPs included in one or multiple studies. Each file must be able to be read by read.table. Each file must have columns called "SNP", "RefAllele", "EffectAllele", "BETA", and at least one of "SE", "P".
lambda
a numeric vector of inflation factors. Each file in summary.files should have one inflation factor specified in lambda. NULL if inflation is not adjusted.
sel.snps
a character vector of SNPs to be used in meta-analysis. The default is NULL, i.e., all SNPs are used.
only.meta
TRUE if do not returned individual summary data. The default is TRUE.
Details
The inverse-variance method is used by assuming a fixed effect model. The standard error is rescaled by sqrt{lambda}.
Value
meta returns a list containing
meta.stat
a data frame of summary statistics from meta-analysis. The summary statistics of individual studies specified in summary.files are also returned in the data frame if only.meta is FALSE. The standard error of individual studies are rescaled by sqrt{lambda}.
conf.snps
a character vector of SNPs with conflictive allele information.
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(ARTP2)
Loading required package: Formula
Loading required package: data.table
Loading required package: parallel
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ARTP2/meta.Rd_%03d_medium.png", width=480, height=480)
> ### Name: meta
> ### Title: meta
> ### Aliases: meta
>
> ### ** Examples
>
>
> study1 <- system.file("extdata", package = "ARTP2", "study1.txt.gz")
> study2 <- system.file("extdata", package = "ARTP2", "study2.txt.gz")
> snps <- c('rs13266821', 'rs4824130', 'rs1792438', 'rs1000047',
+ 'rs1000017', 'rs6066771', 'rs12508128')
>
> m1 <- meta(summary.files = c(study1, study2), lambda = c(1.10, 1.08),
+ sel.snps = snps)
Loading summary files: Mon Jul 4 14:13:45 2016
Extracting allele information: Mon Jul 4 14:13:46 2016
Extracting SNPs with conflictive alleles: Mon Jul 4 14:13:46 2016
Merging summary statistics: Mon Jul 4 14:13:46 2016
Warning messages:
1: In read.table(summary.files[i], header = TRUE, as.is = TRUE, colClasses = col.class) :
not all columns named in 'colClasses' exist
2: In load.summary.files(summary.files, lambda, sel.snps) :
Direction is absent in /home/ddbj/local/lib64/R/library/ARTP2/extdata/study2.txt.gz. Function meta() assumed equal sample sizes for all SNPs in that study. Invalidation of this assumption can lead to false positive if summary data of this study is used in pathway analysis
> m2 <- meta(summary.files = c(study1, study2), lambda = c(1.10, 1.08),
+ sel.snps = snps, only.meta = FALSE)
Loading summary files: Mon Jul 4 14:13:46 2016
Extracting allele information: Mon Jul 4 14:13:46 2016
Extracting SNPs with conflictive alleles: Mon Jul 4 14:13:46 2016
Merging summary statistics: Mon Jul 4 14:13:46 2016
Warning messages:
1: In read.table(summary.files[i], header = TRUE, as.is = TRUE, colClasses = col.class) :
not all columns named in 'colClasses' exist
2: In load.summary.files(summary.files, lambda, sel.snps) :
Direction is absent in /home/ddbj/local/lib64/R/library/ARTP2/extdata/study2.txt.gz. Function meta() assumed equal sample sizes for all SNPs in that study. Invalidation of this assumption can lead to false positive if summary data of this study is used in pathway analysis
>
> m1$conf.snps
[1] "rs1792438"
>
> m1$meta.stat
SNP RefAllele EffectAllele BETA SE P
1 rs12508128 T A -0.057648934 0.01724617 0.0008296448
2 rs6066771 G A 0.019109072 0.01686097 0.2570749913
3 rs13266821 C T 0.028183212 0.02929865 0.3360853990
4 rs4824130 C A 0.009487268 0.01351475 0.4826830106
5 rs1000047 T C 0.010232406 0.02023773 0.6131302674
6 rs1000017 C A -0.002891776 0.01914442 0.8799357941
Direction
1 +?-
2 +?+
3 +??
4 ++?
5 ??+
6 ??-
> m2$meta.stat
SNP RefAllele EffectAllele BETA SE P
1 rs12508128 T A -0.057648934 0.01724617 0.0008296448
2 rs6066771 G A 0.019109072 0.01686097 0.2570749913
3 rs13266821 C T 0.028183212 0.02929865 0.3360853990
4 rs4824130 C A 0.009487268 0.01351475 0.4826830106
5 rs1000047 T C 0.010232406 0.02023773 0.6131302674
6 rs1000017 C A -0.002891776 0.01914442 0.8799357941
Direction RefAllele.Study.1 EffectAllele.Study.1 BETA.Study.1 SE.Study.1
1 +?- A T 0.046519596 0.02466272
2 +?+ G A 0.037395483 0.02573846
3 +?? C T 0.028183212 0.02929865
4 ++? C A 0.009487268 0.01351475
5 ??+ <NA> <NA> NA NA
6 ??- <NA> <NA> NA NA
P.Study.1 Direction.Study.1 RefAllele.Study.2 EffectAllele.Study.2
1 0.05926376 +? T A
2 0.14625073 +? G A
3 0.33608540 +? <NA> <NA>
4 0.48268301 ++ <NA> <NA>
5 NA <NA> T C
6 NA <NA> C A
BETA.Study.2 SE.Study.2 P.Study.2 Direction.Study.2
1 -0.068298854 0.02412567 0.004640828 -
2 0.005362335 0.02231609 0.810105393 +
3 NA NA NA <NA>
4 NA NA NA <NA>
5 0.010232406 0.02023773 0.613130267 +
6 -0.002891776 0.01914442 0.879935794 -
>
>
>
>
>
>
> dev.off()
null device
1
>