Learn R Programming

GeRnika (version 1.0.0)

place_clones_space: Create a model for the spatial distribution of the clones in a tumor

Description

This function creates a Gaussian mixture model for the spatial distribution of the clones in a tumor in a 1D space. In the model, each component represents a clone, and the mean of the component represents the position of the clone in the space. The standard deviation of the components is fixed to 1, while the mean values are random variables.

Usage

place_clones_space(B)

Value

A list containing two elements: 'spatial_coords', a data frame where each column represents the density of a clone at different spatial coordinates, and 'x', a numeric vector representing the spatial coordinates.

Arguments

B

A matrix representing the mutation relationships between the nodes in the phylogenetic tree (B matrix).

Examples

Run this code
# Create a model for the spatial distribution of the clones in a tumor represented by the 
# B matrix B_mat

# Create a mutation matrix for a phylogenetic tree with 10 nodes and k = 2
B_mat <- create_B(10, 2)

clone_placement <- place_clones_space(B_mat)

Run the code above in your browser using DataLab