Public Documentation
Documentation for OscoNet.jl's public interface.
See the Internals section for documentation of internal functions.
Index
OscoNet.bootstrap_hypothesis_testOscoNet.cooscillation_distanceOscoNet.create_edge_networkOscoNet.find_minimum_distanceOscoNet.simulate_dataOscoNet.true_adj_matrix
Public Interface
OscoNet.simulate_data — FunctionGenerate 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 ifhalf_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 genesn_cells::Int=1000: Total number of cellsnoise_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 shapen_genesxn_cellsΨ_g::Vector{<:AbstractFloat: Vector of phases for each geneω::Vector{<:AbstractFloat}: Vector of angular speeds for each gene
OscoNet.true_adj_matrix — FunctionConstruct 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
OscoNet.cooscillation_distance — FunctionDistance 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 fromNcellsY: Expression of gene Y from the sameNcellscosΨ::AbstractFloat: Cosine of the phase shift, Ψ
Returns
d::AbstractFloat: Distance between the two genes for a given Ψ
OscoNet.find_minimum_distance — FunctionFind the minimum distance between two genes X and Y, and the value of Ψ that minimises it.
Arguments
X: Expression of gene X fromNcellsY: Expression of gene Y from the sameNcells
Returns
minimum::AbstractFloat: Minimum distance between gene X and Yminimiser::AbstractFloat: Value of Ψ that minimises the distance
OscoNet.bootstrap_hypothesis_test — FunctionPerform 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:::
OscoNet.create_edge_network — FunctionConstruct 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: