[adegenet-forum] Combining mtDNA and Nuclear Data for find.clusters() and DAPC
Jombart, Thibaut
t.jombart at imperial.ac.uk
Fri Apr 15 15:11:57 CEST 2011
Hello,
to combine these data, you can use scaleGen to get scaled allele frequencies and then use cbind to obtain one general matrix.
The more concerning problem is that you may be merging information of different nature by doing so. Also, it is likely that the results will mainly be driven by the dataset with the most variability. That may be fine ("I want to take the information where it is.") or not ("I want both types of data to contribute equally to the analysis"), depending on what you want to do.
I would advise at least checking that the analysis done on the entire dataset matches the results of the separate analyses. Running two separate PCAs and checking for similarities between them using coinertia analysis (function coinertia in ade4) should also be useful.
All the best
Thibaut
________________________________
From: adegenet-forum-bounces at r-forge.wu-wien.ac.at [adegenet-forum-bounces at r-forge.wu-wien.ac.at] on behalf of Mac Campbell [macampbell2 at alaska.edu]
Sent: 15 April 2011 04:20
To: adegenet-forum at r-forge.wu-wien.ac.at
Subject: [adegenet-forum] Combining mtDNA and Nuclear Data for find.clusters() and DAPC
Hi,
I have searched for an answer to this, but haven't found one. Would someone be able to help me the following?
I have two data sets, mitochondrial and nuclear. I have created two Genind objects (X and Y, pasted below) with the same individuals in the same order.
Is it reasonable to combine the two data sets for use in find.clusters() and DAPC? Is there a way to combine two genind objects within adegenet easily? I've tried several general approaches for S4 objects.
Thanks in advance,
Mac
> X
#####################
### Genind object ###
#####################
- genotypes of individuals -
S4 class: genind
@call: df2genind(X = x[, -1], ind.names = x[, 1], ploidy = 1)
@tab: 72 x 121 matrix of genotypes
@ind.names: vector of 72 individual names
@loc.names: vector of 67 locus names
@loc.nall: number of alleles per locus
@loc.fac: locus factor for the 121 columns of @tab
@all.names: list of 67 components yielding allele names for each locus
@ploidy: 1
@type: codom
Optionnal contents:
@pop: - empty -
@pop.names: - empty -
@other: - empty -
> Y
#####################
### Genind object ###
#####################
- genotypes of individuals -
S4 class: genind
@call: df2genind(X = y[, -1], sep = "/", ind.names = x[, 1])
@tab: 72 x 32 matrix of genotypes
@ind.names: vector of 72 individual names
@loc.names: vector of 18 locus names
@loc.nall: number of alleles per locus
@loc.fac: locus factor for the 32 columns of @tab
@all.names: list of 18 components yielding allele names for each locus
@ploidy: 2
@type: codom
Optionnal contents:
@pop: - empty -
@pop.names: - empty -
@other: - empty -
--
Matthew A Campbell
Department of Biology and Wildlife
University of Alaska, Fairbanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20110415/c7b08b5a/attachment.htm>
More information about the adegenet-forum
mailing list