# bug #34879: ld_sub_geno () should calculate recursively

 Submitted by: Joel J. Adamson Submitted on: Tue 22 Nov 2011 02:57:50 PM UTC Category: Library Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: Joel J. Adamson Open/Closed: Open

You are not logged in

## Discussion

Tue 22 Nov 2011 03:18:41 PM UTC, comment #1:

Check to make sure this reduces to Bennett's Equation.

Tue 22 Nov 2011 02:57:50 PM UTC, original submission:

ld_sub_geno () does not calculate the full linkage disequilibrium among a set of loci, it calculates a subset of it.  We can use the following recursive algorithm to calculate the right value (where U is the set of loci we're interested in, and |U| is its size):

1. If |U| = 0, or |U| = 1 then return 0
2. If |U| = 2 then use the standard linkage disequilibrium
3. If |U| > 2 then split off a locus and use the following formula

E[X_i \Pi_{j \in U/i} (X_j - p_j) ] - p_i D_U/i

with recursion on the last term.  U/i is the set difference of U and i, X_i is an indicator variable giving the status to the locus (on or off) and E represents expectation (genotypic average).

For each such calculation we will need the genotypic frequency (for averaging) and the allele frequencies of the constituent alleles (can be calculated once).

## Attached Files

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Comment:

No files currently attached

## Dependencies

Depends on the following items: None found

Items that depend on this one: None found

Carbon-Copy List
• -email is unavailable- added by trashbird1240 (Submitted the item)
•

Do you think this task is very important?
This task has 0 encouragements so far.

Only logged-in users can vote.

## History

No changes have been made to this item