Skip to content

Commit

Permalink
website for docs (#8)
Browse files Browse the repository at this point in the history
* add sample vignette and artificial dataset

* pkgdown workflow

---------

Co-authored-by: Fersoil <Fersoil>
  • Loading branch information
Fersoil authored Jul 2, 2024
1 parent 2027280 commit 184a752
Show file tree
Hide file tree
Showing 3 changed files with 189 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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
# 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/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
62 changes: 62 additions & 0 deletions inst/extdata/artificial_plate.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Program,xPONENT,,MAGPIX,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Build,3.1.871.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Date,01/07/2024,00:00,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
SN,PvSTATEM1234,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Batch,test_plate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Version,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Operator,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
ComputerName,test,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Country Code,616,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
ProtocolName,test,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
ProtocolVersion,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Most Recent Calibration and Verification Results:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Last VER Calibration,Passed 01/07/2024 00:00:00,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Last CAL Calibration,Passed 01/07/2024 00:00:00,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Last Fluidics Test,Passed 01/07/2024 00:00:00,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
CALInfo:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Calibrator,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Lot,ExpirationDate,CalibrationTime,DDTemp,CL1Temp,CL2Temp,DDVolts,CL1Volts,CL2Volts,DDRVal,CL1RVal,CL2RVal,Result,MachineSerialNo,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Samples,8,Min Events,50,Per Bead,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Results,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
DataType:,Median,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Location,Sample,Etramp5_ag1,Etramp4_ag1,AMA1
1(1,A1),BLANK,20, 21, 23
2(1,B1),test1,1292,1389,1414
3(1,C1),test2,1430,1435, 867
4(1,D1),test3,657,2031,1300
5(1,E1),CP3 1/50,1486,1437,1893
6(1,F1),CP3 1/250,130,87,90
7(1,G1),CP3 1/1250,78,67,64
8(1,H1),CP3 1/6250, 65,60,64
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
DataType:,Count,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Location,Sample,Etramp5_ag1,Etramp4_ag1,AMA1
1(1,A1),BLANK,100,121,143
2(1,B1),test1,102,104,105
3(1,C1),test2,130,135, 67
4(1,D1),test3,57,231,100
5(1,E1),CP3 1/50,86,37,193
6(1,F1),CP3 1/250,130,87,90
7(1,G1),CP3 1/1250,53,47,65
8(1,H1),CP3 1/6250, 85,50,54
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
DataType:,Per Bead Count,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Alyte:,Etramp5_ag1,Etramp4_ag1,AMA1
BeadID:,73,75,34
Per Bead:,50,50,50,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
DataType:,Audit Logs,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
UserId,Date,Message,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
DataType:,Warnings/Errors,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Location,Status,Message,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
-- CRC --,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
CRC32: 85C2BFCD,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
77 changes: 77 additions & 0 deletions vignettes/example_script.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: "Simple example of basic PvSTATEM package pre-release version functionalities"
author: "Tymoteusz Kwieciński"
date: "`r Sys.Date()`"
output: rmarkdown::html_document
vignette: >
%\VignetteIndexEntry{Simple example of basic PvSTATEM package pre-release version functionalities}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(
collapse = FALSE,
comment = "#>",
warning = FALSE,
message = FALSE
)
```

# Introduction
The basic functionality of the `PvSTATEM` package is reading raw MBA data. To present the functionalities of the package, we created a simple, artificial `csv` file, which is pre-loaded into the package.

```{r}
library(PvSTATEM)
plate_filepath <- system.file("extdata", "artificial_plate.csv", package = "PvSTATEM", mustWork = TRUE) # get the filepath of the csv dataset
plate <- read_data(plate_filepath) # read the data
```

After the plate is successfully loaded, we can look into some basic information about the plate.

```{r}
plate$summary()
plate$get_sample(1)
plate$get_sample_by_type("POSITIVE CONTROL")[[1]]
plate$sample_names
plate$analyte_names
```



## Warnings
Our scripts are designed to catch potential errors in the data. If there are any warnings, they will be stored in the `warnings` field of the plate object. The warnings can be accessed by the `$warnings` field of the plate object or by the `$warnings` field of the sample object.

```{r}
```{r}
## warnings ----------------------------------------------------------------
plate$warnings
plate$get_sample(1)$warnings
plate$get(analyte = "AMA1", sample = 1)
plate$get_sample_by_type("POSITIVE CONTROL")[[1]]$warnings
```



## simple standard curve plotting
```{r}
plot_standard_curve_antibody(plate, antibody_name = "AMA1")
plate$blank_adjustment()
plot_standard_curve_antibody(plate, antibody_name = "AMA1")
```

0 comments on commit 184a752

Please sign in to comment.