Open
Conversation
Contributor
Author
|
This is ready for review @standage. Let's talk next week about it! |
standage
reviewed
Oct 15, 2025
| centroids = function(groups, pca, inpath, ID) { | ||
| dir.create(file.path(inpath, "Centroids_Plots"), showWarnings = FALSE, recursive=TRUE) | ||
|
|
||
| ancestry_colors = read.table("/Users/rebecca.mitchell/Desktop/ancestry_colors.txt", header=T, sep="\t") %>% |
Member
There was a problem hiding this comment.
To fix, if not already: hard-coded path
Comment on lines
+34
to
+37
| ncols=ncol(geno) | ||
| geno_filt=geno[,c(7:ncols)] | ||
| snps = data.frame("snp_id"=colnames(geno_filt)) | ||
| snps = snps %>% |
Member
There was a problem hiding this comment.
Code autoformatting could give a more consistent style in these files. Something to consider.
|
|
||
| ancestry_colors = read.table("/Users/rebecca.mitchell/Desktop/ancestry_colors.txt", header=T, sep="\t") %>% | ||
| add_row(id = "Unk", reg = "Unk", population = "Unk", color="red", superpop_color="red") %>% | ||
| add_row(id= "Centroid", reg = "Centroid", population = "Centroid", color = "black", superpop_color="black") |
Member
There was a problem hiding this comment.
Showing up as white for some reason?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ancestry prediction using PCA to MixDeR. Reference data from 1000 Genomes is used in PCA.
The method first performs an initial deconvolution using the same method as established in the mixture deconvolution step utilizing the 1000 Genomes Global population allele frequency data. The 54 ancestry SNPs are then extracted from each single source inferred SNP profile, added to the 1000 Genomes reference dataset and PCA is performed for each contributor. The PCA plots are created and saved to the specified output directory. The user can then examine and determine if the contributor's ancestry can be determined. The user can then choose to use the predicted super population allele frequency data in the mixture deconvolution step (which will also be provided in MixDeR) or use the global allele frequency data.