write_ONOFFhistograms Function
Generate ON/OFF dwell time histograms for GRSM models.
Syntax
write_ONOFFhistograms(; kwargs...)Arguments
Model Parameters
G::Int = 2: Number of gene statesR::Int = 0: Number of pre-RNA stepsS::Int = 0: Number of splice sitesinsertstep::Int = 1: Reporter insertion steptransitions::Tuple = (): State transitionsrates::Vector{Float64}: Model ratesnalleles::Int = 1: Number of alleles
Histogram Parameters
ntraces::Int = 1000: Number of traces for histogramtspan::Tuple{Float64, Float64} = (0., 1000.): Time span for tracesdt::Float64 = 1.0: Time stepbins::Int = 100: Number of histogram binsmaxtime::Float64 = 100.0: Maximum dwell time
Output Parameters
outfolder::String = "histograms": Output folderlabel::String = "": Output file labelwrite::Bool = true: Write histograms to filereturnhist::Bool = false: Return histogram data
Returns
hist: Tuple containing:- ON dwell time histogram
- OFF dwell time histogram
- Bin edges
Examples
# Generate histograms for a simple G model
write_ONOFFhistograms(
G = 2,
R = 0,
rates = [0.1, 0.2], # G1->G2, G2->G1
ntraces = 1000,
tspan = (0., 1000.),
bins = 100,
maxtime = 100.0
)
# Generate histograms for a GR model
write_ONOFFhistograms(
G = 2,
R = 3,
S = 2,
insertstep = 1,
rates = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6],
ntraces = 5000,
tspan = (0., 2000.),
bins = 150,
maxtime = 200.0
)Notes
Histogram Generation
- Traces are generated using Gillespie algorithm
- ON/OFF states are determined by gene state
- Histograms are normalized to total number of transitions
Rate Order
- G transitions
- R transitions
- S transitions
- Decay