• Don't want to see ads? Install an adblocker like uBlock Origin or use a Europe-based privacy-friendly browser like Vivaldi or Mullvad.

Admixtools Academic qpAdm Model Replication

Jovialis

Advisor
Messages
9,901
Reaction score
6,809
Points
113
Ethnic group
Italian
Y-DNA haplogroup
R1b-PF7566>Y227216
mtDNA haplogroup
H6a1b7
With a big thanks to Maciamo for creating it, we are proud to announce the creation of the Admixtools sub-forum!

This thread will be dedicated to the re-creation of qpadm models from academic papers.
The object of the thread is to post FAM or Ind files that are modified to replicate a select study of your choice. As well discovery of novel insights based on those replications.

Since I already did one myself, here is the FAM for a replication of Raveane et al. 2022:

 
Sarno et al. 2021 right and left group:


Prompt

Code:
# Define paths for dataset
prefix = "D:\\Bioinformatics\\01_Admixtools_Dataset\\v54.1.p1_HO_Jovialis_Plink\\v54.1.p1_HO_Jovialis"
my_f2_dir = "D:\\Bioinformatics\\my_f2_dir_Jovialis"


# Load necessary libraries
library(admixtools)
library(tidyverse)


# Define populations
target = c('Italian_South.HO')  # Update this if your sample has a different name in the merged dataset
left = c('Steppe_EMBA', 'Anatolia_N', 'WHG', 'CHG_Iran_N')


# Right list
right = c('Ust_Ishim', 'Kostenki14', 'MA1_HG', 'Goyet', 'ElMiron', 'Vestonice16', 'Villabruna', 'EHG', 'Levant_N', 'Natufian', 'Mota')


# Generate f2 stats
mypops = c(right, target, left)
extract_f2(prefix, my_f2_dir, pops = mypops, overwrite = TRUE, maxmiss = 1)
f2_blocks = f2_from_precomp(my_f2_dir, pops = mypops, afprod = TRUE)


# Run the model
results = qpadm(prefix, left, right, target, allsnps = TRUE)
results$weights
results$popdrop

 
Skourtonioti et al. 2023 R11 set for Right group:

Code:
# ---- Skourtanioti et al. 2023 qpAdm Reference model ----

# Set the correct dataset path
prefix <- "D:\\Bioinformatics\\01_Admixtools_Dataset\\v54.1.p1_HO_Jovialis_Plink\\Skourtanioti_2023\\v54.1.p1_HO_Jovialis"
my_f2_dir <- "D:\\Bioinformatics\\my_f2_dir_Jovialis"

# Load necessary libraries
library(admixtools)
library(tidyverse)

# Define populations
target <- c('Jovialis')
left <- c('Greece_Minoan_Lassithi', 'Germany_CordedWare')
right <- c('Ethiopia_4500BP.SG', 'Russia_Ust_Ishim_HG.DG', 'Russia_Kostenki14.SG', 'Serbia_IronGates_Mesolithic', 'WHG', 'CHG', 'EEHG', 'W_Anatolia_N', 'Iran_GanjDareh_N', 'Israel_Natufian', 'ANE')

# Generate f2 Stats
mypops <- c(right, target, left)
extract_f2(prefix, my_f2_dir, pops = mypops, overwrite = TRUE, maxmiss = 1)
f2_blocks <- f2_from_precomp(my_f2_dir, pops = mypops, afprod = TRUE)

# Run the Model
results <- qpadm(prefix, left, right, target, allsnps = TRUE)
results$weights
results$popdrop

 
Skourtanioti et al. 2023 for v62.0 AADR:

Script:
Code:
# ---- Skourtanioti et al. 2023 qpAdm Reference model (Plink format AADR 62.0) ----

prefix <- "D:\\Bioinformatics\\01_Admixtools_Dataset\\V62.0_HO_Plink_Merged_Jovialis\\v62.0_Jovialis_Merged"

library(admixtools)
library(tidyverse)

target <- c('Jovialis')
left <- c('Greece_Crete_HgCharalambos_EMBA.AG', 'Italy_PianSultano_BA.SG')
right <- c('Ethiopia_4500BP.AG', 'Russia_UstIshim_IUP.DG', 'Russia_Kostenki14_UP.SG', 'Serbia_IronGates_Mesolithic.AG', 'WHG', 'CHG', 'EEHG', 'W_Anatolia_N', 'Iran_GanjDareh_N.AG', 'Israel_Natufian.AG', 'ANE')

results <- qpadm(prefix, left, right, target, allsnps = TRUE)

print(results$weights)
print(results$popdrop)

FAM:
 
Last edited:
Back
Top