ibsCount              package:snpMatrix              R Documentation

_C_o_u_n_t _a_l_l_e_l_e_s _i_d_e_n_t_i_c_a_l _b_y _s_t_a_t_e

_D_e_s_c_r_i_p_t_i_o_n:

     This function counts, for all pairs of subjects and across all
     SNPs, the total number of alleles which are identical by state
     (IBS)

_U_s_a_g_e:

     ibsCount(snps)

_A_r_g_u_m_e_n_t_s:

    snps: An input object of class '"snp.matrix"' or '"X.snp.matrix"'

_D_e_t_a_i_l_s:

     For each pair of subjects the function counts the total number of
     alleles which are IBS. For autosomal SNPs, each locus contributes
     4 comparisons, since each subject carries two copies. For SNPs on
     the X chromosome, the number of comparisons is also 4 for
     female:female comparisons, but is 2 for female:male  and 1 for
     male:male comparisons.

_V_a_l_u_e:

     If there are N rows in the input matrix, the function returns an
     N*N matrix. The upper triangle contains the total number of
     comparisons and the lower triangle contains the number of these
     which  are IBS. The diagonal contains the number of valid calls
     for each subject.

_N_o_t_e:

     In genome-wide studies, the SNP data will usually be held as a
     series of objects (of class '"snp.matrix"' or '"X.snp.matrix"'),
     one  per chromosome. Note that the matrices produced by applying
     the 'ibsCount' function to each object in turn can be added to
     yield the genome-wide result.

_A_u_t_h_o_r(_s):

     David Clayton david.clayton@cimr.cam.ac.uk

_S_e_e _A_l_s_o:

     'ibsDist' which calculates a distance matrix based on proportion
     of alleles which are IBS

_E_x_a_m_p_l_e_s:

     data(testdata)
     ibs.A <- ibsCount(Autosomes[,1:100])
     ibs.X <- ibsCount(Xchromosome)

