MetidaNCA.DoseTimeType
DoseTime(dose::D, time::T, tau::TAU) where D <: Number where T <: Number where TAU <: Number

Dose settings.

  • dose - dose;
  • time - dose time;
  • tau - tau (τ);

Dose time set 0 by default.

MetidaNCA.ElimRangeType
ElimRange(kelstart::Int, kelend::Int, kelexcl::Vector{Int})::ElimRange

Elimination settings for PK subject.

  • kelstart - start point;
  • kelend - end point;
  • kelexcl - excluded points.
MetidaNCA.LimitRuleType
LimitRule(lloq::T, btmax, atmax, nan, rm::Bool) where T <: Real

LimitRule(;lloq = NaN, btmax = NaN, atmax = NaN, nan = NaN, rm::Bool = false)
  • lloq - LLOQ - low limit of quantification;
  • btmax - value for points before Tmax;
  • atmat - values for points after Tmax;
  • nan - values for replacing NaN;
  • rm - if true, removee all NaN points.

Rule for PK subject.

  • STEP 1 (NaN step): replace all NaN and missing values with nan keyword value (if nan not NaN);
  • STEP 2 (LLOQ step): replace values below lloq with btmax value if this value befor Tmax or with atmax if this value after Tmax (if lloq not NaN);
  • STEP 3 (remove NaN): rm == true, then remove all NaN and missing values.
MetidaNCA.applylimitrule!Method
applylimitrule!(data::PKSubject, rule::LimitRule)

Apply rule to PK subject .

  • STEP 1 (NaN step): replace all NaN and missing values with nan keyword value (if nan not NaN);
  • STEP 2 (LLOQ step): replace values below lloq with btmax value if this value befor Tmax or with atmax if this value after Tmax (if lloq not NaN);
  • STEP 3 (remove NaN): rm == true, then remove all NaN and missing values.
MetidaNCA.applylimitrule!Method
applylimitrule!(data::DataSet{T}, rule::LimitRule, inds::Union{Vector{Int}, UnitRange{Int}, Tuple{Vararg{Int}}}) where T <: PKSubject
MetidaNCA.nca!Method
nca!(data::DataSet{T1}; adm = :ev, calcm = :lint, intpm = nothing, verbose = 0, warn = true, io::IO = stdout) where T1 <: PKSubject{T,O}  where T  where O

Non-compartmental (NCA) analysis of pharmacokinetic (PK) data.

MetidaNCA.nca!Method
nca!(data::PKSubject{T,O}; adm = :ev, calcm = :lint, intpm = nothing, limitrule = nothing, verbose = 0, warn = true, io::IO = stdout, modify! = nothing) where T where O
  • adm - administration:
    • :ev - extra vascular;
    • :iv - intravascular bolus;
  • calcm - AUC/AUMC calculation method:
    • :lint - linear trapezoidal;
    • :logt - log-trapezoidal after Tmax;
    • :luld - linar up log down;
    • :luldt - linear up log down after Tmax;
  • intpm - interpolation method:
    • :lint - linear trapezoidal;
    • :logt - log-trapezoidal after Tmax;
    • :luld - linar up log down;
    • :luldt - linear up log down after Tmax;
  • limitrule use limitrule for data;
  • verbose - print to io, 1: partial areas table, 2: 1, and results;
  • warn - show warnings;
  • io - output stream;
  • modify! - function to modify output paramaters, call modify!(data, result) if difined.

Results:

  • Cmax
  • Tmax
  • Cdose
  • Tlag
  • Clast
  • AUClast
  • AUMClast
  • AUCall
  • Rsq
  • ARsq
  • Kel
  • HL
  • LZint
  • Clast_pred
  • AUCinf
  • AUCinf_pred
  • AUMCinf
  • AUMCinf_pred
  • AUCpct
  • MRTlast
  • MRTinf
  • MRTinf_pred
  • Cllast
  • Clinf
  • Vzlast
  • Vzinf
  • Vssinf

Stable state (tau used):

  • AUCtau
  • AUMCtau
  • Ctau
  • Cavg
  • Ctaumin
  • Accind
  • Fluc
  • Fluctau
  • Swing
  • Swingtau
  • MRTtauinf
  • Cltau
  • Vztau
MetidaNCA.nca!Method
nca!(data::UPKSubject{T, O, VOL, V}; adm = :ev, calcm = :lint, intpm = nothing, limitrule::LimitRule = LimitRule(), verbose = 0, warn = true, io::IO = stdout, modify! = identity) where T where O where VOL where V

Non-compartmental (NCA) analysis of pharmacokinetic for urine data.

Results:

  • AUCall
  • AUClast
  • Rlast
  • Maxrate
  • Tmax
  • AR
  • Vol
  • Prec
  • ARsq
  • Rsq
  • Kel
  • LZ
  • LZint
  • Rsqn
  • HL
  • AUCinf
MetidaNCA.ncaMethod
nca(args...; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime(), kwargs...)

nca(data, time, conc, sort; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime(), kwargs...)

nca(data, time, conc; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime(), kwargs...)

nca(time, conc; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime(), kwargs...)

Import data and perform NCA analysis.

Syntax simillar to pkimport

Applicable kwargs see nca!.

MetidaNCA.pkimportMethod
pkimport(data, time, conc, sort; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime())

Import PK data from table data.

  • time - time column;
  • conc - concentration column;
  • sort - subject sorting columns.

keywords:

  • kelauto - if true auto range settings, if false used kelstart/kelend from elimrange;
  • elimrange - set elimination range settings;
  • dosetime - set dose and dose time, by default dosetime = 0, dose is NaN.
Note

If time column have non-unique values - last pair time-concentration will be used.

MetidaNCA.pkimportMethod
pkimport(data, time, conc; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime())

Import PK data from tabular data data, time - time column, conc - concentration column.

MetidaNCA.pkimportMethod
pkimport(time, conc; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime(), id = Dict{Symbol, Any}())

Import PK data from time vector time and concentration vector conc.

MetidaNCA.pkplotMethod
pkplot(subj; ls = false, elim = false, xticksn = :auto, yticksn = :auto, kwargs...)

Plot for subject

  • ls - concentration in log scale;
  • elim - draw elimination curve;
  • xticksn - number of ticks on x axis;
  • yticksn - number of ticks on y axis/
MetidaNCA.pkplotMethod
pkplot(data::DataSet{T};
typesort::Union{Nothing, Symbol, AbstractVector{Symbol}} = nothing,
pagesort::Union{Nothing, Symbol, AbstractVector{Symbol}} = nothing,
sort::Union{Nothing, Dict{Symbol}} = nothing,
kwargs...) where T <: AbstractSubject

PK plot for subject set.

  • typesort - sort on page by this id key;
  • pagesort - different pages by this id key;
  • sort - use only subjects if sort ⊆ subject id.
MetidaNCA.setdosetime!Method
setdosetime!(data::DataSet{T}, dosetime::DoseTime, sort::Dict) where T <: PKSubject

Set dose time dosetime for subjects if sort ⊆ subject's id.

MetidaNCA.setdosetime!Method
setdosetime!(data::DataSet{T}, dosetime::DoseTime, inds::Union{Vector{Int}, UnitRange{Int}, Tuple{Vararg{Int}}}) where T <: PKSubject
  • inds - indexes in DataSet.
MetidaNCA.setdosetime!Method
setdosetime!(data::DataSet{T}, dosetime::DoseTime) where T <: PKSubject

For all subjects in DataSet.

MetidaNCA.setdosetime!Method
setdosetime!(data::DataSet{T}, dosetime::DoseTime, ind::Int) where T <: PKSubject
  • ind - index in DataSet.
MetidaNCA.setdosetime!Method
setdosetime!(data::T, dosetime::DoseTime) where T <: PKSubject

Set dose time dosetime for subject data.

MetidaNCA.setkelauto!Method
setkelauto!(data::DataSet{T}, kelauto::Bool, sort::Dict) where T <: PKSubject
MetidaNCA.setkelauto!Method
setkelauto!(data::DataSet{T}, kelauto::Bool, inds::Union{Vector{Int}, UnitRange{Int}, Tuple{Vararg{Int}}}) where T <: PKSubject
MetidaNCA.setkelauto!Method
setkelauto!(data::DataSet{T}, kelauto::Bool, ind::Int) where T <: PKSubject
MetidaNCA.setkelauto!Method
setkelauto!(data::T, kelauto::Bool) where T <: PKSubject

Set range for elimination parameters calculation for subject.

  • data - PK subject;
  • kelauto - value.
MetidaNCA.setkelrange!Method
setkelrange!(data::DataSet{T}, range::ElimRange{:point}, sort::Dict; kelauto = false) where T <: PKSubject
MetidaNCA.setkelrange!Method
setdosetime!(data::DataSet{T}, dosetime::DoseTime, ind::Int) where T <: PKSubject
MetidaNCA.setkelrange!Method
setkelrange!(data::DataSet{T}, range::ElimRange{:point}, inds::Union{Vector{Int}, UnitRange{Int}, Tuple{Vararg{Int}}}; kelauto = false)
MetidaNCA.setkelrange!Method
setkelrange!(data::DataSet{T}, range::ElimRange{:point}; kelauto = false) where T <: PKSubject
MetidaNCA.setkelrange!Method
setkelrange!(data::T, range::ElimRange{:point}; kelauto = false) where T <: PKSubject

Set range for subject data. Set kelauto if possible.

MetidaNCA.timefilterMethod
timefilter(data::DataSet{<: PKSubject}, time)

Make new DataSet with new filtered subjects.

MetidaNCA.timefilterMethod
timefilter(subj::PKSubject, time::AbstractRange)

Exclude all observation than not in time range.

MetidaNCA.timefilterMethod
timefilter(subj::PKSubject, time::Tuple{<:Number, <:Number})

Make deepcopy of subj and remove all observations < time[1] or > time[2]. Then resize keldata to 0.

If any of points in elimination rage not in min/max time, then elimination settings reset.

MetidaNCA.upkimportMethod
upkimport(stime, etime, conc, vol; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime())

Import urine PK data from time vectors:

  • stime - start times;
  • etime - end times;
  • conc - concentrations;
  • vol - volumes.
MetidaNCA.upkimportMethod
upkimport(data, stime, etime, conc, vol; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime())

Import single urine PK data from table data.

  • stime - start time column;
  • etime - end time column;
  • conc - concentration column;
  • vol - volume column.
MetidaNCA.upkimportMethod
upkimport(data, stime, etime, conc, vol, sort; kelauto = true,  elimrange = ElimRange(), dosetime = DoseTime())

Import urine PK data from table data.

  • stime - start time column;
  • etime - end time column;
  • conc - concentration column;
  • vol - volume column;
  • sort - subject sorting columns.