Public Documentation

Documentation for OscoNet.jl's public interface.

See the Internals section for documentation of internal functions.

Index

Public Interface

OscoNet.simulate_dataFunction

Generate synthetic data. Reproduced from the original Oscope paper

This function can be used to simulate fake gene expression data with which to test the other functions.

Arguments

  • half_group::Int=5: Half the size of each gene group. For example if half_group=3, each group will have 6 co-oscillating genes, 3 of which

will be strong oscillators and 3 weak (double the noise)

  • n_genes::Int=20: Total number of genes

  • n_cells::Int=1000: Total number of cells

  • noise_level::Int=1: Noise level index (1 to 6)

  • n_groups::Int=1: Number of groups

Returns

  • data::Matrix{<:AbstractFloat}: Simulated gene expression data with shape n_genes x n_cells

  • Ψ_g::Vector{<:AbstractFloat: Vector of phases for each gene

  • ω::Vector{<:AbstractFloat}: Vector of angular speeds for each gene

source
OscoNet.true_adj_matrixFunction

Construct the ground truth adjacency matrix for a given numer of genes and ω vector. Intended for use with output from the simulate_data function.

Arguments

  • n_genes::Integer: Total number of genes

  • ω::Vector{<:AbstractFloat}: Vector of angular speeds

Returns

  • adj_mat::Matrix{Bool}: Boolean matrix which is 1 if genes co-oscillate, and 0 otherwise
source
OscoNet.cooscillation_distanceFunction

Distance function for two co-oscillating genes across N cells. We assume genes have identical sinusoidal expression profiles, except for a phase shift Ψ.

Arguments

  • X: Expression of gene X from N cells
  • Y: Expression of gene Y from the same N cells
  • cosΨ::AbstractFloat: Cosine of the phase shift, Ψ

Returns

  • d::AbstractFloat: Distance between the two genes for a given Ψ
source
OscoNet.find_minimum_distanceFunction

Find the minimum distance between two genes X and Y, and the value of Ψ that minimises it.

Arguments

  • X: Expression of gene X from N cells
  • Y: Expression of gene Y from the same N cells

Returns

  • minimum::AbstractFloat: Minimum distance between gene X and Y
  • minimiser::AbstractFloat: Value of Ψ that minimises the distance
source
OscoNet.bootstrap_hypothesis_testFunction

Perform a non-parameteric bootstrap hypothesis test on gene expression data to identify co-oscillating gene pairs.

Arguments

  • data::Matrix: Matrix of size (ngenes x ncells), whose elements represent gene expression.

  • n_permutations::Int: number of bootstrap permutations

  • α::AbstractFloat

Returns

  • adjacency_matrix:::

  • qvalues:::

  • cost:::

source
OscoNet.create_edge_networkFunction

Construct an undirected graph between gene pairs, to be used for identifying 'clusters' or communities of co-oscillating genes.

Arguments

  • bootstrap_adj_mat:::

  • weight_matrix:::

  • gene_names:::

Returns

  • edge_network::DataFrame:
source