Hello,
thank You both. poppr looks interesting, I need to explore it more.
Adegenet is famous package. I didn't know it can also handle triploid data. I 
found problem when importing data to it. Functions of import2genind group 
(read.genetix, read.structure, read.fstat and read.genepop) are only for 
diploid data. So I used read.loci. The input file was easy: first line with 
names of markers etc, first row with names of samples, second row with 
populations and from third row alleles. I coded alleles in this way 
123/234/345, so that each individual has 3 alleles. Missing alleles are just 
NA.
ssrs3n.loci <- read.loci("ssrs3n.txt", header=TRUE, loci.sep="\t", 
allele.sep="/", col.pop=2, col.loci=3:10, row.names=1)
ssrs3n.loci
Allelic data frame: 130 individuals
                    8 loci
                    1 additional variable
ssrs3n.genind <- loci2genind(ssrs3n.loci)
ssrs3n.genind

   #####################
   ### Genind object ### 
   #####################
- genotypes of individuals - 

S4 class:  genind
@call: df2genind(X = as.matrix(x[, attr(x, "locicol")]), sep = "/", 
    pop = pop)

@tab:  130 x 115 matrix of genotypes

@ind.names: vector of  130 individual names
@loc.names: vector of  8 locus names
@loc.nall: number of alleles per locus
@loc.fac: locus factor for the  115 columns of @tab
@all.names: list of  8 components yielding allele names for each locus
@ploidy:  2
@type:  codom

Optional contents: 
@pop:  factor giving the population of each individual
@pop.names:  factor giving the population of each individual

@other: - empty -

As You can see, it was imported as diploid and I haven't found way how import 
it as triploid data. Imported data matrix seems to be wrong. When I used input 
file formatted in the same way for diploids, it works perfectly...
Any ideas how to fix that?
Thank You in advance,
Vojtěch Zeisek

Dne Pá 30. května 2014 03:34:49 jste napsal(a):
> Hi there,
> 
> yes, adegenet handles any (constant) ploidy for most purposes. For input
> formats etc. please see the tutorial on basics, section 'documents' on:
> http://adegenet.r-forge.r-project.org/
> 
> Please feel free to use the adegenet forum for adegenet-related questions.
> Cheers
> Thibaut
> 
> ________________________________________
> From: [email protected] [[email protected]]
> on behalf of Gilles Benjamin Leduc [[email protected]] Sent: 29 May 2014 17:12
> To: Vojtěch Zeisek
> Cc: mailinglist R
> Subject: Re: [R-sig-phylo] Triploid microsatellites?
> 
>  Hi,
> 
> Yes it is possible in R, there is a package created for related purposes: 
> poppr or something like that… The dev version on github should be
> preferred. I have seen several R work with polyploids and microsatelites,
> unfortunately… I work with ALFP  :p Benjamin
> 
> Le Jeudi 29 Mai 2014 13:40 GMT, Vojtěch Zeisek <[email protected]> a écrit:
> > Hello,
> > I wonder if it is possible to handle triploid microsatellite (yes, all
> > individuals are regular 3n) data in adegenet and another R packages. And
> > if so, how to enter the data. Any experiences and/or Ideas are very
> > welcomed. :-) Structure and BAPS are working well.
> > Yours sincerely,
> > Vojtěch Zeisek
-- 
Vojtěch Zeisek
http://trapa.cz/en/

Department of Botany, Faculty of Science
Charles University in Prague
Benátská 2, Prague, 12801, CZ
http://botany.natur.cuni.cz/en/

Institute of Botany, Academy of Science
Zámek 1, Průhonice, 25243, CZ
http://www.ibot.cas.cz/en/

Czech Republic

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/

Reply via email to