Learn R Programming

Linkage Disequilibrium of Ancestry (LDA) and LDA score

This is the location for the LDA and LDA score tools that were used in Barrie, W., Yang, Y., Irving-Pease, E.K. et al. Elevated genetic risk for multiple sclerosis emerged in steppe pastoralist populations. Nature 625, 321–328 (2024).

Introduction

Linkage Disequilibrium of Ancestry (LDA) quantifies the correlations between the ancestry of two SNPs, measuring the proportion of individuals who have experienced a recombination leading to a change in ancestry, relative to the genome-wide baseline.

LDA score is the total amount of genome in LDA with each SNP (measured in recombination map distance), which is useful for detecting the signal of selection.

Install R package "LDAandLDAS"

R Package "LDAandLDAS" includes two functions "LDA" and "LDAS" for calculating LDA and LDA score, respectively.

You can download the R package by typing the following codes in R:

devtools::install_github("YaolingYang/LDAandLDAscore")

Examples

library(LDAandLDAS)

# visualize the painting data
# Painting data are the average probabilities of different populations
head(LDAandLDAS::example_painting_p1[1:5,],10)

# combine the painting data for two ancestries as a list
# to make to input data for function 'LDA'.
paintings=list(LDAandLDAS::example_painting_p1,
          LDAandLDAS::example_painting_p2)
          
# calculate the pairwise LDA of SNPs
LDA_result <- LDA(paintings)

# map is the data containing two columns
# The first column is the physical position (unit: b) (decreasing order)
# The second column is the recombination distance (unit: cM) of the SNPs
head(LDAandLDAS::example_map,10)

# calculate the LDA score for the SNPs
LDA_score <- LDAS(LDA_result,LDAandLDAS::example_map,window=10)

#visualize the LDA scores
plot(x=LDA_score$SNP,y=LDA_score$LDAS)

Copy Link

Version

Install

install.packages('LDAandLDAS')

Monthly Downloads

179

Version

1.1.3

License

GPL-3

Maintainer

Yaoling Yang

Last Published

February 9th, 2024

Functions in LDAandLDAS (1.1.3)

example_painting_p2

Example painting data for population 2.
LDAS

LDA Score
LDA

LDA of all pairs of SNPs
LDAandLDAS-package

Linkage Disequilibrium of Ancestry (LDA) and LDA Score (LDAS)
cal_lda

LDA of a pair of SNPs
example_map

Example genetic maps
example_painting_p1

Example painting data for population 1.