Jovialis

Advisor
Messages
9,229
Reaction score
5,685
Points
113
Ethnic group
Italian
Y-DNA haplogroup
R-PF7566 (R-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


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

7CaDgvf.png


Jovialis

Steppe_EMBA: 21.3%
Anatolia_N: 47.3%
WHG: 5.72%
CHG_Iran_N: 25.8%

Italian_South.HO

Steppe_EMBA: 17.9%
Anatolia_N: 56%
WHG: 1.58%
CHG_Iran_N: 24.5%

Italian_North.HO

Steppe: 28.3%
Anatolia_N: 56.6%
WHG: 6.89%
CHG_Iran_N: 14.2%

Code:
> results$weights
# A tibble: 4 × 5
target   left        weight     se     z
<chr>    <chr>        <dbl>  <dbl> <dbl>
1 Jovialis Steppe_EMBA 0.213  0.0729  2.92
2 Jovialis Anatolia_N  0.473  0.0534  8.85
3 Jovialis WHG         0.0572 0.0278  2.05
4 Jovialis CHG_Iran_N  0.258  0.0829  3.11
> results$popdrop
# A tibble: 15 × 15
pat      wt   dof   chisq         p f4rank Steppe_EMBA Anatolia_N     WHG CHG_Iran_N feasible best  dofdiff chisqdiff p_nested
<chr> <dbl> <dbl>   <dbl>     <dbl>  <dbl>       <dbl>      <dbl>   <dbl>      <dbl> <lgl>    <lgl>   <dbl>     <dbl>    <dbl>
1 0000      0     7    3.88 7.93e-  1      3      0.213       0.473  0.0572      0.258 TRUE     NA         NA      NA         NA
2 0001      1     8   42.1  1.30e-  6      2      0.377       0.605  0.0182     NA     TRUE     TRUE        0      26.2        0
3 0010      1     8   15.9  4.32e-  2      2      0.302       0.494 NA           0.204 TRUE     TRUE        0    -148.         1
4 0100      1     8  164.   2.60e- 31      2     -0.173      NA      0.189       0.984 FALSE    TRUE        0     122.         0
5 1000      1     8   41.6  1.59e-  6      2     NA           0.455  0.105       0.439 TRUE     TRUE       NA      NA         NA
6 0011      2     9   56.5  6.28e-  9      1      0.391       0.609 NA          NA     TRUE     NA         NA      NA         NA
7 0101      2     9  836.   3.01e-174      1      1.10       NA     -0.101      NA     FALSE    NA         NA      NA         NA
8 0110      2     9  282.   1.55e- 55      1      0.0390     NA     NA           0.961 TRUE     NA         NA      NA         NA
9 1001      2     9  340.   1.03e- 67      1     NA           0.886  0.114      NA     TRUE     NA         NA      NA         NA
10 1010      2     9  138.   2.28e- 25      1     NA           0.498 NA           0.502 TRUE     NA         NA      NA         NA
11 1100      2     9  248.   3.10e- 48      1     NA          NA      0.132       0.868 TRUE     NA         NA      NA         NA
12 0111      3    10  949.   1.56e-197      0      1          NA     NA          NA     TRUE     NA         NA      NA         NA
13 1011      3    10  444.   3.61e- 89      0     NA           1     NA          NA     TRUE     NA         NA      NA         NA
14 1101      3    10 1695.   0              0     NA          NA      1          NA     TRUE     NA         NA      NA         NA
15 1110      3    10  348.   1.17e- 68      0     NA          NA     NA           1     TRUE     NA         NA      NA         NA


> results$weights
# A tibble: 4 × 5
target           left        weight     se     z
<chr>            <chr>        <dbl>  <dbl> <dbl>
1 Italian_South.HO WHG         0.0158 0.0134  1.18
2 Italian_South.HO CHG_Iran_N  0.245  0.0431  5.68
3 Italian_South.HO Steppe_EMBA 0.179  0.0360  4.97
4 Italian_South.HO Anatolia_N  0.560  0.0267 21.0
> results$popdrop
# A tibble: 15 × 15
pat      wt   dof  chisq         p f4rank     WHG CHG_Iran_N Steppe_EMBA Anatolia_N feasible best  dofdiff chisqdiff p_nested
<chr> <dbl> <dbl>  <dbl>     <dbl>  <dbl>   <dbl>      <dbl>       <dbl>      <dbl> <lgl>    <lgl>   <dbl>     <dbl>    <dbl>
1 0000      0     7   11.5 1.18e-  1      3  0.0158      0.245       0.179      0.560 TRUE     NA         NA      NA         NA
2 0001      1     8  287.  2.45e- 57      2  0.172       1.18       -0.353     NA     FALSE    TRUE        0     233.         0
3 0010      1     8   53.6 8.39e-  9      2  0.0497      0.416      NA          0.534 TRUE     TRUE        0     -22.4        1
4 0100      1     8   76.0 3.10e- 13      2 -0.0146     NA           0.332      0.682 FALSE    TRUE        0      60.0        0
5 1000      1     8   16.0 4.18e-  2      2 NA           0.232       0.197      0.571 TRUE     TRUE       NA      NA         NA
6 0011      2     9  452.  1.03e- 91      1  0.0677      0.932      NA         NA     TRUE     NA         NA      NA         NA
7 0101      2     9 1378.  4.22e-291      1 -0.499      NA           1.50      NA     FALSE    NA         NA      NA         NA
8 0110      2     9  418.  2.28e- 84      1  0.0668     NA          NA          0.933 TRUE     NA         NA      NA         NA
9 1001      2     9  393.  4.06e- 79      1 NA           1.18       -0.176     NA     FALSE    NA         NA      NA         NA
10 1010      2     9   87.8 4.39e- 15      1 NA           0.446      NA          0.554 TRUE     NA         NA      NA         NA
11 1100      2     9   93.6 3.14e- 16      1 NA          NA           0.314      0.686 TRUE     NA         NA      NA         NA
12 0111      3    10 2241.  0              0  1          NA          NA         NA     TRUE     NA         NA      NA         NA
13 1011      3    10  491.  3.02e- 99      0 NA           1          NA         NA     TRUE     NA         NA      NA         NA
14 1101      3    10 1912.  0              0 NA          NA           1         NA     TRUE     NA         NA      NA         NA
15 1110      3    10  484.  1.27e- 97      0 NA          NA          NA          1     TRUE     NA         NA      NA         NA

> results$weights
# A tibble: 4 × 5
target           left        weight      se     z
<chr>            <chr>        <dbl>   <dbl> <dbl>
1 Italian_North.HO Steppe_EMBA 0.283  0.0230  12.3
2 Italian_North.HO Anatolia_N  0.506  0.0156  32.4
3 Italian_North.HO WHG         0.0689 0.00882  7.81
4 Italian_North.HO CHG_Iran_N  0.142  0.0264   5.38
> results$popdrop
# A tibble: 15 × 15
pat      wt   dof  chisq         p f4rank Steppe_EMBA Anatolia_N     WHG CHG_Iran_N feasible best  dofdiff chisqdiff p_nested
<chr> <dbl> <dbl>  <dbl>     <dbl>  <dbl>       <dbl>      <dbl>   <dbl>      <dbl> <lgl>    <lgl>   <dbl>     <dbl>    <dbl>
1 0000      0     7   13.5 6.03e-  2      3      0.283       0.506  0.0689     0.142  TRUE     NA         NA      NA         NA
2 0001      1     8   50.9 2.74e-  8      2      0.388       0.566  0.0458    NA      TRUE     TRUE        0     -24.0        1
3 0010      1     8   74.9 5.25e- 13      2      0.405       0.550 NA          0.0456 TRUE     TRUE        0    -251.         1
4 0100      1     8  326.  1.16e- 65      2     -0.204      NA      0.203      1.00   FALSE    TRUE        0     168.         0
5 1000      1     8  158.  4.32e- 30      2     NA           0.442  0.130      0.428  TRUE     TRUE       NA      NA         NA
6 0011      2     9   89.1 2.45e- 15      1      0.432       0.568 NA         NA      TRUE     NA         NA      NA         NA
7 0101      2     9 1415.  4.83e-299      1      1.14       NA     -0.137     NA      FALSE    NA         NA      NA         NA
8 0110      2     9  524.  4.65e-107      1     -0.0227     NA     NA          1.02   FALSE    NA         NA      NA         NA
9 1001      2     9  611.  7.94e-126      1     NA           0.815  0.185     NA      TRUE     NA         NA      NA         NA
10 1010      2     9  432.  1.69e- 87      1     NA           0.429 NA          0.571  TRUE     NA         NA      NA         NA
11 1100      2     9  421.  3.58e- 85      1     NA          NA      0.154      0.846  TRUE     NA         NA      NA         NA
12 0111      3    10 1583.  0              0      1          NA     NA         NA      TRUE     NA         NA      NA         NA
13 1011      3    10 1030.  6.62e-215      0     NA           1     NA         NA      TRUE     NA         NA      NA         NA
14 1101      3    10 1952.  0              0     NA          NA      1         NA      TRUE     NA         NA      NA         NA
15 1110      3    10  604.  2.59e-123      0     NA          NA     NA          1      TRUE     NA         NA      NA         NA
 
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.
This meticulous approach is crucial in ensuring the reliability of academic findings and contributing to the advancement of knowledge in the field. For those seeking diverse academic insights beyond model replication, https://gradesfixer.com/essay-collections/the-best-11-must-read-contemporary-books/ provides access to a collection of must-read contemporary books. Just as academic research broadens horizons, these books offer a wealth of perspectives, enriching the intellectual journey.
Since I already did one myself, here is the FAM for a replication of Raveane et al. 2022:

Cool!Thanks!
 

This thread has been viewed 997 times.

Back
Top