-
Notifications
You must be signed in to change notification settings - Fork 1
Ancestry Prediction Tool #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
This is ready for review @standage. Let's talk next week about it! |
| 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") %>% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix, if not already: hard-coded path
| ncols=ncol(geno) | ||
| geno_filt=geno[,c(7:ncols)] | ||
| snps = data.frame("snp_id"=colnames(geno_filt)) | ||
| snps = snps %>% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Showing up as white for some reason?
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.