You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am working on a PCA analysis of some populations for a conservation genetics project on a crayfish species. My DAPC analysis did not show significant structure between sites, so I thought is would use a PCA approach as I understand this tries to look at individual differences (not group differences). I am able to use the SNPrelate tutorial to a point, but my VCF file does not contain population assignment information. I am not able to see on the plots the population affiliation of the data points. I see that you are importing a population file but I was not able to see how this is formatted. I’m pasting a screenshot of my R-code. Can you tell me the format of the file you are using to add population information? Also, is it possible to label individuals in the plots? I can see that I have a couple of outlier individuals and I would like to look closer at the data to see if there is something fishy.
The text was updated successfully, but these errors were encountered:
pop_code is just a vector of characters. Your question is more related to R programming itself, rather than SNPRelate.
You can import pop_code from a text file:
e.g., pop_code <- readLines("your_file"), each line for an individual.
YRI
YRI
CEU
...
And finally merge it with sample ID and eigenvectors:
Hello,
I am working on a PCA analysis of some populations for a conservation genetics project on a crayfish species. My DAPC analysis did not show significant structure between sites, so I thought is would use a PCA approach as I understand this tries to look at individual differences (not group differences). I am able to use the SNPrelate tutorial to a point, but my VCF file does not contain population assignment information. I am not able to see on the plots the population affiliation of the data points. I see that you are importing a population file but I was not able to see how this is formatted. I’m pasting a screenshot of my R-code. Can you tell me the format of the file you are using to add population information? Also, is it possible to label individuals in the plots? I can see that I have a couple of outlier individuals and I would like to look closer at the data to see if there is something fishy.
The text was updated successfully, but these errors were encountered: