[adegenet-forum] Inbreeding calculation

Tohamy Yousef tohamyy at yahoo.com
Tue May 13 18:18:53 CEST 2014



Dear Dr. JombartFirsst of all, I am sorry for disrupting you again. But, really I need your help. I wrote you before and asked about inbreeding calculation. You suggested that I use less number of markers and other advices. SO, I tried  to follow all your comments. For example I decided to use only 
2247 SNP markers without missing data (before I had 43231 with missing 
data). But I am trying a lot and still have the same problem.
 I am attaching to you the new data (new_inbreeding.stru). 


Thanks in advance.

######### my script

> library(adegenet)
>
 
toto<-read.structure(file="new_inbreeding.stru",n.ind=154,n.loc=2247,onerowperind=FALSE,col.lab=1,row.marknames=1,NA.char="-9",missing="mean")

Which column contains the population factor ('0' if absent)? 2

 Which other optional columns should be read (press 'return' when done)? 1: 
> toto

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

S4 class:  genind
@call: read.structure(file = "inbreeding.stru", 
    n.ind = 154, n.loc = 2247, onerowperind = FALSE, col.lab = 1, 
    row.marknames = 1, NA.char = "-9", missing =
 "mean")

@tab:  154 x 3610 matrix of genotypes

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

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

@other: - empty -
> toto$pop.names
  P1   P2 
"US" "IP" 
>U<- seppop(toto)$US
> U

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

S4 class:  genind
@call: .local(x = x, i = i, j = j, treatOther = ..1, quiet = ..2, drop = drop)

@tab:  81 x
 3610 matrix of genotypes

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

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

@other: a list containing: elements without names 

> U1<- inbreeding(U, N=100)
Error in sample.int(length(x), size, replace, prob) : 
  NA in probability vector
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20140513/54a1699f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_inbreeding.stru
Type: application/octet-stream
Size: 1416445 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20140513/54a1699f/attachment-0001.obj>


More information about the adegenet-forum mailing list