View source: R/GWAS_summary_input.R
GWAS_summary_input | R Documentation |
Input and progress the GWAS summary statistics data filter the maf and the sex chrom data
GWAS_summary_input(
Pagwas = NULL,
gwas_data = NULL,
maf_filter = 0.01,
Sex_filter = TRUE,
MHC_filter = TRUE,
gwas_z_filter = -1
)
Pagwas |
Pagwas format, deault is NULL. |
gwas_data |
A data set object, need a data frame format, There must be have colomue with 'chrom', 'pos', 'rsid', 'beta', 'se', 'maf' |
maf_filter |
Filter the maf, default is <0.01 |
Sex_filter |
Filter the SNPs in Sex chromosome, default is TRUE. |
MHC_filter |
Filter the SNPs in MHC chromosome, default is TRUE. |
gwas_z_filter |
Filter the z-score, calculated by abs(beta/se) |
Returns a list:
gwas_data |
filtered gwas summary data frame. |
Chunyu Deng
library(scPagwas)
Pagwas <- list()
gwas_data <- bigreadr::fread2(system.file("extdata",
"GWAS_summ_example.txt",
package = "scPagwas"
))
Pagwas <- GWAS_summary_input(Pagwas = Pagwas, gwas_data = gwas_data)
head(Pagwas$gwas_data)
# chrom pos rsid se beta maf
# 1 chr1 1138913 rs3819001 0.0724484 4.774317e-01 0.06761
# 2 chr1 1691050 rs35672141 0.0368296 1.108626e-01 0.48200
# 3 chr1 1722932 rs3737628 0.0324817 7.881858e-02 0.48820
# 4 chr1 2369498 rs4592207 0.0399954 8.822031e-02 0.41790
# 5 chr1 3259369 rs2483286 0.0352555 1.541813e-03 0.30470
# 6 chr1 3811790 rs12085743 0.0405247 2.465163e-05 0.18500
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.