Title: | Correlated Meta-Analysis |
Version: | 1.0.0 |
Maintainer: | Woo Seok Jung <jungw@wustl.edu> |
Description: | Performs Correlated Meta-Analysis ('corrmeta') across multiple OMIC scans, accounting for hidden non-independencies between elements of the scans due to overlapping samples, related samples, or other information. For more information about the method, refer to the paper Province MA. (2013) <doi:10.1142/9789814447973_0023>. |
biocViews: | Genetics, GenomeWideAssociation, SNP, StatisticalMethod, Software |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.1 |
VignetteBuilder: | knitr |
LazyData: | true |
Suggests: | testthat (≥ 3.0.0), BiocStyle, knitr, rmarkdown, qpdf |
Config/testthat/edition: | 3 |
Imports: | dplyr, polycor, stats, tidyr, magrittr |
NeedsCompilation: | no |
Packaged: | 2024-03-06 17:16:33 UTC; rstudio |
Author: | Woo Seok Jung [aut, cre], Michael Province [aut, cph] |
Depends: | R (≥ 3.5.0) |
Repository: | CRAN |
Date/Publication: | 2024-03-08 09:30:05 UTC |
Calculate Fisher's method p-value and meta-analysis statistics
Description
Calculate Fisher's method p-value and meta-analysis statistics
Usage
fishp(df, vars, df_sigma, sum_sigma)
Arguments
df |
data frame with "markname" and study names as column names. |
vars |
character vector of study names to include in the meta-analysis. |
df_sigma |
data frame of tetrachoric correlations. |
sum_sigma |
sum of tetrachoric correlations. |
Value
A data frame with columns 'markname', 'sum_chisq', 'sum_z', 'sum_sigma_var', 'pvalue', 'meta_z', 'meta_p', 'meta_nlog10p'
Examples
data(snp_example)
head(snp_example)
varlist <- c("trt1","trt2","trt3")
tc <- tetracorr(snp_example, varlist)
fishp(snp_example, varlist, tc$sigma, tc$sum_sigma)
Generates a list of random p-values with mixed significant and insignificant values
Description
Generates a list of random p-values with mixed significant and insignificant values
Usage
generate_random_p_values(n, ratio_significant)
Arguments
n |
number of samples |
ratio_significant |
fraction of p-values to be significant |
Value
list of n randomly generated significant and insignificant p-values
Calculate Polychoric Correlations
Description
This function calculates the polychoric correlations between pairs of variables in a given data frame. It returns a data frame with the row and column names of the variables, the polychoric correlation coefficient, and its standard error.
Usage
polycorr(data, varlist)
Arguments
data |
data frame with "markname" and study names as column names. |
varlist |
character vector of study names to include in the meta-analysis. |
Value
data frame with polychoric correlation coefficients and standard errors
Author(s)
Woo Jung
See Also
polychor
Examples
data(snp_example)
varlist <- c("trt1","trt2","trt3")
polycorr(snp_example, varlist)
Convert P-values to Z-scores
Description
This function takes a data frame of p-values and converts them to Z-scores using the quantile function for the standard normal distribution.
Usage
pvalues_to_zscores(df_pvalues)
Arguments
df_pvalues |
data frame containing p-values |
Value
data frame containing Z-scores
Author(s)
Woo Jung
See Also
Examples
data(snp_example)
head(snp_example)
pvalues_to_zscores(snp_example)
Example SNP summary dataset
Description
This data set provides 3 simulated 19-sample SNP-trait association p-values
Usage
snp_example
Format
A dataframe containing 19 observations across 3 SNP scans
Example SNP summary dataset with missing values
Description
This data set provides 3 simulated 19-sample SNP-trait association p-values where some samples are removed to reflect missing values.
Usage
snp_example_missing
Format
A dataframe containing 19 observations across 3 SNP scans
Calculate Tetrachoric Correlations
Description
This function calculates the tetrachoric correlations between pairs of variables in a given data frame. It returns a list containing a data frame with the tetrachoric correlation coefficients, and the sum of the tetrachoric correlations if the input variable was in p-value form.
Usage
tetracorr(data, varlist)
Arguments
data |
data frame with "markname" and study names as column names. |
varlist |
character vector of study names to include in the meta-analysis. |
Value
list containing a data frame with tetrachoric correlation coefficients, and the sum of the tetrachoric correlations if the input variable was in p-value form.
Author(s)
Woo Jung
See Also
polychor
Examples
data(snp_example)
head(snp_example)
varlist <- c("trt1","trt2","trt3")
tetracorr(snp_example, varlist)