Skip to content

Commit

Permalink
PvSTATEM 0.0.2 (#37)
Browse files Browse the repository at this point in the history
* bug: standard curve sample type (#13)

* simple README with overview and installation (#7)

* website for docs (#8)

* add sample vignette and artificial dataset

* pkgdown workflow

---------

Co-authored-by: Fersoil <Fersoil>

* added STANDARD CURVE type, added option to reverse the xaxis of MFI plot, plots in ggplot2, log scales

* docs

* plate name detection based on filepath

* changed the default log scale into `all`

---------

Co-authored-by: Fersoil <Fersoil>

* Add tests and setup GHA (#18)

* simple README with overview and installation (#7)

* website for docs (#8)

* add sample vignette and artificial dataset

* pkgdown workflow

---------

Co-authored-by: Fersoil <Fersoil>

* Add .gitignore

* Add sample files and adequate tests

* Setup package workflow

* Style code (GHA)

* Export remaining objects

* Move dots down

* Add missing usage description

* Disable lint error

* Fix missing import ggplot2

---------

Co-authored-by: Tymoteusz Kwieciński <[email protected]>
Co-authored-by: ZetrextJG <[email protected]>

* Add dev to GHA for R check and test coverage (#19)

* Add codecov (#26)

* bug fixes #16, #24  (#32)

* simple README with overview and installation (#7)

* website for docs (#8)

* add sample vignette and artificial dataset

* pkgdown workflow

---------

Co-authored-by: Fersoil <Fersoil>

* bug: standard curve sample type (#13)

* simple README with overview and installation (#7)

* website for docs (#8)

* add sample vignette and artificial dataset

* pkgdown workflow

---------

Co-authored-by: Fersoil <Fersoil>

* added STANDARD CURVE type, added option to reverse the xaxis of MFI plot, plots in ggplot2, log scales

* docs

* plate name detection based on filepath

* changed the default log scale into `all`

---------

Co-authored-by: Fersoil <Fersoil>

* Add tests and setup GHA (#18)

* simple README with overview and installation (#7)

* website for docs (#8)

* add sample vignette and artificial dataset

* pkgdown workflow

---------

Co-authored-by: Fersoil <Fersoil>

* Add .gitignore

* Add sample files and adequate tests

* Setup package workflow

* Style code (GHA)

* Export remaining objects

* Move dots down

* Add missing usage description

* Disable lint error

* Fix missing import ggplot2

---------

Co-authored-by: Tymoteusz Kwieciński <[email protected]>
Co-authored-by: ZetrextJG <[email protected]>

* Add dev to GHA for R check and test coverage (#19)

* fixed sample type recognition; added standard curve to summary

* updated example script with Covid OISE dataset

* updated example script

---------

Co-authored-by: Jakub Grzywaczewski <[email protected]>
Co-authored-by: ZetrextJG <[email protected]>
Co-authored-by: Fersoil <Fersoil>

* Covid OISE datasets & external data (#34)

* Add covid and external data

* Rename file and add a second plate from Covid OISE

* description of available datasets

---------

Co-authored-by: Fersoil <Fersoil>

* Standard curves - normalization & plotting (#36)

* simple README with overview and installation (#7)

* website for docs (#8)

* add sample vignette and artificial dataset

* pkgdown workflow

---------

Co-authored-by: Fersoil <Fersoil>

* added simple nplr model

* standard curve as plate attribute; simple plot of fitted model

* standard curve model fitting

* enchanced standard curve fitting, fixed reading Covid oise files, added docs

* expanded example script with Covid oise dataset and curve fitting

* predictions in example script

* minor fixes of predictions script

* covid oise datasets

* add `nplr` to `DESCRIPTION`

* vignette engine fixes

* added `ggplot2` import

* error fixes

* add imports to vignettes

* add docs

* CMD check fixes

* CMD check warning fixes

* correct license formatting

* datasets description

* add covid oise layout file

* restore `qpdf` import

---------

Co-authored-by: Fersoil <Fersoil>

* Style code (GHA)

* update package version

---------

Co-authored-by: Jakub Grzywaczewski <[email protected]>
Co-authored-by: ZetrextJG <[email protected]>
Co-authored-by: Fersoil <Fersoil>
Co-authored-by: Fersoil <[email protected]>
  • Loading branch information
4 people authored Jul 17, 2024
1 parent 184a752 commit 469c76c
Show file tree
Hide file tree
Showing 44 changed files with 7,405 additions and 479 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
52 changes: 52 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

name: R-CMD-check

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
34 changes: 34 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

name: lint

permissions: read-all

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::lintr, local::.
needs: lint

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: false
50 changes: 50 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,56 @@ name: pkgdown

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
workflow_dispatch:

name: pkgdown

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths: ["**.[rR]", "**.[qrR]md", "**.[rR]markdown", "**.[rR]nw", "**.[rR]profile"]
branches: [main, dev]

name: Style

permissions: read-all

jobs:
style:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::styler, any::roxygen2
needs: styler

- name: Enable styler cache
run: styler::cache_activate()
shell: Rscript {0}

- name: Determine cache location
id: styler-location
run: |
cat(
"location=",
styler::cache_info(format = "tabular")$location,
"\n",
file = Sys.getenv("GITHUB_OUTPUT"),
append = TRUE,
sep = ""
)
shell: Rscript {0}

- name: Cache styler
uses: actions/cache@v4
with:
path: ${{ steps.styler-location.outputs.location }}
key: ${{ runner.os }}-styler-${{ github.sha }}
restore-keys: |
${{ runner.os }}-styler-
${{ runner.os }}-
- name: Style
run: styler::style_pkg()
shell: Rscript {0}

- name: Commit and push changes
run: |
if FILES_TO_COMMIT=($(git diff-index --name-only ${{ github.sha }} \
| egrep --ignore-case '\.(R|[qR]md|Rmarkdown|Rnw|Rprofile)$'))
then
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit ${FILES_TO_COMMIT[*]} -m "Style code (GHA)"
git pull --ff-only
git push origin
else
echo "No changes to commit."
fi
61 changes: 61 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

name: test-coverage

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
inst/doc
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: local
hooks:
- id: styler
name: Style R code with styler
entry: Rscript -e "errors <- styler::style_pkg(); print(errors); quit(save = 'no', status = sum(errors[[2]]))"
language: system
files: '\.Rproj$'
always_run: true
18 changes: 13 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
Package: PvSTATEM
Type: Package
Title: Reading, quality control and preprocessin of MBA assay data
Version: 0.0.1
Description: Reading, quality control and preprocessin of MBA assay data.
Version: 0.0.2
Authors@R: person("Tymoteusz", "Kwiecinski", email = "[email protected]", role = c("aut", "cre"))
LazyData: true
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Imports:
dplyr,
R6,
tools,
qpdf,
readxl,
RColorBrewer
Suggests:
RColorBrewer,
knitr,
rmarkdown,
ggplot2,
nplr,
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
Config/testfhat/edition: 3
Roxygen: list(markdown = TRUE, r6 = TRUE)
License: BSD_3_clause
VignetteBuilder: knitr
1 change: 1 addition & 0 deletions LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

9 changes: 9 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Generated by roxygen2: do not edit by hand

export(Analyte)
export(Plate)
export(Sample)
export(SampleLocation)
export(SampleType)
export(create_standard_curve_model_antibody)
export(plot_standard_curve_antibody)
export(plot_standard_curve_antibody_with_model)
export(predict_dilutions)
export(read_data)
import(ggplot2)
import(nplr)
Loading

0 comments on commit 469c76c

Please sign in to comment.