View source: R/create_gene_covar_file.r
create_gene_covar_file | R Documentation |
The gene covariannce (covar) file is the input to MAGMA for the celltype association analysis. This code was functonalised because it is called by both baseline and conditional analysis.
create_gene_covar_file(
genesOutFile,
ctd,
annotLevel,
ctd_species,
genesOutCOND = NA,
verbose = TRUE
)
genesOutFile |
The output of the second call to MAGMA (performed in the map_snps_to_genes function). |
ctd |
Cell type data structure. Must contain quantiles. |
annotLevel |
Annot level for which the gene covar file should be constructed |
ctd_species |
Species name relevant to the cell type data, i.e. "mouse" or "human" |
genesOutCOND |
[Optional] Path to a genes.out file to condition on. Used if you want to condition on a different GWAS. |
verbose |
Print messages. |
File path for the gene covar file.
#### Example usage ####
ctd <- ewceData::ctd()
genesOutFile <- MAGMA.Celltyping::import_magma_files(
ids = "ieu-a-298",
file_types = ".genes.out$",
return_dir = FALSE)
genesCovarFilePath <- MAGMA.Celltyping:::create_gene_covar_file(
genesOutFile = genesOutFile,
ctd = ctd,
annotLevel = 1,
ctd_species = "mouse")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.