Tingwei Adeck November 26, 2023

GitHub <img src="https://img.shields.io/badge/Demandez%20moi-n'%20importe%20quoi-1abc9c.svg" alt="Demandez moi n’importe quoi !" /> <img src="https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg" alt="Ask Me Anything !" /> made-with-R Project status Project Status Project Status lifecycle PRs Welcome saythanks <img src="https://img.shields.io/badge/THANK-YOU-ff69b4.svg" alt="THANK YOU" /> test-coverage R-CMD-check pages-build-deployment license Maintenance CRAN status Awesome Badges

⏩ 📽️ Quick start

For quick starters, please visit the {video tutorial} for an illustration on how to effectively use the package. The video tutorial only covers DAT files based on the assumption that MOST users will be interested in using the package for DAT files.

✍️ Introduction

{normfluodbf} is used to clean and normalize DBF and DAT files obtained from liposome flux assay experiments performed with the FLUOstar microplate reader. The expectation is this package is not limited to this assay type but other assay types performed with the same instrument. The final data frames obtained from this package are ready for insightful data analysis and for the creation of amazing visuals (using ggplot2) that help in making scientific deductions or making presentations to project stakeholders. This project firmly represents my core belief in the public dissemination of scientific information. My convictions on this idea of public dissemination were driven by the book “What Mad Pursuit” by Francis Crick. Visit {my page} for details on the concept behind the project.

⏬ Installation

Developmental Version

The development version of {normfluodbf} can be installed as illustrated below:

devtools::install_github("AlphaPrime7/normfluodbf")
pak::pak("AlphaPrime7/normfluodbf")
remotes::install_github("AlphaPrime7/normfluodbf")

CRAN Version

The CRAN version of {normfluodbf} can be installed as illustrated below:

install.packages("normfluodbf")
library(normfluodbf)

Local Installation

install.packages("normfluodbf_1.5.2.tar.gz", repos = NULL, type = "source")
library(devtools)
install_local("normfluodbf_1.5.2.tar.gz")
library(remotes)
remotes::install_local("normfluodbf_1.5.2.tar.gz")

🕵️ Use Scenarios

🧭 DBF Files Case-Study

Backward Compatible Function

#library(normfluodbf)
liposomes_214 <- system.file("extdata", "liposomes_214.dbf", package = "normfluodbf")
normalized_data <- norm_tidy_dbf(liposomes_214, norm_scale = 'hundred')

New Function

library(normfluodbf)
liposomes_214 <- system.file("extdata", "liposomes_214.dbf", package = "normfluodbf")
normalized_data <- normfluordbf(liposomes_214)
normalized_data <- normfluordbf(liposomes_214)

Advanced Features Illustration

DBF Normalization Procedures

library(normfluodbf)
liposomes_214 <- system.file("extdata", "liposomes_214.dbf", package = "normfluodbf")
normalized_data <- norm_tidy_dbf(liposomes_214, norm_scale = 'one')
normalized_data100 <- norm_tidy_dbf(liposomes_214, norm_scale = 'hundred')
normalized_dataz <- norm_tidy_dbf(liposomes_214, norm_scale = 'z-score')

# The user can add a transformation parameter
normalized_datazt <- norm_tidy_dbf(liposomes_214, norm_scale = 'z-score', transformed = 'log')
library(normfluodbf)
liposomes_214 <- system.file("extdata", "liposomes_214.dbf", package = "normfluodbf")
normalized_data <- normfluordbf(liposomes_214, norm_scale = 'one')
normalized_data100 <- normfluordbf(liposomes_214, norm_scale = 'hundred')
normalized_dataz <- normfluordbf(liposomes_214, norm_scale = 'z-score')

# The user can add a transformation parameter
normalized_datazt <- normfluordbf(liposomes_214, norm_scale = 'z-score', transformed = 'log')

🧭 DAT Files Case-Study

Advanced Function

library(normfluodbf)
dat1 <- system.file("extdata", "dat_1.dat", package = "normfluodbf")
normalized_data <- normfluodat(dat1, tnp = 3, cycles = 40, rows_used = c('A','B','C'))

Base Function

library(normfluodbf)
dat2 <- system.file("extdata", "dat_2.dat", package = "normfluodbf")
normalized_data <- normfluordat(dat2, tnp = 3, cycles = 40, rows_used = c('A','B','C'))

DAT Advanced Procedures

Using The rows_used parameter

library(normfluodbf)
dat2 <- system.file("extdata", "dat_2.dat", package = "normfluodbf")
n <- c('A','B','C') #rows used

# Cycle_Number attribute is included below
normalized_data <- normfluodat(dat2, tnp = 3, cycles = 40, n)

# Cycle_Number & Time attributes are included below
normalized_data <- normfluodat(dat2, tnp = 3, cycles = 40, n, interval = 30)
Sample_Type (TNP) 96 1 2 3 4 5 6 7 8 9 10 11 12
Test A X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12
Negative B X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24
Positive C X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 X36
D
E
F
G
H
A1 (Test) B1 (Negative) C1 (Positive) Cycle_No
A1 B1 C1 1
A1 B1 C1 2
A1 B1 C1 3
A1 B1 C1 4
A1 B1 C1 5
A1 B1 C1 6
A1 B1 C1 …38
A1 B1 C1 …39
A1 B1 C1 …40

Using The rows_used and cols_used parameter

library(normfluodbf)
dat2 <- system.file("extdata", "dat_2.dat", package = "normfluodbf")
n <- c('A','B','C')
c <- c(5,6,7)
normalized_data <- normfluodat(dat2, tnp = 3, cycles = 40, rows_used=n, cols_used=c)
A5 (Test) B5 (Negative) C5 (Positive) Cycle_No
A5 B5 C6 1
A5 B5 C6 2
A5 B5 C6 3

Using The user_specific_labels parameter

library(normfluodbf)
dat2 <- system.file("extdata", "dat_2.dat", package = "normfluodbf")
manual_cols <- c('A1','B1','C1')
normalized_data <- normfluodat(dat2, tnp = 3, cycles = 40, user_specific_labels = manual_cols)
Sample_Type (TNP) 96 1 2 3 4 5 6 7 8 9 10 11 12
Test A X1 X4 X3
Negative B X2 X29
Positive C X25 X28
D
E
F

🧙‍♂️️ Using The read_direction parameter

library(normfluodbf)
dat2 <- system.file("extdata", "dat_2.dat", package = "normfluodbf")
manual_cols <- c('A1','B1','C1')
normalized_data <- normfluodat(dat2, tnp = 3, cycles = 40, n, read_direction = 'horizontal')
Sample_Type (TNP) 96 1 2 3 4 5 6 7 8 9 10 11 12
Test A X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12
Negative B X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24
Positive C X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 X36
D
E
F
G
H
A1 (Test) A2 (Test) A3 (Test) Cycle_No
A1 A2 A3 1
A1 A2 A3 2
A1 A2 A3 3
A1 A2 A3 4
A1 A2 A3 5
A1 A2 A3 6
A1 A2 A3 …38
A1 A2 A3 …39
A1 A2 A3 …40

Using The norm_scale parameter

library(normfluodbf)
dat2 <- system.file("extdata", "dat_2.dat", package = "normfluodbf")
manual_cols <- c('A1','B1','C1')
normalized_data <- normfluodat(dat2, tnp = 3, cycles = 40, n, read_direction = 'horizontal', norm_scale = 'hundred')

The Non-standard Experimental Setup

Sample_Type 96 Test Negative Positive 4 5 6 7 8 9 10 11 12
A X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12
B X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24
C X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 X36
D
E
F
G
H
Sample_Type Cycle_No Machine_data_verbose machine_data_numeric
Test-1 1 A1 1
Test-2 1 B1 2
Test-3 1 C1 3
Test-1 2 A1 4
Test-2 2 B1 5
Test-3 2 C1 6
Test-1 40 A1 …118
Test-2 40 B1 …119
Test-3 40 C1 …120
A1 (Test-1) B1 (Test-2) C1 (Test-3) Cycle_No
A1 B1 C1 1
A1 B1 C1 2
A1 B1 C1 3
A1 B1 C1 4
A1 B1 C1 5
A1 B1 C1 6
A1 B1 C1 …38
A1 B1 C1 …39
A1 B1 C1 …40

🥠 Fail Safe DAT Procedure

library(normfluodbf)
dat1 <- system.file("extdata", "dat_1.dat", package = "normfluodbf")

normalized_data <- normfluodat(dat1, tnp = 3, cycles = 40, rows_used = c('A','B','C') )

# Use the syntax below to obtain a Time attribute as well
normalized_data <- normfluodat(dat1, tnp = 3, cycles = 40, rows_used = c('A','B','C'), interval = 30)

🛂 Quality Control (QC)

💻 Visualization

🎇 Epilogue

🤦 Meme

📃 References

(Dowle and Srinivasan 2023) (Wickham, François, et al. 2023) (Yu 2021) (R Core Team 2022) (Wickham, Chang, et al. 2023) (Arnold 2021) (Wickham 2022) (Müller and Wickham 2023) (Wickham, Vaughan, and Girlich 2023)

Arnold, Jeffrey B. 2021. Ggthemes: Extra Themes, Scales and Geoms for Ggplot2. https://github.com/jrnold/ggthemes.

Dowle, Matt, and Arun Srinivasan. 2023. Data.table: Extension of ‘Data.frame‘. https://CRAN.R-project.org/package=data.table.

Müller, Kirill, and Hadley Wickham. 2023. Tibble: Simple Data Frames. https://CRAN.R-project.org/package=tibble.

R Core Team. 2022. Foreign: Read Data Stored by Minitab, s, SAS, SPSS, Stata, Systat, Weka, dBase, … https://svn.r-project.org/R-packages/trunk/foreign/.

Wickham, Hadley. 2022. Stringr: Simple, Consistent Wrappers for Common String Operations. https://CRAN.R-project.org/package=stringr.

Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen, Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, and Dewey Dunnington. 2023. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://CRAN.R-project.org/package=ggplot2.

Wickham, Hadley, Romain François, Lionel Henry, Kirill Müller, and Davis Vaughan. 2023. Dplyr: A Grammar of Data Manipulation. https://CRAN.R-project.org/package=dplyr.

Wickham, Hadley, Davis Vaughan, and Maximilian Girlich. 2023. Tidyr: Tidy Messy Data. https://CRAN.R-project.org/package=tidyr.

Yu, Guangchuang. 2021. Emojifont: Emoji and Font Awesome in Graphics. https://github.com/GuangchuangYu/emojifont.