paired_sine_analysis: Perform paired-sine mode analysis

Description Usage Arguments Value

View source: R/paired_sine_model.R

Description

Following the paired-sine model, as described in Leng et al. 2015, section Oscope: paired-sine model, this function estimates the optimal phase shift for all gene pairs by minimising the squared epsilon error term, i.e., ε_{1,2}^2.

Usage

1
2
3
4
5
6
7
paired_sine_analysis(
  m,
  verbose = FALSE,
  sort_by_score = FALSE,
  parallel = FALSE,
  cores = parallel::detectCores() - 2L
)

Arguments

m

Matrix of gene expression values. Rows are genes and columns are samples.

verbose

Whether to be chatty.

sort_by_score

Whether to descending sort the final dataframe by the score column, i.e., by -log10(sq_epsilon). If FALSE, the returned dataframe will be sort by the original gene pair combinations.

parallel

Whether to split the computation across the virtual cores.

cores

The number of virtual cores (vCPUs) to use if parallel equals TRUE.

Value

A dataframe with the optimal phase estimates. Each row corresponds to a gene pair combination. Columns:

gene_1

Name of gene 1.

gene_2

Name of gene 2.

psi

Optimal phase shift.

sq_epsilon

Squared epsilon (ε_{1,2}^2).

score

Score defined as -log10(ε_{1,2}^2). This metric can be used to sort the table of results, and select candidate oscillatory genes as those in the top gene pairs.


ramiromagno/oscillation documentation built on April 20, 2020, 10:37 a.m.