Learn R Programming

LEAP (version 0.2)

MAC_counter: Function to perform lag-based correlation anaylsis of single-cell sequencing data, sorted by pseudotime.

Description

See vignette for more details.

Usage

MAC_counter(data, max_lag_prop = 1/3, MAC_cutoff = 0.2, file_name = F, lag_matrix = T, symmetric = F)

Arguments

data
A data matrix for which the rows are genes and the columns are experiments, sorted by their pseudotime.
max_lag_prop
The largest proportion of your experiments that you want the size of the lag to be. Recommended not to go beyond 1/3. Default value is 1/3.
MAC_cutoff
The lowest MAC desired to be shown in results. Default value is 0.2.
file_name
The name to be used for resulting .csv files. I.e., using file_name="mine" would create the file "MAC_mine.csv" and "lag_mine.csv"
lag_matrix
Logical. TRUE indicates that the resulting matrix of lags should be saved to a csv. Default value is TRUE.
symmetric
Logical. TRUE indicates that a symmetric matrix is required for output MAC .csv file. Results in the absolute maximum value for each pair (i,j) and (j,i). Default value is FALSE.

Value

Returns a dataset with four columns: Row gene index and Column gene index correspond to the indeces for the gene pair (i,j), Correlation is the maximum absolute correlation (MAC) achieved for the pair, and Lag is the lag at which the MAC occurred.

Details

See vignette for more details.

Examples

Run this code

x <- matrix(rnorm(6),2,3)
y <- MAC_counter(x)

## Not run: MAC_results = MAC_counter(data=example_data)

Run the code above in your browser using DataLab