-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from PharmCat/Remove-NCA
Remove NCA
- Loading branch information
Showing
21 changed files
with
15 additions
and
3,838 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
name = "ClinicalTrialUtilities" | ||
uuid = "535c2557-d7d0-564d-8ff9-4ae146c18cfe" | ||
authors = ["Vladimir Arnautov ([email protected])"] | ||
version = "0.6.6" | ||
version = "0.7.0" | ||
|
||
[deps] | ||
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" | ||
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" | ||
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" | ||
Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" | ||
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" | ||
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" | ||
|
@@ -17,8 +16,7 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" | |
DataFrames = "1" | ||
Distributions = "0.20, 0.21, 0.22, 0.23, 0.24, 0.25" | ||
QuadGK = "1, 2" | ||
RecipesBase = "1" | ||
Roots = "1.0, 2" | ||
Roots = "1, 2" | ||
SpecialFunctions = "1, 2" | ||
StatsBase = "0.30, 0.31, 0.32, 0.33" | ||
julia = "1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,133 +1,7 @@ | ||
# Non-compartment analysis | ||
|
||
*See [MetidaNCA.jl](https://github.com/PharmCat/MetidaNCA.jl). MetidaNCA.jl will replace CTU in plans.* | ||
Further development of NCA PK/PD will be based on [MetidaNCA.jl](https://github.com/PharmCat/MetidaNCA.jl) package. | ||
|
||
NCA analysis based on following steps: | ||
All NCA PK/PD functions moved to [MetidaNCA](https://github.com/PharmCat/MetidaNCA.jl). | ||
|
||
1. Loadind data to DataFrame; | ||
2. Constructing subjects list with pkimport/pdimport; | ||
3. Run NCA; | ||
4. Exporting to DataFrame; | ||
5. Descriptive statistics / HTML export. | ||
|
||
### Description | ||
|
||
```julia | ||
include("ncatable.jl") | ||
``` | ||
#### AUC | ||
|
||
```math | ||
AUC = \sum_{n=1}^N AUC_{n} | ||
``` | ||
|
||
Where `AUCn` - partial AUC. | ||
|
||
Linear trapezoidal rule | ||
|
||
```math | ||
AUC\mid_{t_1}^{t_2} = \delta t \times \frac{C_1 + C_2}{2} | ||
AUMC\mid_{t_1}^{t_2} = \delta t \times \frac{t_1 \times C_1 + t_2 \times C_2}{2} | ||
``` | ||
|
||
Logarithmic trapezoidal rule | ||
|
||
```math | ||
AUC\mid_{t_1}^{t_2} = \delta t \times \frac{ C_2 - C_1}{ln(C_2/C_1)} | ||
AUMC\mid_{t_1}^{t_2} = \delta t \times \frac{t_2 \times C_2 - t_1 \times C_1}{ln(C_2/C_1)} - \delta t^2 \times \frac{ C_2 - C_1}{ln(C_2/C_1)^2} | ||
``` | ||
|
||
Linear interpolation rule | ||
|
||
```math | ||
C_x = C_1 + \frac{(t_x-t_1)\times(C_2 - C_1)}{t_2 - t_1} | ||
``` | ||
|
||
Logarithmic interpolation rule | ||
|
||
```math | ||
C_x = exp\left(ln(C_1) + \frac{(t_x-t_1)\times(ln(C_2) - ln(C_1))}{t_2 - t_1}\right) | ||
``` | ||
|
||
#### MRTlast | ||
|
||
```math | ||
MRTlast = AUMClast / AUClast | ||
``` | ||
|
||
#### ```math \lambda_z ```- elimination constant | ||
|
||
#### HL | ||
|
||
```math | ||
HL = ln(2) / \lambda_z | ||
``` | ||
|
||
#### AUCinf | ||
|
||
```math | ||
AUCinf = AUClast + \frac{Clast}{\lambda_z} | ||
``` | ||
|
||
#### AUMCinf | ||
|
||
```math | ||
AUMCinf = AUMClast + \frac{tlast\times Clast}{\lambda_z} + \frac{Clast}{\lambda_z^2} | ||
``` | ||
|
||
#### AUCpct | ||
|
||
```math | ||
AUCpct = (AUCinf - AUClast) / AUCinf * 100.0% | ||
``` | ||
|
||
#### Accumulation index | ||
|
||
```math | ||
Accind = \frac{1}{1 - exp(-\lambda_z \tau)} | ||
``` | ||
|
||
### nca! | ||
```@docs | ||
ClinicalTrialUtilities.nca! | ||
``` | ||
|
||
### Scenario | ||
|
||
1 Loading DataFrame | ||
|
||
```julia | ||
using CSV, DataFrames, ClinicalTrialUtilities | ||
pkdata2 = CSV.File("pkdata.csv") |> DataFrame | ||
``` | ||
2 Subject list | ||
|
||
```julia | ||
pkds = pkimport(pkdata2, [:Subject, :Formulation]; time = :Time, conc = :Concentration) | ||
``` | ||
|
||
3 NCA analysis with default settings | ||
|
||
```julia | ||
pk = nca!(pkds) | ||
``` | ||
|
||
4 Exporting | ||
|
||
```julia | ||
ncadf = DataFrame(pk; unst = true) | ||
``` | ||
|
||
5 Descriptive statistics | ||
|
||
```julia | ||
ds = ClinicalTrialUtilities.descriptive(ncadf, stats = [:n, :mean, :sd], sort = [:Formulation]) | ||
``` | ||
|
||
6 Exporting | ||
|
||
```julia | ||
dsdf = ClinicalTrialUtilities.DataFrame(ds; unst = true) | ||
``` | ||
Validation included. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
### Pharmacodynamics | ||
|
||
#### pdimport | ||
```@docs | ||
ClinicalTrialUtilities.pdimport | ||
``` | ||
Further development of NCA PK/PD will be based on [MetidaNCA.jl](https://github.com/PharmCat/MetidaNCA.jl) package. | ||
|
||
All NCA PK/PD functions moved to [MetidaNCA](https://github.com/PharmCat/MetidaNCA.jl). | ||
|
||
Validation included. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.