[adegenet-forum] R: PCA issue

Roman Lustrik roman.lustrik at biolitika.si
Thu Oct 29 16:50:01 CET 2015


Hi Carlo,

what's the code you used to remove the individuals? Are you sure you performed PCA on a reduced dataset?

Cheers,
Roman

----
In god we trust, all others bring data.

----- Original Message -----
From: "Carlo Pecoraro" <carlo.pecoraro2 at unibo.it>
To: "Roman Lustrik" <roman.lustrik at biolitika.si>
Cc: adegenet-forum at lists.r-forge.r-project.org
Sent: Thursday, October 29, 2015 4:27:36 PM
Subject: R: [adegenet-forum] PCA issue

Hi Roman,

many thanks for your replay and help.

I did a PCA with the following scripts:

x.cows <- tab(x, freq=TRUE, NA.method="mean")
pca.cows <- dudi.pca(x.cows, center=TRUE, scale=FALSE)
s.class(pca.cows$li, fac=pop(x), col=funky(6), cell=2,  cstar=1, cpoint=3)


Then I have tried to label those individuals. which were considerably departing from the centroid of the distribution of each group, using the function:

library(vegan)
orditorp(x = pca.cows, display = "sites", air = 2)


After having labeling those individuals, I removed them from the dataset. But after had tried to do the PCA again in order to see if those individuals have been successfully removed, I've realized that the function ( at least as I am using it) did not work at all.


Thanks a lot for your help once again.
Carlo

-----Messaggio originale-----
Da: Roman Lustrik [mailto:roman.lustrik at biolitika.si] 
Inviato: mercoledì 28 ottobre 2015 09:30
A: Carlo Pecoraro
Cc: adegenet-forum at lists.r-forge.r-project.org
Oggetto: Re: [adegenet-forum] PCA issue

This is what I had in mind (see github gist for image).

https://gist.github.com/romunov/4f6e05cf721829eb2eaa

library(vegan)
N <- 1000
xy <- data.frame(x = rnorm(N), y = rnorm(N), z = rnorm(N))

pca <- prcomp(xy)
plot(pca$x, type = "n")
orditorp(x = pca, display = "sites", air = 2)


Cheers,
Roman

----
In god we trust, all others bring data.

----- Original Message -----
From: "Roman Lustrik" <roman.lustrik at biolitika.si>
To: "Carlo Pecoraro" <carlo.pecoraro2 at unibo.it>
Cc: adegenet-forum at lists.r-forge.r-project.org
Sent: Wednesday, October 28, 2015 7:55:15 AM
Subject: Re: [adegenet-forum] PCA issue



----
In god we trust, all others bring data.
Hi,

I think this would be doable. I think Jari Oksanen made a package/function that handles point labels really well. I'm on my way out, but if others develop, I'll look into this, hopefully later today.

Cheers,
Roman


----- Original Message -----
From: "Carlo Pecoraro" <carlo.pecoraro2 at unibo.it>
To: adegenet-forum at lists.r-forge.r-project.org
Sent: Tuesday, October 27, 2015 7:13:21 PM
Subject: Re: [adegenet-forum] PCA issue

Sorry I wanted to say individuals instead of loci..sorry for the confusion
________________________________
Da: Carlo Pecoraro
Inviato: martedì 27 ottobre 2015 16.36
A: adegenet-forum at lists.r-forge.r-project.org
Cc: Jombart, Thibaut
Oggetto: PCA issue

Hi Thibaut and all,

I was trying to visualize what kind of genetic structure I can obtain with my data using the DAPC analysis. I have already filtered the dataset (i.e. missing data, MAF etc) but I have realized there are some loci with a strange deviation from the others that could affect the results of the DAPC. These strange distribution of those loci is clearer underlined doing a PCA. Is there a way to know the name of these loci in order to investigate deeply about them or in case to filter them out?

Many thanks in advance.
Best,
Carlo

--

Carlo Pecoraro, PhD Candidate

Laboratory of Genetics & Genomics of Marine Resources and Environment (GenoDREAM)
Dept. Biological, Geological & Environmental Sciences (BiGeA)
University of Bologna
Via S. Alberto 163, 48123 Ravenna (Italy)

IRD (Institut de Recherche pour le Développement)
UMR 212 EME (Ecosytèmes Marins Exploités)
BP 570
Victoria, Mahé
Seychelles

Ph: +39 3337603101
skype contact: carlo_pecoraro

_______________________________________________
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum


More information about the adegenet-forum mailing list