# Function to more efficiently screen for gene triplets for those with a high liquid association value.

### Description

Function reduces the processing power and memory needed to calculate modified liquid association (MLA) values for a genome by using a pre-screening method to reduce the candidate pool to triplets likely to have a high MLA value. It does this using matrix algebra to create an approximation to the direct MLA estimate for all possible pairs of X1X2|X3.

### Usage

1 | ```
fastMLA(data, topn = 2000, nvec = 1, rvalue = 0.5, cut = 4, threads = detectCores())
``` |

### Arguments

`data` |
Matrix of numeric data, with columns representing genes and rows representing observations. |

`topn` |
Number of results to return, ordered from highest |MLA| value descending. |

`nvec` |
Numeric vector of the gene(s) to use in the X3 position of the X1X2|X3 screening. This should be a numeric vector representing the column #(s) of the gene. |

`rvalue` |
Tolerance value for LA approximation. Lower values of rvalue will cause a more thorough search, but take longer. |

`cut` |
Value passed to the GLA function to create buckets (equal to number of buckets+1). Values placing between 15-30 samples per bucket are optimal. Must be a positive integer>1. See GLA. |

`threads` |
Number of cores to use for multi-threading in correlation calculation (enableWGCNAThreads argument). See WGCNA. |

### Details

Choosing the number of bins: For example, assume that our data has 100 observations. Since values between 15-30 observations per bin are optimal, good values to choose for cut would be 5-7.

### Value

A data frame with 5 variables: the genes in positions X1, X2 and X3; the rhodiff value of the triplet; and the GLA value of the triplet. A more comprehensive discussion of these values is available in the vignette.

### Warning

The data matrix must be numeric.

### Note

While this is intended to significantly reduce processing time for identifying high MLA values (and in our estimates did so by >90

### Author(s)

Tina Gunderson

### References

[1] Yen-Yi Ho, Giovanni Parmigiani, Thomas A Louis, and Leslie M Cope. Modeling liquid association. Biometrics, 67(1):133-141, 2011.

### See Also

`LiquidAssociation`

, `parallel`

, `WGCNA`

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
#to view function code
selectMethod("fastMLA", "matrix")
#
library(fastLiquidAssociation)
library(yeastCC)
data(spYCCES)
lae <- spYCCES[,-(1:4)]
### get rid of samples with high % NA elements
lae <- lae[apply(is.na(exprs(lae)),1,sum) < ncol(lae)*0.3,]
data <- t(exprs(lae))
data <- data[,1:50]
example <- fastMLA(data=data, topn=25, nvec=1:10, rvalue=1.0, cut=4)
example[1:5,]
closeAllConnections()
``` |