This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Plotting PCA and Admixture for CNVs

Hi there, I have genotyped CNV segments to five types (0, 1, 2,3, 4) according to its original copy number and made a matrix (sample names as Row names and CNVs as Column names). I want to plot PCA and admixture. I would be grateful if I can receive any suggestions or related R scripts.

r

What have you tried? Have you gone down the prcomp/ggfortify::autoplot route? How about the PCAtools route?

I did not try, sorry I am new to this analysis I just made a matrix according to the CNV segments as shown below, but its big(1700 rows, 9000 columns), I would be grateful if I can receive hints for Plotting PCA?

Sample  chr1:100-3000 chr5:852-8688 chr2:14407-15495  chr17:60125-70210
     AFA    1   2   2   2   
     AFA    2   0   2   3   
     AFA    1   4   2   0   
     AFA    2   2   4   2   
     AFB    1   2   2   2   
     AFB    1   2   2   2   
     AFB    2   2   2   2   
     AFC    2   2   2   3   
     AFC    2   2   2   2

Please just google for "r pca". You'll get tons of tutorials.

I added a reply yesterday but it looks like that got lost in the website migration. Like Malte Petersen says, Google "R pca plot" and follow a basic prcomp tutorial.

0 answers

No answers yet.

Log in to answer this question.