gtable_ld_gdata | R Documentation |
Compute linkage disequilibrium using snprelate_ld on a set of SNP indexes and call gtable_ld. Two parameters are available to compute and compare minor allele frequency filtering and TagSNP selection by displaying two LD plots with their positions in the center. The maf and r2 parameters are used similarly and as follows: - compare baseline with MAF 5 gtable_ld(gdata, snps_idx, maf = 0.05) - compare baseline with TagSNP r2 = 0.8 gtable_ld(gdata, snps_idx, r2 = 0.8) - compare 5 gtable_ld(gdata, snps_idx, maf = c(0.05, 0.05), r2 = 0.8) - compare MAF 5 gtable_ld(gdata, snps_idx, maf = c(0.05, 0.1), r2 = c(0.8, 0.6))
gtable_ld_gdata(
gdata,
snps_idx,
maf = NULL,
r2 = NULL,
diamonds = length(snps_idx) < 40,
window = 15,
autotitle = TRUE,
autotitle_bp = TRUE,
double_title = FALSE,
...
)
gdata |
GenotypeData object returned by load_gds_as_genotype_data |
snps_idx |
SNPs indexes to select |
maf |
Minor allele frequency threshold(s), see description |
r2 |
TagSNP r2 threshold(s), see description |
diamonds |
Display the values as diamonds or as points Default is TRUE for less than 40 SNPs. |
window |
Window size for snprelate_ld. Forced to the total number of SNPs if diamonds is FALSE |
autotitle |
Set title to feature selection method(s), number of SNPs and chromosome |
autotitle_bp |
Set biplot title to feature selection method(s), number of SNPs and chromosome |
double_title |
Logical, if false (default) keep only biplot title |
... |
Passed to gtable_ld |
gtable of ggplots
library(snplinkage)
gds_path <- save_hgdp_as_gds()
gdata <- load_gds_as_genotype_data(gds_path)
qc <- snprelate_qc(gdata, tagsnp = .99)
snp_idxs_1p13_large <- select_region_idxs(qc$gdata, chromosome = 1,
position_min = 114e6, n_snps = 100)
plt <- gtable_ld_gdata(qc$gdata, snp_idxs_1p13_large)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.