Title: | Correlated Meta-Analysis (corrmeta) |
---|---|
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. |
Authors: | Woo Seok Jung <[email protected]>, Michael Province <[email protected]> |
Maintainer: | Woo Seok Jung <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.0 |
Built: | 2024-10-06 03:02:59 UTC |
Source: | https://github.com/wsjung/corrmeta |
Calculate Fisher's method p-value and meta-analysis statistics
fishp(df, vars, df_sigma, sum_sigma)
fishp(df, vars, df_sigma, sum_sigma)
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. |
A data frame with columns 'markname', 'sum_chisq', 'sum_z', 'sum_sigma_var', 'pvalue', 'meta_z', 'meta_p', 'meta_nlog10p'
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)
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 nonsignificant values
generate_random_p_values(n, ratio_significant)
generate_random_p_values(n, ratio_significant)
n |
number of samples |
ratio_significant |
fraction of p-values to be significant |
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.
polycorr(data, varlist)
polycorr(data, varlist)
data |
data frame with "markname" and study names as column names. |
varlist |
character vector of study names to include in the meta-analysis. |
data frame with polychoric correlation coefficients and standard errors
Woo Jung
data(snp_example) varlist <- c("trt1","trt2","trt3") polycorr(snp_example, varlist)
data(snp_example) varlist <- c("trt1","trt2","trt3") polycorr(snp_example, varlist)
This function takes a data frame of p-values and converts them to Z-scores using the quantile function for the standard normal distribution.
pvalues_to_zscores(df_pvalues)
pvalues_to_zscores(df_pvalues)
df_pvalues |
data frame containing p-values |
data frame containing Z-scores
Woo Jung
data(snp_example) head(snp_example) pvalues_to_zscores(snp_example)
data(snp_example) head(snp_example) pvalues_to_zscores(snp_example)
This data set provides 3 simulated 19-sample SNP-trait association p-values
snp_example
snp_example
A dataframe containing 19 observations across 3 SNP scans
This data set provides 3 simulated 19-sample SNP-trait association p-values where some samples are removed to reflect missing values.
snp_example_missing
snp_example_missing
A dataframe containing 19 observations across 3 SNP scans
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.
tetracorr(data, varlist)
tetracorr(data, varlist)
data |
data frame with "markname" and study names as column names. |
varlist |
character vector of study names to include in the meta-analysis. |
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.
Woo Jung
data(snp_example) head(snp_example) varlist <- c("trt1","trt2","trt3") tetracorr(snp_example, varlist)
data(snp_example) head(snp_example) varlist <- c("trt1","trt2","trt3") tetracorr(snp_example, varlist)