<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14pt"><div><span style="font-size: 13px;">Dear Dr. Jombart,<br>I am trying to calculate the inbreeding coefficient for two populations (</span><span style="font-size: 13px;"><span style="font-size: 13px;">US=81 and IP=73) with 43231 SNPs.</span> I am using your your manual, an introduction to adgenet 1.4-0, but I have a problem in the calculation. It gives me an error message: <br>Error in sample.int(length(x), size, replace, prob) : <br> NA in probability vector<br>I do not know why? I did it as following:<br><br>> toto<-read.structure(file="finalFiltered_noLowCov_e0_LOCUS_POP.stru",n.ind=154,n.loc=43231,onerowperind=FALSE,col.lab=1,row.marknames=1,NA.char="-9",missing=0)<br> Which column contains the population factor ('0' if absent)? 2<br><br> Which other optional
columns should be read (press 'return' when done)? 1: <br> Converting data from a STRUCTURE .stru file to a genind object... <br>> is.genind(toto)<br>[1] TRUE<br>> toto$pop.names<br> P1 P2 <br>"US" "IP" <br>> sa1<- seppop(toto)$US<br>> sa1<br> #####################<br> ### Genind object ### <br> #####################<br>- genotypes of individuals - <br>S4 class: genind<br>@call: .local(x = x, i = i, j = j, treatOther = ..1, quiet = ..2, drop = drop)<br>@tab: 81 x 61169 matrix of genotypes<br>@ind.names: vector of 81 individual names<br>@loc.names: vector of 43231 locus names<br>@loc.nall: number of alleles per locus<br>@loc.fac: locus factor for the 61169 columns of @tab<br>@all.names: list of 43231 components yielding allele names for each locus<br>@ploidy: 2<br>@type: codom<br>Optionnal contents: <br>@pop: factor giving the
population of each individual<br>@pop.names: factor giving the population of each individual<br>@other: a list containing: elements without names <br><br>> temp1<- inbreeding(sa1, N=81)<br><span style="color: rgb(205, 35, 44);">Error in sample.int(length(x), size, replace, prob) : <br> NA in probability vector</span><br><br>> sa2<- seppop(toto)$IP<br>> sa2<br> #####################<br> ### Genind object ### <br> #####################<br>- genotypes of individuals - <br>S4 class: genind<br>@call: .local(x = x, i = i, j = j, treatOther = ..1, quiet = ..2, drop = drop)<br>@tab: 73 x 61169 matrix of genotypes<br>@ind.names: vector of 73 individual names<br>@loc.names: vector of 43231 locus names<br>@loc.nall: number of alleles per locus<br>@loc.fac: locus factor for the 61169 columns of @tab<br>@all.names: list of 43231 components yielding allele names for
each locus<br>@ploidy: 2<br>@type: codom<br>Optionnal contents: <br>@pop: factor giving the population of each individual<br>@pop.names: factor giving the population of each individual<br>@other: a list containing: elements without names <br><br>> temp2<- inbreeding(sa2, N=73)<br><span style="color: rgb(205, 35, 44);">Error in sample.int(length(x), size, replace, prob) : <br> NA in probability vector</span><br><br><br>Could you please tell me how can I fix this problem?<br></span><span style="font-size: 13px;">I attached you a part of my data. and I hope that help me</span>.<br><br><span style="font-size: small;">Thank you advance</span><br><span style="font-size: 13px;">Best regards,<br>Tohamy</span><br></div><div style="margin-right:0px;" dir="ltr"><i><div class="" style="font-family:'times new roman';color:rgb(255, 0, 0);margin-right:0px;" dir="ltr">-------------------------------------------</div><div
style="margin-right:0px;" dir="ltr"><span class="" style="font-family:'times new roman', 'new york', times, serif;font-size:13px;"><span style="color:rgb(255, 0, 0);">Eltohamy Yousef</span> M.Sc.</span></div><div style="margin-right:0px;" dir="ltr"><span class="" style="font-family:'times new roman', 'new york', times, serif;font-size:small;">Crop Biodiversity and Breeding Informatics</span></div><div style="margin-right:0px;" dir="ltr"><span class="" style="font-family: 'times new roman','new york',times,serif; font-size: 13px;">Institute of Plant Breeding, Seed Science and Population Genetics (350)</span></div><div style="margin-right:0px;" dir="ltr"><span class="" style="font-family:'times new roman', 'new york', times, serif;font-size:13px;">University of Hohenheim</span></div><div class="" style="margin-right:0px;color:rgb(0, 0, 0);font-size:13px;font-family:'times new roman', 'new york', times,
serif;background-color:transparent;font-style:italic;" dir="ltr"><span class="" style="font-family:'times new roman', 'new york', times, serif;font-size:13px;">Fruwirtstrasse 21, 70599 Stuttgart</span></div><div style="margin-right:0px;" dir="ltr"><div style="margin-right:0px;" dir="ltr"><span class="" style="font-family:'times new roman', 'new york', times, serif;font-size:13px;">Office phone:0049711 459-24437</span></div><div class="" style="margin-right:0px;color:rgb(0, 0, 0);font-size:13px;font-family:'times new roman', 'new york', times, serif;background-color:transparent;font-style:italic;" dir="ltr">Email: tohamyy@yahoo.com</div><div class="" style="margin-right:0px;color:rgb(0, 0, 0);font-size:13px;font-family:'times new roman', 'new york', times, serif;background-color:transparent;font-style:italic;" dir="ltr">
E.yousef@uni-hohenheim.de<br> tohamy_yousef@agr.suez.edu.eg<br></div><div class="" style="margin-right:0px;color:rgb(0, 0, 0);font-size:13px;font-family:'times new roman', 'new york', times, serif;background-color:transparent;font-style:italic;" dir="ltr">Web.www.evoplant.uni-hohenheim.de</div></div></i></div></div></body></html>