This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Draw a pca diagram of plink data in R

Hi, I want to plot P C 1 and P C 2 of plink .ei genvec data in R but there is a problem I can not use all the file samples in the chart. Thankful

r plink pca

Hello mohsen!

This question in its current form does not look related to bioinformatics. Please add more detail on what this question is about and what you've tried.

How do you expect us to help you if you don't show any code or error?

Hi, I got the following error with this command code:

col <-c("breed1"="red" ,"breed2"="yellow" ,"breed3"="green" ,"breed4"="orange" ,"breed5"="brown" ,"breed6"="pink" ,"breed7"="maroon" ,"breed8"="cyan" ,"breed9"="firebreck1" ,"breed10"="blue" ,"breed11"="bisque" ,"breed12"="chartreuse4")
tab1 %>% mutate(group=substr(breeds,1,3))  %>% ggplot(.,aes(x=PC1,y=PC2))  +
+ geom_point (aes(colour=breeds))+scale_color_manual(values=col)

Error: Insufficient values in manual scale. 121 needed but only 12 provided.

0 answers

No answers yet.

Log in to answer this question.