Skip to content

Commit

Permalink
Merge pull request #66 from PharmCat/Remove-NCA
Browse files Browse the repository at this point in the history
Remove nca
  • Loading branch information
PharmCat authored Apr 24, 2023
2 parents 1813f04 + d555ffd commit e9daefd
Show file tree
Hide file tree
Showing 31 changed files with 234 additions and 949 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: '1.5'
version: "1"
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
GKSwstype: "100"
run: julia --project=docs/ docs/make.jl
4 changes: 3 additions & 1 deletion .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: TagBot
on:
issue_comment:
issue_comment: # THIS BIT IS NEW
types:
- created
workflow_dispatch:
jobs:
TagBot:
# THIS 'if' LINE IS NEW
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
# NOTHING BELOW HAS CHANGED
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
Expand Down
40 changes: 28 additions & 12 deletions .github/workflows/Tier1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,38 @@ on:
- '.github/**'
- 'change.log'
- '.gitignore'
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
ci:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.6, 1.7, 1.8]
julia-arch: [x64]
os: [ubuntu-latest, macOS-latest, windows-2019]
version:
- '1.6'
- '1.7'
- '1.8'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/julia-buildpkg@master
- uses: julia-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: julia-actions/[email protected]
if: ${{ startsWith(matrix.os, 'Ubuntu') && startsWith(matrix.julia-version, '1.6') }}
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
files: lcov.info

682 changes: 21 additions & 661 deletions LICENSE

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ authors = ["Vladimir Arnautov ([email protected])"]
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"
Expand All @@ -13,19 +12,19 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
DataFrames = "1"
Distributions = "0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
Distributions = "0.21, 0.22, 0.23, 0.24, 0.25"
QuadGK = "1, 2"
Roots = "1, 2"
SpecialFunctions = "1, 2"
StatsBase = "0.30, 0.31, 0.32, 0.33"
julia = "1"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["CSV", "Test", "Plots", "StableRNGs"]
test = ["DataFrames", "CSV", "Test", "Plots", "StableRNGs"]
38 changes: 8 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# ClinicalTrialUtilities

Clinical trial related calculation: descriptive statistics, power and sample size calculation, power simulations, confidence interval, pharmacokinetics/pharmacodynamics parameters calculation. This program comes with absolutely no warranty. No liability is accepted for any loss and risk to public health resulting from use of this software.
Clinical trial related calculation: power and sample size calculation, randomization. This program comes with absolutely no warranty. No liability is accepted for any loss and risk to public health resulting from use of this software.

![Tier 1](https://github.com/PharmCat/ClinicalTrialUtilities.jl/workflows/Tier%201/badge.svg)

[![codecov](https://codecov.io/gh/PharmCat/ClinicalTrialUtilities.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/PharmCat/ClinicalTrialUtilities.jl)

[![Latest docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://pharmcat.github.io/ClinicalTrialUtilities.jl/dev/)

## Description

The package is designed to perform calculations related to the planning and analysis of the results of clinical trials. The package includes the basic functions described below, as well as a few modules to perform specific calculations.

### <a name="Installation">Installation</a>
```
Expand All @@ -21,9 +18,6 @@ using Pkg; Pkg.add("ClinicalTrialUtilities");

- Clinical trial sample size calculation
- Power calculation
- Confidence Intervals calculation
- NCA Pharmacokinetics parameters calculation
- Descriptive statistics and frequencies
- Randomization


Expand Down Expand Up @@ -102,36 +96,20 @@ pooledcv([0.12, 0.2, 0.25], [14, 22, 32], [:d2x2, :d2x2, :d2x2])
```

#### Confidence Intervals
#### Randomization
```
using DataFrames, ClinicalTrialUtilities
rt = ClinicalTrialUtilities.randomtable(;blocksize = 4, subject = 32, group = 2, ratio = [1,1], grseq = ["TR", "RT"], seed = 36434654652452)
```
using ClinicalTrialUtilities
ci = propci(38, 100, alpha=0.05, method=:cp)

ci = orpropci(30, 100, 40, 90; alpha=0.05, method=:mn)
#### Confidence Intervals

ci = diffpropci(30, 100, 40, 90; alpha=0.05, method=:wald)
Proportion CI moved to [MetidaFreq.jl](https://github.com/PharmCat/MetidaFreq.jl)

ci = meanci(30, 10, 30, alpha = 0.05, method=:norm)
```

#### NCA
```
using CSV, DataFrames, ClinicalTrialUtilities
pkdatapath = joinpath(dirname(pathof(ClinicalTrialUtilities)))*"\\..\\test\\csv\\pkdata2.csv"
pkdata = CSV.File(pkdatapath) |> DataFrame
pkds = pkimport(pkdata, [:Subject, :Formulation]; time = :Time, conc = :Concentration)
pk = nca!(pkds)
ncadf = DataFrame(pk; unst = true)
ds = ClinicalTrialUtilities.descriptive(ncadf, stats = [:n, :mean, :sd], sort = [:Formulation])
dsdf = ClinicalTrialUtilities.DataFrame(ds; unst = true)
```
#### Randomization
```
using DataFrames, ClinicalTrialUtilities
rt = ClinicalTrialUtilities.randomtable(;blocksize = 4, subject = 32, group = 2, ratio = [1,1], grseq = ["TR", "RT"], seed = 36434654652452)
```

NCA moved to [MetidaNCA.jl](https://github.com/PharmCat/MetidaNCA.jl)

### <a name="Copyrights">Copyrights</a>

Expand Down
4 changes: 4 additions & 0 deletions change.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
V0.7.0
- Stay only sample size, power and randomization. Other functions moved to another packages.
- Change licance.

v0.6.2
- Minor fix
- Deps
Expand Down
6 changes: 0 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ makedocs(
"Home" => "index.md",
"Sample size" => "samplesize.md",
"Power" => "power.md",
"Confidence intervals" => "ci.md",
"Descriptive statistics" => "ds.md",
"NCA" => "nca.md",
"Randomization" => "random.md",
"Simulations" => "sim.md",
"Utilities" => "utils.md",
"Examples" => "examples.md",
"Export" => "export.md",
"Validation" => "validation.md",
"References" => "ref.md",
],
)
Expand Down
29 changes: 0 additions & 29 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,6 @@ bepower(cv=0.4, n=35, design=:d2x4x4)
bepower(cv=0.14, n=21)
```

## Confidence intervals

```julia
using ClinicalTrialUtilities

propci(81, 263, alpha=0.05, method=:wilson)

diffpropci(7, 34, 1, 34; alpha=0.05, method=:nhs)

orpropci(2, 14, 1, 11; alpha=0.05, method=:woolf)

rrpropci(2, 14, 1, 11; alpha=0.05)

diffmeanci(30, 10, 30, 40, 12, 35, alpha=0.05, method=:ev)

```

## Utilities

### CV from CI
Expand All @@ -120,15 +103,3 @@ push!(data, (0.2, 20))
push!(data, (0.25, 30))
pooledcv(data; cv=:cv, df=:df, alpha=0.05, returncv=true)
```

## Simulations

```julia
using ClinicalTrialUtilities

#Make power task
t = bepower(cv=0.2, n=20).task

#Run simulation
result = ctsim(t; nsim = 100, seed=0)
```
25 changes: 15 additions & 10 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ClinicalTrialUtilities

Clinical trial related calculation: descriptive statistics, power and sample size calculation, power simulations, confidence interval, pharmacokinetics/pharmacodynamics parameters calculation.
Clinical trial related calculation: power and sample size calculation, randomization.

[![Build Status](https://travis-ci.com/PharmCat/ClinicalTrialUtilities.jl.svg?branch=master)](https://travis-ci.com/PharmCat/ClinicalTrialUtilities.jl)
[![Build status](https://ci.appveyor.com/api/projects/status/35f8b5vq259sbssg?svg=true)](https://ci.appveyor.com/project/PharmCat/clinicaltrialutilities-jl)
Expand All @@ -10,13 +10,25 @@

## Description

The package is designed to perform calculations related to the planning and analysis of the results of clinical trials. The package includes the basic functions described below, as well as a few modules to perform specific calculations.

The package is designed to perform calculations related to the planning of clinical trials.
## Installation
```
using Pkg; Pkg.add("ClinicalTrialUtilities");
```

### Pharmacodynamics

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).

Descriptive statistics moved to [MetidaStats](https://github.com/PharmCat/MetidaStats.jl).

Confidence intervals moved to [MetidaFreq](https://github.com/PharmCat/MetidaFreq.jl).

Simulations removed.


## Note

**NB! Hypothesis types:**
Expand All @@ -38,17 +50,10 @@ Pages = [
"samplesize.md",
"power.md",
"ci.md",
"ds.md",
"nca.md",
"pk.md",
"pd.md",
"random.md",
"sim.md",
"utils.md",
"examples.md",
"export.md",
"validation.md",
"ref.md"]
Depth = 4
```
Expand Down
Loading

0 comments on commit e9daefd

Please sign in to comment.