ldRACER.Rd
This group of functions allows you to creat a plot of -log10(P-values) of an association study by their genomic position, for example, the results of a GWAS or eQTL study. This function takes the rsID of a reference SNP and calculates LD for all other SNPs in the dataset using the 1000 Genomes Phase III Data. This function may also find the most significantly associated SNP in the input data set and use it as the lead SNP (auto_snp = TRUE). The input of the function should already have been formatted using formatRACER().
ldRACER(assoc_data, rs_col, pops, lead_snp = NULL, auto_snp = FALSE)
assoc_data | required. A dataframe produced by by formatRACER() |
---|---|
rs_col | required. numeric or character. index of column or name of column containing rsID numbers for SNPs |
pops | required. Populations used to calculate LD. |
lead_snp | required, unless auto_snp = TRUE. Required if ldby = "1000genomes". snp used to calculate LD |
auto_snp | logical. default = FALSE, can be set to TRUE to calculate LD using the highest LOG10P SNP as the reference |
# NOT RUN { data(mark3_bmd_gwas) mark3_bmd_gwas_f = formatRACER(assoc_data = mark3_bmd_gwas, chr_col = 3, pos_col = 4, p_col = 11) head(ldRACER(assoc_data = mark3_bmd_gwas_f, rs_col = 5, pops = c("EUR"), lead_snp = "rs11623869")) # }