<div dir="ltr">Hi-- <div><br clear="all"><div>I am creating a genind object for diploid microsatellite data with df2genind. I indicate that missing values are coded as "000" with NA.char="000". When I examine the resulting genind object I can see that genotypes where both alleles are missing are recognized as NA, but "000" is still recognized as an allele for genotypes that have only one allele missing.<br><br>For example:<br><br>> genotypes.df<br>      Ind Pop     PV1    PV16    PV14    PV15     PV6     PV8<br>1    A01    A 000/000 275/279 300/306 252/262 264/270 214/218<br>2    A02    A 155/159 275/291 300/000 252/262 268/268 216/216<br>3    A03    A 163/163 275/291 000/000 248/256 268/272 216/218<br>4    A04    A 159/159 275/000 300/312 252/262 270/274 212/220<br>5    A05    A 000/000 275/283 306/312 252/252 270/272 214/216<br><br>> genotypes <- df2genind(genotypes.df[,-(1:2)], ploidy=2, sep="/", ncode=3, NA.char = "000")<br><br>When I check to see if this worked by converting back to a dataframe, I see that 000/000 genotypes are now recognized as NAs but 000 is still recognized as an allele for genotypes with only one missing allele.<br><br>> genind2df(genotypes, sep="/")<br>        PV1    PV16    PV14    PV15     PV6     PV8<br>001    <NA> 275/279 300/306 252/262 264/270 214/218<br>002 155/159 275/291 300/000 252/262 268/268 216/216<br>003 163/163 275/291    <NA> 248/256 268/272 218/216<br>004 159/159 275/000 300/312 252/262 270/274 212/220<br>005    <NA> 275/283 306/312 252/252 270/272 214/216<br><br>> genotypes@all.names<br>$PV1<br>[1] "155" "159" "163" "157" "161" "169" "000" "165"<br><br>$PV16<br> [1] "275" "279" "291" "000" "283" "287" "289" "281" "277" "285" "293"<br><br>$PV14<br>[1] "300" "306" "000" "312" "308" "316" "304" "302" "318"<br><br>$PV15<br> [1] "252" "262" "248" "256" "250" "258" "246" "266" "254" "264"<br><br>$PV6<br>[1] "264" "270" "268" "272" "274" "266" "280" "276" "000"<br><br>$PV8<br>[1] "214" "218" "216" "212" "220" "222" "224" "000"<br><br><br>Any insights on how to fix this issue would be greatly appreciated. Thanks! <br></div><div><br></div>-<b style="color:rgb(102,102,102)">Chloe Chen-Kraus</b><span style="color:rgb(102,102,102)"> </span></div></div>