You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the number of loci of the AMR subset of 1000 Genomes dataset is too large for a quick analysis, we created a subset of this dataset by first applying allele frequency filters and LD-pruning to the AMR dataset. We then randomly selected 10,000 SNPs out of LD-pruned SNP sets. We also re-ordered individuals according to their pairwise kinship level. This subset is available in `data/X_amr.rda`. This data has `r nrow(X_amr)` individuals and `r ncol(X_amr)` loci. The associated fam file can be found in `data/fam_amr.rda`. These data can be reproduced by scripts `data-raw/{amr.bash,amr.R}`.
236
236
237
-
We adopt the `popkin` package to obtain the Ochoa-Storey (OS) estimate of coancestry among individuals. The following chunk of the code estimates the individual-level coancestry according to the Ochoa-Storey (OS) method by `popkin` package. It should noted that the `popkin` function returns the kinship coefficients instead of the coancestry coefficients. Therefore, we use the `inbr_diag` function in the `popkin` package to map kinship coefficients $\phi_{jk}$'s to coancestry coefficients $\theta_{jk}$'s:
237
+
We adopt the `popkin` package to obtain the Ochoa-Storey (OS) estimate of coancestry among individuals. The following chunk of the code estimates the individual-level coancestry $\hat{\boldsymbol{\Theta}}^{\text{OS}}$ according to the Ochoa-Storey (OS) method by `popkin` package. It should noted that the `popkin` function returns the kinship coefficients instead of the coancestry coefficients. Therefore, we use the `inbr_diag` function in the `popkin` package to map kinship coefficients $\phi_{jk}$'s to coancestry coefficients $\theta_{jk}$'s:
## Estimating admixture proportions and coancestry among antecedent populations
310
310
311
-
The following chunk of the code estimates the admixture proportions $\bQ$ from genotypes. We first estimate the individual specific allele frequencies $\boldsymbol{\Pi}$ using the `est_p_indiv` function in the `superadmixture` package. We then estimate $\bQ$ by decomposing $\boldsymbol{\Pi}$ with `factor_p_indiv` function in the `superadmixture` package.
311
+
The following chunk of the code estimates the admixture proportions $\bQ$ from genotypes. We first estimate the individual specific allele frequencies $\boldsymbol{\Pi}$ using the `est_p_indiv` function in the `superadmixture` package. We then estimate $\bQ$ by decomposing $\boldsymbol{\Pi}$ with `factor_p_indiv` function in the `superadmixture` package.
After obtaining individual-level coancestry `coanc_indiv` and admixture proportions `Q_hat`, we can use the function `est_coanc` to estimate population coancestry under the super admixture model and under the standard admixture model.
326
+
After obtaining individual-level coancestry `coanc_indiv` and admixture proportions `Q_hat`, we can use the function `est_coanc` to estimate population coancestry $\boldsymbol{\Lambda}$ under the super admixture model and under the standard admixture model. In our manuscript, `coanc_pops_sup` is denoted as $\hat{\boldsymbol{\Lambda}}^{\text{sup}}$ and `coanc_pops_std` is denoted as $\hat{\boldsymbol{\Lambda}}^{\text{std}}$.
## Calculating the individual-level coancestry under the super admixture and standard admixture
383
383
384
-
We then obtain the corresponding individual-coancestry under the super admixture model and under the standard admixture model.
384
+
We then obtain the corresponding individual-coancestry under the super admixture model and under the standard admixture model. In our manuscript, `coanc_sup` is denoted as $\hat{\boldsymbol{\Theta}}^{\text{sup}}$ and `coanc_std` is denoted as $\hat{\boldsymbol{\Theta}}^{\text{std}}$.
We can visualize the individual-level coancestry of the simulated data using `plot_popkin` function in the `popkin`function. We use the following helper function `plot_colors_subpops` to label the sub-populations.
492
+
We can visualize the individual-level coancestry of the simulated data using `plot_popkin` function in the `popkin`package. We use the following helper function `plot_colors_subpops` to label the sub-populations.
After obtaining individual-level coancestry `coanc_indiv` and admixture proportions `Q_hat`, we can use the function `est_coanc` to estimate population coancestry under the super admixture model and under the standard admixture model. The output `coanc_pops_sup` is the coancestry of antecedent populations $\boldsymbol{\Lambda}$ in our manuscript.
541
+
After obtaining individual-level coancestry `coanc_indiv` and admixture proportions `Q_hat`, we can use the function `est_coanc` to estimate population coancestry $\boldsymbol{\Lambda}$ under the super admixture model and under the standard admixture model. In our manuscript, `coanc_pops_sup` is denoted as $\hat{\boldsymbol{\Lambda}}^{\text{sup}}$ and `coanc_pops_std` is denoted as $\hat{\boldsymbol{\Lambda}}^{\text{std}}$.
## Calculating individual-level coancestry under the super admixture and standard admixture
608
608
609
-
We then obtain the corresponding individual-coancestry under the super admixture model and under the standard admixture model.
609
+
We then obtain the corresponding individual-coancestry under the super admixture model and under the standard admixture model. In our manuscript, `coanc_sup` is denoted as $\hat{\boldsymbol{\Theta}}^{\text{sup}}$ and `coanc_std` is denoted as $\hat{\boldsymbol{\Theta}}^{\text{std}}$.
Since the number of loci of the AMR subset of 1000 Genomes dataset is too large for a quick analysis, we created a subset of this dataset by first applying allele frequency filters and LD-pruning to the AMR dataset. We then randomly selected 10,000 SNPs out of LD-pruned SNP sets. We also re-ordered individuals according to their pairwise kinship level. This subset is available in `data/X_amr.rda`. This data has `r nrow(X_amr)` individuals and `r ncol(X_amr)` loci. The associated fam file can be found in `data/fam_amr.rda`. These data can be reproduced by scripts `data-raw/{amr.bash,amr.R}`.
236
236
237
-
We adopt the `popkin` package to obtain the Ochoa-Storey (OS) estimate of coancestry among individuals. The following chunk of the code estimates the individual-level coancestry according to the Ochoa-Storey (OS) method by `popkin` package. It should noted that the `popkin` function returns the kinship coefficients instead of the coancestry coefficients. Therefore, we use the `inbr_diag` function in the `popkin` package to map kinship coefficients $\phi_{jk}$'s to coancestry coefficients $\theta_{jk}$'s:
237
+
We adopt the `popkin` package to obtain the Ochoa-Storey (OS) estimate of coancestry among individuals. The following chunk of the code estimates the individual-level coancestry $\hat{\boldsymbol{\Theta}}^{\text{OS}}$ according to the Ochoa-Storey (OS) method by `popkin` package. It should noted that the `popkin` function returns the kinship coefficients instead of the coancestry coefficients. Therefore, we use the `inbr_diag` function in the `popkin` package to map kinship coefficients $\phi_{jk}$'s to coancestry coefficients $\theta_{jk}$'s:
## Estimating admixture proportions and coancestry among antecedent populations
310
310
311
-
The following chunk of the code estimates the admixture proportions $\bQ$ from genotypes. We first estimate the individual specific allele frequencies $\boldsymbol{\Pi}$ using the `est_p_indiv` function in the `superadmixture` package. We then estimate $\bQ$ by decomposing $\boldsymbol{\Pi}$ with `factor_p_indiv` function in the `superadmixture` package.
311
+
The following chunk of the code estimates the admixture proportions $\bQ$ from genotypes. We first estimate the individual specific allele frequencies $\boldsymbol{\Pi}$ using the `est_p_indiv` function in the `superadmixture` package. We then estimate $\bQ$ by decomposing $\boldsymbol{\Pi}$ with `factor_p_indiv` function in the `superadmixture` package.
After obtaining individual-level coancestry `coanc_indiv` and admixture proportions `Q_hat`, we can use the function `est_coanc` to estimate population coancestry under the super admixture model and under the standard admixture model.
326
+
After obtaining individual-level coancestry `coanc_indiv` and admixture proportions `Q_hat`, we can use the function `est_coanc` to estimate population coancestry $\boldsymbol{\Lambda}$ under the super admixture model and under the standard admixture model. In our manuscript, `coanc_pops_sup` is denoted as $\hat{\boldsymbol{\Lambda}}^{\text{sup}}$ and `coanc_pops_std` is denoted as $\hat{\boldsymbol{\Lambda}}^{\text{std}}$.
## Calculating the individual-level coancestry under the super admixture and standard admixture
383
383
384
-
We then obtain the corresponding individual-coancestry under the super admixture model and under the standard admixture model.
384
+
We then obtain the corresponding individual-coancestry under the super admixture model and under the standard admixture model. In our manuscript, `coanc_sup` is denoted as $\hat{\boldsymbol{\Theta}}^{\text{sup}}$ and `coanc_std` is denoted as $\hat{\boldsymbol{\Theta}}^{\text{std}}$.
We can visualize the individual-level coancestry of the simulated data using `plot_popkin` function in the `popkin`function. We use the following helper function `plot_colors_subpops` to label the sub-populations.
492
+
We can visualize the individual-level coancestry of the simulated data using `plot_popkin` function in the `popkin`package. We use the following helper function `plot_colors_subpops` to label the sub-populations.
After obtaining individual-level coancestry `coanc_indiv` and admixture proportions `Q_hat`, we can use the function `est_coanc` to estimate population coancestry under the super admixture model and under the standard admixture model. The output `coanc_pops_sup` is the coancestry of antecedent populations $\boldsymbol{\Lambda}$ in our manuscript.
541
+
After obtaining individual-level coancestry `coanc_indiv` and admixture proportions `Q_hat`, we can use the function `est_coanc` to estimate population coancestry $\boldsymbol{\Lambda}$ under the super admixture model and under the standard admixture model. In our manuscript, `coanc_pops_sup` is denoted as $\hat{\boldsymbol{\Lambda}}^{\text{sup}}$ and `coanc_pops_std` is denoted as $\hat{\boldsymbol{\Lambda}}^{\text{std}}$.
## Calculating individual-level coancestry under the super admixture and standard admixture
608
608
609
-
We then obtain the corresponding individual-coancestry under the super admixture model and under the standard admixture model.
609
+
We then obtain the corresponding individual-coancestry under the super admixture model and under the standard admixture model. In our manuscript, `coanc_sup` is denoted as $\hat{\boldsymbol{\Theta}}^{\text{sup}}$ and `coanc_std` is denoted as $\hat{\boldsymbol{\Theta}}^{\text{std}}$.
0 commit comments