Tingwei Adeck September 27, 2024
<img src="https://img.shields.io/badge/Demandez%20moi-n'%20importe%20quoi-1abc9c.svg?style=for-the-badge" alt="Demandez moi n’importe quoi!" />
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.
Based on work by Dean Attali, I have added functionalities for a plate like setup that ensures that R users have a better experience dealing with Liposome flux assay data sets. Adding the plate system ensures that R users can get plots similar to that seen on the Microplate reader. I can go on forever on the advantages of adding the plate system but R users will have to use it and find out the benefits for themselves.
Dean Attali’s ddpcr provides an excellent implementation of the plate system but in the context of Digital Droplet Polymerase Chain Reactions (Ddpcr); I extend Dean’s work into Normfluodbf in the context of Liposome Flux Assays. I include advanced plotting functions in this update to ensure that scientists can perform science and let worries of data analysis to Normfluodbf. I hope that has been achieved in this update and hope to be even better in subsequent updates.
In regards to plate systems, future updates might involve a change to the plate system in this package in order to achieve a more universal plate system that can be used to make plates that work with Dean’s ddpcr experiments and other experiments that utilize plates.
Caveat: The shiny app that was initially developed will be added to this package post-publication of the update. Due to unforeseen circumstances and because I have been working on real work, there has not been enough time to add the simple non-styled app that was developed for this package in my rookie days. Shiny app functions will not yield a useful shiny App. COMING SOON…
{normfluodbf}
is used to clean and normalize DBF and DAT files obtained from liposome
flux assay (LFA) 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.
The development version of {normfluodbf}
can be installed as illustrated below:
::install_github("AlphaPrime7/normfluodbf") devtools
::pak("AlphaPrime7/normfluodbf") pak
::install_github("AlphaPrime7/normfluodbf") remotes
The CRAN version of {normfluodbf}
can be installed as illustrated below:
install.packages("normfluodbf")
library(normfluodbf)
{normfluodbf_builds}
to download the zip files into your desired directory.install.packages("normfluodbf_1.5.2.tar.gz", repos = NULL, type = "source")
library(devtools)
install_local("normfluodbf_1.5.2.tar.gz")
library(remotes)
::install_local("normfluodbf_1.5.2.tar.gz") remotes
#library(normfluodbf)
<- system.file("extdata", "liposomes_214.dbf", package = "normfluodbf")
liposomes_214 <- norm_tidy_dbf(liposomes_214, norm_scale = 'hundred') normalized_data
library(normfluodbf)
<- system.file("extdata", "liposomes_214.dbf", package = "normfluodbf")
liposomes_214 <- normfluordbf(liposomes_214)
normalized_data <- normfluordbf(liposomes_214) normalized_data
library(normfluodbf)
<- system.file("extdata", "liposomes_214.dbf", package = "normfluodbf")
liposomes_214 <- norm_tidy_dbf(liposomes_214, norm_scale = 'one')
normalized_data <- norm_tidy_dbf(liposomes_214, norm_scale = 'hundred')
normalized_data100 <- norm_tidy_dbf(liposomes_214, norm_scale = 'z-score')
normalized_dataz
# The user can add a transformation parameter
<- norm_tidy_dbf(liposomes_214, norm_scale = 'z-score', transformed = 'log') normalized_datazt
library(normfluodbf)
<- system.file("extdata", "liposomes_214.dbf", package = "normfluodbf")
liposomes_214 <- normfluordbf(liposomes_214, norm_scale = 'one')
normalized_data <- normfluordbf(liposomes_214, norm_scale = 'hundred')
normalized_data100 <- normfluordbf(liposomes_214, norm_scale = 'z-score')
normalized_dataz
# The user can add a transformation parameter
<- normfluordbf(liposomes_214, norm_scale = 'z-score', transformed = 'log') normalized_datazt
library(normfluodbf)
<- system.file("extdata", "dat_1.dat", package = "normfluodbf")
dat1 <- normfluodat(dat1, tnp = 3, cycles = 40, rows_used = c('A','B','C'), interval = 30) normalized_data
library(normfluodbf)
<- system.file("extdata", "dat_2.dat", package = "normfluodbf")
dat2 <- normfluordat(dat2, tnp = 3, cycles = 40, rows_used = c('A','B','C')) normalized_data
library(normfluodbf)
<- system.file("extdata", "dat_2.dat", package = "normfluodbf")
dat2 <- c('A','B','C') #rows used
n
# Cycle_Number attribute is included below
<- normfluodat(dat2, tnp = 3, cycles = 40, n)
normalized_data
# Cycle_Number & Time attributes are included below
<- normfluodat(dat2, tnp = 3, cycles = 40, n, interval = 30) normalized_data
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 |
library(normfluodbf)
<- system.file("extdata", "dat_2.dat", package = "normfluodbf")
dat2 <- c('A','B','C')
n <- c(5,6,7)
c <- normfluodat(dat2, tnp = 3, cycles = 40, rows_used=n, cols_used=c) normalized_data
A5 (Test) | B5 (Negative) | C5 (Positive) | Cycle_No |
---|---|---|---|
A5 | B5 | C6 | 1 |
A5 | B5 | C6 | 2 |
A5 | B5 | C6 | 3 |
library(normfluodbf)
<- system.file("extdata", "dat_2.dat", package = "normfluodbf")
dat2 <- c('A1','B1','C1')
manual_cols <- normfluodat(dat2, tnp = 3, cycles = 40, user_specific_labels = manual_cols) normalized_data
Hypothetically, if the user uses the rows and columns indicated in the examples in Using The rows_used and cols_used parameter but skips some wells, then the user can simply go ahead and use the user_specific_labels to add the correct column names for the final data frame.
However, if the scenario above occurs where the user indicates 9 wells should be used but the program detects fewer than 9 samples, then the program will inform the user and ask the user to choose from a list of column names. Illustration below:
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 |
library(normfluodbf)
<- system.file("extdata", "dat_2.dat", package = "normfluodbf")
dat2 <- c('A1','B1','C1')
manual_cols <- normfluodat(dat2, tnp = 3, cycles = 40, n, read_direction = 'horizontal') normalized_data
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 |
library(normfluodbf)
<- system.file("extdata", "dat_2.dat", package = "normfluodbf")
dat2 <- c('A1','B1','C1')
manual_cols <- normfluodat(dat2, tnp = 3, cycles = 40, n, read_direction = 'horizontal', norm_scale = 'hundred') normalized_data
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 |
library(normfluodbf)
<- system.file("extdata", "dat_1.dat", package = "normfluodbf")
dat1
<- normfluodat(dat1, tnp = 3, cycles = 40, rows_used = c('A','B','C') )
normalized_data
# Use the syntax below to obtain a Time attribute as well
<- normfluodat(dat1, tnp = 3, cycles = 40, rows_used = c('A','B','C'), interval = 30) normalized_data
#simple pipeline run
<- system.file("extdata", "dat_1.dat", package = "normfluodbf")
lipsum_214 = setup_plate(init_plate())
plate <- plate %>%
plate upload_data(file = lipsum_214, tnp = 3, cycles = 40, rows_used = c('A','B','C'), norm_scale = 'raw') %>%
run_steps
#subset and plot
<- system.file("extdata", "dat_1.dat", package = "normfluodbf")
lipsum_214 = setup_plate(init_plate())
plate <- plate %>%
plate upload_data(file = lipsum_214, tnp = 3, cycles = 40, rows_used = c('A','B','C'), norm_scale = 'raw') %>%
%>% subset('A1,B1,C1,C9') %>%
run_steps plot(whichplot = 2, legend_labels = c('beef_jerky','fatnose','yourmamasofat','youweird'))
#plot plate layout- my favorite
<- system.file("extdata", "dat_1.dat", package = "normfluodbf")
lipsum_214 = setup_plate(init_plate())
plate <- plate %>%
plate upload_data(file = lipsum_214, tnp = 3, cycles = 40, rows_used = c('A','B','C'), norm_scale = 'raw') %>%
%>% subset_for_layout(c('A1', 'B1', 'C1','A2','B2','C2','A3','B3','C3','C12','C9')) %>% plot(whichplot = 3) run_steps
Experimental issues should be investigated at very high or very low fluorescence values.
The most common experimental issues arise when ACMA concentrations are out of the tolerated range. Based on my experience, ACMA concentrations between 2 and 5 Micromolar will suffice to get fluorescence values within the tolerance threshold.
ACMA concentrations as low as 0.2 Micromolar or as high as 20 Micromolar have proven problematic based on my research experience. These ACMA concentrations have proven NOISY and provide the basis for determining the noise-signal regions.
Another issue linked to the FLUOstar instrument revolves around setting the right “gain” to ensure the right level of sensitivity in machine readings. A very high “gain” setting results in increased machine sensitivity even at the right ACMA concentrations and vice versa. In short, we want the machine to be primed to read exactly what we feed it, no more, no less.
This program boasts of a quality control function to help new researchers avoid pitfalls that can mar their experience performing experiments.
Within this package, a QC function is designed to check that fluorescence values do not exceed the upper limit (2^15 or 32768) OR fall below the lower limit (2^11 or 2048). Fluorescence values that exceed these thresholds are considered noisy and can lead to incorrect interpretation of analysis results.
The images presented below represent results obtained when experiments are conducted within the noise region. The X-axis is actually “Cycle_No” but seemed to have been mislabeled due to the tedious nature of my previous coding approach.
(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)