denseRegions            package:beadarray            R Documentation

_F_i_n_d _D_e_n_s_e _R_e_g_i_o_n_s _o_f _P_o_i_n_t_s (_a_s _u_s_e_d _i_n _d_i_f_f_u_s_e _d_e_f_e_c_t _a_n_a_l_y_s_i_s).

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

     Given a list of beads, this function finds dense regions of beads
     on the list.

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

     denseRegions(IDs, neighbours, ignore = NULL, sig = 0.0001, invasions = 10)

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

     IDs: Vector - IDs of beads to find dense regions of.

neighbours: A Neighbours matrix - obtained from 'generateNeighbours'.

  ignore: Vector - IDs of beads to be ignored during this process.

     sig: Significance of the Binomial test performed within each
          kernel.

invasions: Integer - No of invasions used to generate the kernel.

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

     This function, given a list of bead IDs, finds regions where these
     marked beads are denser.

     To do this, we use a "sliding kernel" technique. For each bead, we
     find the "kernel", a local neighbourhood of beads, obtained via
     invasion along links defined in the neighbours matrix. We count
     the number of beads in the kernel, and we also count how many of
     these are beads are marked. Now we test the density of this region
     with a binomial test.

     Assuming that we expect the marked beads to be evenly distributed
     across the array, then the number of marked beads in the kernel
     should have distibution Bin(n,p) under the null hypothesis, where
     n is the total number of beads in the kernel, and p is the
     proportion of marked beads on the entire array. We test this
     hypothesis at a level defined by 'sig', and on rejection of the
     null hypothesis we label the kernel's central bead as being part
     of a dense region. This is performed for the kernel about each
     bead.

     If 'ignore' is specified, then these beads will be completely
     removed before analysis. Any links attached to a removed bead are
     severed.

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

     Vector - IDs of beads in dense regions.

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

     Jonathan Cairns

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

     'generateNeighbours', 'BASHDiffuse'

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

     data(BLData)
     E <- generateE(BLData,1)
     E <- generateE(BLData,1, invasions = 10) #reduced no of invasions to increase speed.
     E <- generateE(BLData,1, bgfilter = "none") #residuals (median)

