[adegenet-forum] data input

Vojtěch Zeisek vojta at trapa.cz
Fri Nov 28 13:41:25 CET 2014


Hello

Dne Pá 28. listopadu 2014 11:57:04, Mark Coulson napsal(a):
> Hello,
> 
> I am trying to read in a dataframe (rather than a genepop or other format)
> with 1 column as population, 1 column as individual and 1 column as River
> (which I would like as the @other tab). I've coded my alleles as 2-digit

As far as I know, DF can not store river information for conversion, You have 
to add it manually later.

> codes with no separator. In excel this looks like 1134 or 0230 for example.
> 
> I've done df2genind(x, sep=NULL, ind.names=x$Individual, pop=x$Population,
> missing="0", ploidy=2) but I get

When there is no separator, You need to specify number of characters for each 
locus (ncode).

> Error in df2genind(scot, sep = NULL, ind.names = scot$Individual, pop =
> scot$Population,  :
>   2 alleles cannot be coded by a total of 27 characters

There is no determination of number of characters determining allele (as there 
is no separator etc).

> I notice that R is reading any genotype beginning with a 0 as 230 instead
> of 0230. I may also want to include some additional 'other' variables such
> as coordinates so looking for options for bringing in a dataframe instead
> of particular genetic formats.

As I've already wrote, You can fill additional information later. Finally, it 
will be easier, I think...

> Thanks,
> Mark

Good luck,
Vojtěch

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20141128/2fad5dc1/attachment.sig>


More information about the adegenet-forum mailing list