Skip to main content
100%

Plot PCA for ethnicity from any given VCF file combined with 1000 genomes data

✓ Published0🌍 Public
FFloWuenne
Last edited Nov 22, 2017
Created on Nov 22, 2017

This visualization plots principal component analysis (PCA) results from a user-provided VCF file, combined with 1000 Genomes reference data, to infer ethnic ancestry. It shows a scatterplot of PC1 versus PC2, where each point represents a sample, colored by population assignment. The code uses the `SNPRelate` package to convert the VCF to GDS format, perform LD-based SNP pruning, and run PCA, while `ggplot2` renders the final plot. Ethnicity labels are merged from an external population table, and a custom publication theme colors the points.

AI-generated description

Similar vizzes