simplified_simulation: Simplified simulation of data deregulation.

View source: R/simu.R

simplified_simulationR Documentation

Simplified simulation of data deregulation.

Description

This function simulates the deregulation of expression (up and down) in the data.

Usage

simplified_simulation(
  data,
  proportion,
  threshold = 60,
  modifier = 30,
  factor = 4
)

Arguments

data

The vector or matrix of original data to edit.

proportion

The proportion of data to modify.

threshold

The expression value under which data modification is +- modifier. Above the threshold, dysregulation is expression * or / factor.

modifier

Under the threshold, the deregulation is to add or remove this number.

factor

Below the threshold, the deregulation is to multiply or divide by this number.

Value

This function returns a list of three vectors or matrices : initial_data, data before the modification simulated_data, data with simulated deregulation changes_idx, index of modifications

Examples

# First, load data
data = penda::penda_data_ctrl[1:10, 1:10]

# Second, simulated the dysregulation
simulation = penda::simplified_simulation(data,
                                          proportion = 0.3,
                                          threshold = 60,
                                          modifier = 30,
                                          factor = 4)

CDecamps/penda documentation built on March 29, 2024, 3:26 a.m.