[adegenet-forum] scatter plot problem

Jombart, Thibaut t.jombart at imperial.ac.uk
Wed Feb 25 11:53:35 CET 2015


Hello,

so I had understood the question, and given you the answer - use the 'pop' argument in ?scatter.dapc.

Cheers
Thibaut
________________________________
From: Irina Ilyushkina [Irina.Ilyushkina at vuw.ac.nz]
Sent: 24 February 2015 22:42
To: Jombart, Thibaut
Subject: RE: scatter plot problem

I'm sorry for double posting but I'm afraid my Outlook might have failed to include the images in the e-mail.

Hi,

Thank you very much for the reply! I'm sorry I didn't explain everything clearer. Initially I have 2 populations and they form 3 clusters in DAPC, here is the scatterplot I get with command "scatter(dapc_data, posi.da="bottomleft", bg="white", pch=17:22, scree.da=FALSE, col=myCol)"

[cid:7fbe74d8-9d03-420b-a8dd-d913fb75500c]

the assignment to the clusters didn't match my population structure perfectly so I need to indicate the origin (which one of 2 initial populations) of each individual in the clusters.

I made 2 plots manually in Photoshop to represent my idea better:

[cid:859dc59a-2be3-4fa9-8b39-08413fa5b536]



or an easier to read color representation:



[cid:fddf3b1d-c165-41a8-86b0-b374fab1d57f]



Many thanks,

Irina

Irina Ilyushkina

PhD Candidate
School of Biological Sciences
Victoria University of Wellington
P O Box 600
Wellington 6140
New Zealand

Mobile: 0223898085
Tel: 04 463 5233 Ext 8135
________________________________
From: Jombart, Thibaut [t.jombart at imperial.ac.uk]
Sent: Tuesday, 24 February 2015 12:58 a.m.
To: Irina Ilyushkina; adegenet-forum at lists.r-forge.r-project.org
Subject: RE: scatter plot problem


Hi Irina,

I am not sure I understand what you are after, so sorry if I miss the point. If you want to represent a different group to the one used in the DAPC analysis on the DAPC scatterplot, use the argument 'grp'; from ?scatter.dapc:

  grp: a factor defining group membership for the individuals. The
          scatterplot is optimal only for the default group, i.e. the
          one used in the DAPC analysis.

Cheers
Thibaut


________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Irina Ilyushkina [Irina.Ilyushkina at vuw.ac.nz]
Sent: 23 February 2015 04:41
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] scatter plot problem

Hi,

I'm new to R and would be extremely grateful if someone could help me with my problem. I need to indicate (with labels, with color, etc.) the original group assignment of every individual in the DAPC inferred clusters on the scatter plot. table.value(table(pop(x), grp$grp) is showing the type of plot I'm after but it's a bit confusing when you have to consider two plots at the same time so I'm looking for a way to combine both in one plot if it is possible.

Many thanks,

Irina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150225/d5f5b448/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pomap2_opt1_nooutl_scatter20.jpeg
Type: image/jpeg
Size: 163399 bytes
Desc: pomap2_opt1_nooutl_scatter20.jpeg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150225/d5f5b448/attachment-0001.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplotcolors.jpg
Type: image/jpeg
Size: 40201 bytes
Desc: Rplotcolors.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150225/d5f5b448/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rpotlabels.jpg
Type: image/jpeg
Size: 44019 bytes
Desc: Rpotlabels.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150225/d5f5b448/attachment-0003.jpg>


More information about the adegenet-forum mailing list