<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello,
<br>
<br>
read.genepop has been designed for diploid data. For haploid data, please use read.table to read the data in R and df2genind to convert the table to genind. You'll probably need to remove the "POP" lines from the original file before importing it.
<br>
<br>
Will add a warning in the doc of the function.<br>
<br>
Cheers<br>
<br>
Thibaut<br>
<div><br>
<div class="BodyFragment"><font size="2">
<div class="PlainText">-- <br>
######################################<br>
Dr Thibaut JOMBART<br>
MRC Centre for Outbreak Analysis and Modelling<br>
Department of Infectious Disease Epidemiology<br>
Imperial College - Faculty of Medicine<br>
St Mary’s Campus<br>
Norfolk Place<br>
London W2 1PG<br>
United Kingdom<br>
Tel. : 0044 (0)20 7594 3658<br>
t.jombart@imperial.ac.uk<br>
http://sites.google.com/site/thibautjombart/<br>
http://adegenet.r-forge.r-project.org/<br>
</div>
</font></div>
</div>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF595457"><font color="#000000" face="Tahoma" size="2"><b>From:</b> adegenet-forum-bounces@r-forge.wu-wien.ac.at [adegenet-forum-bounces@r-forge.wu-wien.ac.at] on behalf of Vinson Doyle [sonofvin@gmail.com]<br>
<b>Sent:</b> 05 July 2011 22:01<br>
<b>To:</b> adegenet-forum@r-forge.wu-wien.ac.at<br>
<b>Subject:</b> [adegenet-forum] read.genepop for haploid data<br>
</font><br>
</div>
<div></div>
<div>I am unable to import a haploid dataset using read.genepop. Here is a look at the first several rows of the dataset:<br>
<br>
Locus14F4, Locus10D10, Locus2C1, LocusF9<br>
POP<br>
9996gjs08211, 260 218 188 248<br>
9997gjs08214, 260 218 188 248<br>
9998gjs08216, 260 218 188 248<br>
9999IMI319418, 260 220 188 248<br>
POP<br>
1002BC1, 318 278 214 284<br>
1004BC3, 318 278 214 286<br>
1005BC4, 249 283 214 285<br>
1006BC5, 000 278 214 284 <br>
1007BC6, 320 278 214 284<br>
1008BC7, 320 278 214 284<br>
1009BC8, 320 278 000 000<br>
1010BC, 320 278 214 284<br>
1011BC10, 320 278 000 000<br>
1013BC12, 320 278 214 284<br>
1025BC24, 320 278 000 000<br>
9995glo8248, 324 280 214 284<br>
9994pmap261, 320 278 214 284<br>
<br>
If I were to add "000" to a single individual at a single locus, I have no problem importing. Otherwise, I receive the following message:<br>
<br>
Converting data from a Genepop .gen file to a genind object... <br>
<br>
File description: <br>
Error in df2genind(X = X, pop = pop, missing = missing, ploidy = 2) : <br>
2 alleles cannot be coded by a total of 3 characters<br>
<br>
Any help would be greatly appreciated.<br>
<br>
Thanks,<br>
Vinson<br>
</div>
</div>
</div>
</body>
</html>