standardize | R Documentation |
After querying a subset of the full summary statistics, this function converts it into a standardized format that the rest of echolocatoR can work with.
standardize(
query,
subset_path = NULL,
locus = NULL,
colmap = construct_colmap(),
compute_n = "ldsc",
return_dt = TRUE,
nThread = 1,
verbose = TRUE
)
query |
data.frame of summary stat. |
subset_path |
Path where the |
locus |
Locus name. |
colmap |
Column mapping object created using construct_colmap. |
compute_n |
How to compute per-SNP sample size (new column "N").
|
return_dt |
Return data.table or path to saved data.table. |
nThread |
Number of threads to parallelise saving across. |
verbose |
Print messages. |
query <- echodata::BST1
#### Screw up data
query$rsid <- query$SNP
query <- query[,-c("MAF","SNP")]
query[c(10,30,55),"Freq"] <- 0
query[c(12,22),"Freq"] <- NA
subset_path <- file.path(tempdir(),"BST1.tsv")
colmap = construct_colmap(SNP="rsid")
query2 <- echodata::standardize(query = query,
subset_path = subset_path,
locus = "BST1",
colmap = colmap)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.