(************************************************************************************************)
(* Mathematica code for the paper (titled "Individual gene cluster statistics in noisy maps,
Narayanan R and D.Durand") submitted to ISMB 2005. This file contains the Mathematica code to
compute the probablity that two windows, of size r_1 and r_2, from two genomes G_1 and G_2, of
size n_1 and n_2 respectively, with gene families of equal size share "m" gene families. This code
computes probability using the Equations 10, 15 and 16 in the paper in a starightforward way. It
does not optimize the use of space or memory.
*)
(**************************************************************************************************)
(**------------------------------------------------------------------------------------------------
The function "orthoP" computes the probability that the two windows share "m" gene families.
This function calls other functions like, getP1GF, op2Sum to compute the probability.
Input :
n_1 - Number of genes in the first genome G_1
n_2 - Number of genes in the second genome G_2
r_1 - Size of the window (W_1) in the first genome G_1
( Number of genes in W_1 )
r_2 - Size of the window (W_2) in the second genome G_1
( Number of genes in W_2 )
m - Number of gene families shared in the windows W_1 and W_2
f - gene family size in the genomes
Usage : orthoP[n1,n2,r1,r2,f,m]
Output :
The probability that two windows W_1 and W_2 share "m" gene families.
-------------------------------------------------------------------------------------------------- *)
(* Loads graphics module *)
<