Skip to contents

Instrument QC

This vignette covers the Luciernaga functions that are involved in assessing instrumental quality control. Currently, this section is tailored for Cytek Aurora and Northern Light (TM) spectral cytometers that utilize SpectroFlo as their acquisition and unmixing software. The reason for this platform bias is that these were the only spectral cytometers at the authors home institution when designing the package. If you would like to help us remedy this historical bias and expand the functions to other instruments, feel free to reach out via GitHub! :)

The following functions can work from either the Levy-Jennings Tracking Reports that are generated following automated instrument QC (exported as .csv files) or by retrieving the equivalent data stored as keywords within an .fcs files description for a collection of .fcs files across the timespan of interest.

Cytek Aurora instruments use fluorescent beads as part of their daily quality control checks. These beads have complex signatures, with most beads having peak detectors in either the Ultraviolet or Yellow-Green Laser as can be seen below.

File_Location <- system.file("extdata", package = "Luciernaga")
fcs_files <- list.files(File_Location, pattern=".fcs", full.names = TRUE)
QCBeadFile <- fcs_files[grep("After", fcs_files)][[1]]

QCBead_CS <- load_cytoset_from_fcs(QCBeadFile, transformation = FALSE, truncate_max_range = FALSE)
QCBead_GS <- GatingSet(QCBead_CS)

Data <- Luciernaga_QC(x=QCBead_GS[1], subsets="root", sample.name="GUID", SignatureReturnNow = TRUE, Verbose=TRUE,
              unmixingcontroltype="beads", Unstained=TRUE, removestrings=".fcs", stats="median")
#> 0 of all events were negative and will be rounded to 0
#> Returning Peak Bead Detector Medians
#>   TheDetector TheMedian
#> 1         YG3   2170350
#> 2        UV16   2162536
#>   Fluors Counts
#> 1    YG3   3085
#> Normalizing Data for Signature Comparison
#> Returning designated stats values for Beads_Unstained, please return
#>     to LuciernagaQC as BeadsAF for subtraction for single color unmixing controls


Data <- Data %>% mutate(Sample="QCBeads") %>% relocate(Sample, .before=1)

QCBeads <- QC_WhatsThis(x="QCBeads", data=Data, NumberHits=0, returnPlots=TRUE)
#> Normalizing Data for Signature Comparison

QCBeads[[2]]

Using the QC beads, the gains for instrument detectors and power to individual lasers are adjusted to maintain a stable MFI across time. These adjustments are available to individual users as part of a QC report, with the underlying data available under the Levy-Jennings tracking tab, with the option to download as a .csv file. Unfortunately, it is not in a “tidy” data format, limiting our ability for easy exploratory data analysis. We provide a couple functions to convert the .csv output into a “tidy” format and visualize the data contained within.

The first step is to indicate where the saved .csv file containing the Levy-Jennings tracking data from the cytometer is stored. On a local computer, the code to do this would look similar to the following:

FileLocation <- file.path("C:", "Users", "JohnDoe", "Desktop",
                          "LevyJenningsTracking.csv")

For this vignette, we will use one of these Levy-Jennings Tracking .csvs from a 5 Laser Cytek Aurora (UV16-V16-B14-YG10-R8), that can be found within Luciernaga’s extdata folder.

File_Location <- system.file("extdata", package = "Luciernaga")
CSV_Pattern <- ".CSV$"
CSV_Files <- list.files(path=File_Location, pattern=CSV_Pattern,
                        full.names=TRUE)
CSV_Files
#> [1] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/LJTrackingData.CSV"

QC_FilePrep

Since this .CSV file is not in a tidy format, read.csv() or similar functions will struggle to import correctly. Our function, QC_FilePrep() reads in each row individually as text, and then follows up on the pre-processing into a “tidy” format.

TidyData <- QC_FilePrep(CSV_Files, TrackChange = FALSE)
#> Lines extracted from 2 to 227 written to LineChunk_1.txt 
#> Lines extracted from 230 to 455 written to LineChunk_2.txt 
#> Lines extracted from 458 to 683 written to LineChunk_3.txt 
#> Lines extracted from 686 to 911 written to LineChunk_4.txt 
#> Lines extracted from 914 to 1139 written to LineChunk_5.txt
gt(head(TidyData, 5))
DateTime FSC-Gain Flag-FSC-Gain SSC-Gain Flag-SSC-Gain SSC-B-Gain Flag-SSC-B-Gain UV1-Gain Flag-UV1-Gain UV2-Gain Flag-UV2-Gain UV3-Gain Flag-UV3-Gain UV4-Gain Flag-UV4-Gain UV5-Gain Flag-UV5-Gain UV6-Gain Flag-UV6-Gain UV7-Gain Flag-UV7-Gain UV8-Gain Flag-UV8-Gain UV9-Gain Flag-UV9-Gain UV10-Gain Flag-UV10-Gain UV11-Gain Flag-UV11-Gain UV12-Gain Flag-UV12-Gain UV13-Gain Flag-UV13-Gain UV14-Gain Flag-UV14-Gain UV15-Gain Flag-UV15-Gain UV16-Gain Flag-UV16-Gain V1-Gain Flag-V1-Gain V2-Gain Flag-V2-Gain V3-Gain Flag-V3-Gain V4-Gain Flag-V4-Gain V5-Gain Flag-V5-Gain V6-Gain Flag-V6-Gain V7-Gain Flag-V7-Gain V8-Gain Flag-V8-Gain V9-Gain Flag-V9-Gain V10-Gain Flag-V10-Gain V11-Gain Flag-V11-Gain V12-Gain Flag-V12-Gain V13-Gain Flag-V13-Gain V14-Gain Flag-V14-Gain V15-Gain Flag-V15-Gain V16-Gain Flag-V16-Gain B1-Gain Flag-B1-Gain B2-Gain Flag-B2-Gain B3-Gain Flag-B3-Gain B4-Gain Flag-B4-Gain B5-Gain Flag-B5-Gain B6-Gain Flag-B6-Gain B7-Gain Flag-B7-Gain B8-Gain Flag-B8-Gain B9-Gain Flag-B9-Gain B10-Gain Flag-B10-Gain B11-Gain Flag-B11-Gain B12-Gain Flag-B12-Gain B13-Gain Flag-B13-Gain B14-Gain Flag-B14-Gain YG1-Gain Flag-YG1-Gain YG2-Gain Flag-YG2-Gain YG3-Gain Flag-YG3-Gain YG4-Gain Flag-YG4-Gain YG5-Gain Flag-YG5-Gain YG6-Gain Flag-YG6-Gain YG7-Gain Flag-YG7-Gain YG8-Gain Flag-YG8-Gain YG9-Gain Flag-YG9-Gain YG10-Gain Flag-YG10-Gain R1-Gain Flag-R1-Gain R2-Gain Flag-R2-Gain R3-Gain Flag-R3-Gain R4-Gain Flag-R4-Gain R5-Gain Flag-R5-Gain R6-Gain Flag-R6-Gain R7-Gain Flag-R7-Gain R8-Gain Flag-R8-Gain FSC-% rCV Flag-FSC-% rCV SSC-% rCV Flag-SSC-% rCV SSC-B-% rCV Flag-SSC-B-% rCV UV1-% rCV Flag-UV1-% rCV UV2-% rCV Flag-UV2-% rCV UV3-% rCV Flag-UV3-% rCV UV4-% rCV Flag-UV4-% rCV UV5-% rCV Flag-UV5-% rCV UV6-% rCV Flag-UV6-% rCV UV7-% rCV Flag-UV7-% rCV UV8-% rCV Flag-UV8-% rCV UV9-% rCV Flag-UV9-% rCV UV10-% rCV Flag-UV10-% rCV UV11-% rCV Flag-UV11-% rCV UV12-% rCV Flag-UV12-% rCV UV13-% rCV Flag-UV13-% rCV UV14-% rCV Flag-UV14-% rCV UV15-% rCV Flag-UV15-% rCV UV16-% rCV Flag-UV16-% rCV V1-% rCV Flag-V1-% rCV V2-% rCV Flag-V2-% rCV V3-% rCV Flag-V3-% rCV V4-% rCV Flag-V4-% rCV V5-% rCV Flag-V5-% rCV V6-% rCV Flag-V6-% rCV V7-% rCV Flag-V7-% rCV V8-% rCV Flag-V8-% rCV V9-% rCV Flag-V9-% rCV V10-% rCV Flag-V10-% rCV V11-% rCV Flag-V11-% rCV V12-% rCV Flag-V12-% rCV V13-% rCV Flag-V13-% rCV V14-% rCV Flag-V14-% rCV V15-% rCV Flag-V15-% rCV V16-% rCV Flag-V16-% rCV B1-% rCV Flag-B1-% rCV B2-% rCV Flag-B2-% rCV B3-% rCV Flag-B3-% rCV B4-% rCV Flag-B4-% rCV B5-% rCV Flag-B5-% rCV B6-% rCV Flag-B6-% rCV B7-% rCV Flag-B7-% rCV B8-% rCV Flag-B8-% rCV B9-% rCV Flag-B9-% rCV B10-% rCV Flag-B10-% rCV B11-% rCV Flag-B11-% rCV B12-% rCV Flag-B12-% rCV B13-% rCV Flag-B13-% rCV B14-% rCV Flag-B14-% rCV YG1-% rCV Flag-YG1-% rCV YG2-% rCV Flag-YG2-% rCV YG3-% rCV Flag-YG3-% rCV YG4-% rCV Flag-YG4-% rCV YG5-% rCV Flag-YG5-% rCV YG6-% rCV Flag-YG6-% rCV YG7-% rCV Flag-YG7-% rCV YG8-% rCV Flag-YG8-% rCV YG9-% rCV Flag-YG9-% rCV YG10-% rCV Flag-YG10-% rCV R1-% rCV Flag-R1-% rCV R2-% rCV Flag-R2-% rCV R3-% rCV Flag-R3-% rCV R4-% rCV Flag-R4-% rCV R5-% rCV Flag-R5-% rCV R6-% rCV Flag-R6-% rCV R7-% rCV Flag-R7-% rCV R8-% rCV Flag-R8-% rCV YellowGreen-Laser Delay Flag-YellowGreen-Laser Delay Violet-Laser Delay Flag-Violet-Laser Delay Red-Laser Delay Flag-Red-Laser Delay UV-Laser Delay Flag-UV-Laser Delay YellowGreen-Area Scaling Factor Flag-YellowGreen-Area Scaling Factor Violet-Area Scaling Factor Flag-Violet-Area Scaling Factor Blue-Area Scaling Factor Flag-Blue-Area Scaling Factor Red-Area Scaling Factor Flag-Red-Area Scaling Factor UV-Area Scaling Factor Flag-UV-Area Scaling Factor FSC Flag-FSC
2024-09-06 09:55:00 952 FALSE 175 FALSE 360 FALSE 1034 FALSE 262 FALSE 204 FALSE 151 FALSE 192 FALSE 231 FALSE 367 FALSE 294 FALSE 355 FALSE 235 FALSE 301 FALSE 281 FALSE 410 FALSE 675 FALSE 538 FALSE 676 FALSE 124 FALSE 235 FALSE 216 FALSE 143 FALSE 171 FALSE 179 FALSE 235 FALSE 298 FALSE 248 FALSE 287 FALSE 231 FALSE 181 FALSE 172 FALSE 239 FALSE 410 FALSE 276 FALSE 1055 FALSE 645 FALSE 594 FALSE 536 FALSE 392 FALSE 374 FALSE 789 FALSE 555 FALSE 765 FALSE 690 FALSE 473 FALSE 453 FALSE 658 FALSE 733 FALSE 381 FALSE 375 FALSE 242 FALSE 465 FALSE 365 FALSE 411 FALSE 291 FALSE 265 FALSE 358 FALSE 327 FALSE 213 FALSE 199 FALSE 281 FALSE 281 FALSE 229 FALSE 212 FALSE 357 FALSE 208 FALSE 1.1432090 FALSE 1.656716 FALSE 3.391170 FALSE 6.264603 FALSE 2.429039 FALSE 1.863501 FALSE 1.916417 FALSE 1.886120 FALSE 2.022500 FALSE 2.037093 FALSE 1.997900 FALSE 1.908385 FALSE 2.030460 FALSE 1.977809 FALSE 1.986099 FALSE 2.038826 FALSE 2.067160 FALSE 2.334379 FALSE 2.715388 FALSE 2.129838 FALSE 1.995929 FALSE 1.946202 FALSE 1.767177 FALSE 1.689073 FALSE 1.713192 FALSE 1.596646 FALSE 1.506381 FALSE 1.484919 FALSE 1.554641 FALSE 1.464889 FALSE 1.546612 FALSE 1.828770 FALSE 2.036353 FALSE 2.232001 FALSE 2.520183 FALSE 2.261960 FALSE 2.048054 FALSE 1.910570 FALSE 1.908745 FALSE 1.945035 FALSE 2.088102 FALSE 1.905307 FALSE 1.635550 FALSE 1.495144 FALSE 1.341895 FALSE 1.161039 FALSE 0.9503762 FALSE 1.245947 FALSE 1.722119 FALSE 1.720193 FALSE 1.755334 FALSE 1.767388 FALSE 1.542750 FALSE 1.430754 FALSE 1.466286 FALSE 1.245032 FALSE 0.9637733 FALSE 1.244421 FALSE 1.991794 FALSE 2.455691 FALSE 2.457680 FALSE 2.258698 FALSE 2.106153 FALSE 2.386690 FALSE 2.477646 FALSE 2.586058 FALSE 2.811563 FALSE -40.500 FALSE -21.075 FALSE 18.325 FALSE 39.05000 FALSE 1.117378 FALSE 1.100811 FALSE 1.055206 FALSE 1.124783 FALSE 1.153174 FALSE 1.047562 FALSE
2024-09-05 09:47:00 952 FALSE 175 FALSE 360 FALSE 1034 FALSE 262 FALSE 204 FALSE 151 FALSE 192 FALSE 231 FALSE 367 FALSE 294 FALSE 355 FALSE 235 FALSE 301 FALSE 281 FALSE 410 FALSE 675 FALSE 538 FALSE 676 FALSE 124 FALSE 235 FALSE 216 FALSE 143 FALSE 171 FALSE 179 FALSE 235 FALSE 298 FALSE 248 FALSE 287 FALSE 231 FALSE 181 FALSE 172 FALSE 239 FALSE 410 FALSE 276 FALSE 1055 FALSE 645 FALSE 594 FALSE 536 FALSE 392 FALSE 374 FALSE 789 FALSE 555 FALSE 765 FALSE 690 FALSE 473 FALSE 453 FALSE 658 FALSE 733 FALSE 381 FALSE 375 FALSE 242 FALSE 465 FALSE 365 FALSE 411 FALSE 291 FALSE 265 FALSE 358 FALSE 327 FALSE 213 FALSE 199 FALSE 281 FALSE 281 FALSE 229 FALSE 212 FALSE 357 FALSE 208 FALSE 0.9828051 FALSE 1.486589 FALSE 3.168070 FALSE 6.778501 FALSE 2.789469 FALSE 2.000621 FALSE 1.961279 FALSE 1.899708 FALSE 2.028608 FALSE 2.011621 FALSE 2.020543 FALSE 2.030485 FALSE 2.163587 FALSE 2.207438 FALSE 2.330349 FALSE 2.372933 FALSE 2.557147 FALSE 2.845392 FALSE 3.373650 FALSE 2.056399 FALSE 1.931538 FALSE 1.898221 FALSE 1.733819 FALSE 1.657402 FALSE 1.684843 FALSE 1.573963 FALSE 1.529423 FALSE 1.479667 FALSE 1.540358 FALSE 1.529897 FALSE 1.657230 FALSE 1.853214 FALSE 2.166572 FALSE 2.352311 FALSE 2.849532 FALSE 2.164973 FALSE 2.002620 FALSE 1.837303 FALSE 1.911555 FALSE 1.927605 FALSE 2.030733 FALSE 1.868655 FALSE 1.632163 FALSE 1.518442 FALSE 1.324966 FALSE 1.138469 FALSE 0.9969820 FALSE 1.332663 FALSE 2.020584 FALSE 2.099529 FALSE 2.094043 FALSE 2.079396 FALSE 1.805496 FALSE 1.658305 FALSE 1.628693 FALSE 1.255993 FALSE 1.1332900 FALSE 1.370803 FALSE 2.119825 FALSE 2.008878 FALSE 1.918429 FALSE 1.815691 FALSE 1.522780 FALSE 1.615622 FALSE 1.838615 FALSE 2.088522 FALSE 2.575110 FALSE -40.475 FALSE -21.050 FALSE 18.350 FALSE 39.25000 FALSE 1.115326 FALSE 1.101323 FALSE 1.049863 FALSE 1.131018 FALSE 1.147614 FALSE 1.049160 FALSE
2024-09-04 11:54:00 952 FALSE 175 FALSE 374 FALSE 1005 FALSE 261 FALSE 201 FALSE 150 FALSE 189 FALSE 228 FALSE 360 FALSE 287 FALSE 346 FALSE 230 FALSE 295 FALSE 273 FALSE 407 FALSE 694 FALSE 562 FALSE 731 FALSE 124 FALSE 236 FALSE 216 FALSE 143 FALSE 171 FALSE 180 FALSE 235 FALSE 295 FALSE 247 FALSE 284 FALSE 230 FALSE 178 FALSE 173 FALSE 248 FALSE 429 FALSE 301 FALSE 1053 FALSE 633 FALSE 587 FALSE 530 FALSE 377 FALSE 366 FALSE 766 FALSE 542 FALSE 740 FALSE 670 FALSE 480 FALSE 466 FALSE 683 FALSE 788 FALSE 373 FALSE 365 FALSE 239 FALSE 462 FALSE 361 FALSE 409 FALSE 291 FALSE 274 FALSE 379 FALSE 360 FALSE 211 FALSE 194 FALSE 274 FALSE 282 FALSE 236 FALSE 222 FALSE 379 FALSE 228 FALSE 1.1427850 FALSE 1.650216 FALSE 3.404454 FALSE 6.249073 FALSE 2.491864 FALSE 1.862134 FALSE 1.909469 FALSE 1.861105 FALSE 2.000672 FALSE 1.986089 FALSE 1.930265 FALSE 1.889304 FALSE 2.061495 FALSE 2.053966 FALSE 2.092777 FALSE 2.112250 FALSE 2.509193 FALSE 3.136347 FALSE 4.412608 FALSE 2.100889 FALSE 2.002945 FALSE 1.932808 FALSE 1.740571 FALSE 1.657038 FALSE 1.683967 FALSE 1.580156 FALSE 1.528652 FALSE 1.531892 FALSE 1.582444 FALSE 1.515454 FALSE 1.728714 FALSE 1.924146 FALSE 2.416316 FALSE 2.948268 FALSE 4.212700 FALSE 2.240129 FALSE 2.048242 FALSE 1.964174 FALSE 1.970928 FALSE 1.998484 FALSE 2.127932 FALSE 2.011554 FALSE 1.847309 FALSE 1.686030 FALSE 1.344182 FALSE 1.440430 FALSE 1.7554460 FALSE 2.472930 FALSE 3.815283 FALSE 1.891177 FALSE 1.851248 FALSE 1.834599 FALSE 1.612341 FALSE 1.529321 FALSE 1.573667 FALSE 1.207768 FALSE 1.6748610 FALSE 2.417189 FALSE 4.006108 FALSE 2.699635 FALSE 2.870104 FALSE 2.714585 FALSE 2.035859 FALSE 2.236473 FALSE 2.641256 FALSE 3.192090 FALSE 4.178363 FALSE -40.450 FALSE -21.025 FALSE 18.325 FALSE 39.15001 FALSE 1.117487 FALSE 1.100363 FALSE 1.060736 FALSE 1.121434 FALSE 1.159118 FALSE 1.049232 FALSE
2024-09-03 10:27:00 952 FALSE 175 FALSE 366 FALSE 1015 FALSE 261 FALSE 205 FALSE 149 FALSE 191 FALSE 230 FALSE 365 FALSE 291 FALSE 356 FALSE 237 FALSE 302 FALSE 278 FALSE 409 FALSE 675 FALSE 538 FALSE 673 FALSE 125 FALSE 235 FALSE 217 FALSE 143 FALSE 171 FALSE 180 FALSE 236 FALSE 298 FALSE 251 FALSE 287 FALSE 231 FALSE 179 FALSE 172 FALSE 239 FALSE 410 FALSE 278 FALSE 1039 FALSE 629 FALSE 590 FALSE 533 FALSE 387 FALSE 372 FALSE 775 FALSE 542 FALSE 740 FALSE 675 FALSE 467 FALSE 447 FALSE 649 FALSE 726 FALSE 385 FALSE 384 FALSE 246 FALSE 475 FALSE 371 FALSE 417 FALSE 292 FALSE 266 FALSE 361 FALSE 331 FALSE 210 FALSE 198 FALSE 277 FALSE 278 FALSE 225 FALSE 209 FALSE 352 FALSE 206 FALSE 1.0940750 FALSE 1.506786 FALSE 3.360724 FALSE 6.462072 FALSE 2.763116 FALSE 2.037099 FALSE 2.050432 FALSE 2.001332 FALSE 2.125264 FALSE 2.105296 FALSE 2.099908 FALSE 2.050431 FALSE 2.211665 FALSE 2.233405 FALSE 2.301775 FALSE 2.414908 FALSE 2.465203 FALSE 2.715020 FALSE 3.019860 FALSE 2.132218 FALSE 1.987542 FALSE 1.943148 FALSE 1.745199 FALSE 1.642447 FALSE 1.655562 FALSE 1.563381 FALSE 1.463618 FALSE 1.420285 FALSE 1.474916 FALSE 1.404552 FALSE 1.551269 FALSE 1.904409 FALSE 2.144289 FALSE 2.302552 FALSE 2.543879 FALSE 2.202363 FALSE 2.016690 FALSE 1.841154 FALSE 1.874081 FALSE 1.903103 FALSE 2.033110 FALSE 1.856272 FALSE 1.582899 FALSE 1.409550 FALSE 1.280894 FALSE 1.108260 FALSE 0.9129870 FALSE 1.195870 FALSE 1.648019 FALSE 1.664794 FALSE 1.681845 FALSE 1.697725 FALSE 1.483731 FALSE 1.341364 FALSE 1.411474 FALSE 1.238907 FALSE 0.9590386 FALSE 1.203480 FALSE 1.943065 FALSE 2.228366 FALSE 2.160040 FALSE 1.991672 FALSE 1.831947 FALSE 2.012692 FALSE 2.129553 FALSE 2.270175 FALSE 2.494766 FALSE -40.375 FALSE -21.025 FALSE 18.350 FALSE 39.17500 FALSE 1.117271 FALSE 1.099861 FALSE 1.060087 FALSE 1.122895 FALSE 1.158153 FALSE 1.049512 FALSE
2024-08-30 09:10:00 952 FALSE 174 FALSE 362 FALSE 1006 FALSE 255 FALSE 199 FALSE 146 FALSE 187 FALSE 226 FALSE 359 FALSE 286 FALSE 346 FALSE 229 FALSE 299 FALSE 277 FALSE 405 FALSE 664 FALSE 528 FALSE 649 FALSE 124 FALSE 235 FALSE 216 FALSE 143 FALSE 171 FALSE 180 FALSE 236 FALSE 298 FALSE 248 FALSE 285 FALSE 234 FALSE 183 FALSE 174 FALSE 239 FALSE 409 FALSE 272 FALSE 1061 FALSE 650 FALSE 601 FALSE 539 FALSE 386 FALSE 372 FALSE 798 FALSE 566 FALSE 766 FALSE 698 FALSE 477 FALSE 456 FALSE 652 FALSE 727 FALSE 381 FALSE 366 FALSE 240 FALSE 472 FALSE 373 FALSE 417 FALSE 295 FALSE 264 FALSE 356 FALSE 325 FALSE 227 FALSE 210 FALSE 296 FALSE 292 FALSE 233 FALSE 213 FALSE 356 FALSE 206 FALSE 1.1230390 FALSE 1.587396 FALSE 3.144476 FALSE 6.039213 FALSE 2.320482 FALSE 1.712948 FALSE 1.761460 FALSE 1.747827 FALSE 1.890462 FALSE 1.882053 FALSE 1.854762 FALSE 1.793789 FALSE 1.957978 FALSE 1.850497 FALSE 1.870026 FALSE 1.888335 FALSE 1.900911 FALSE 2.128706 FALSE 2.481989 FALSE 1.938528 FALSE 1.831381 FALSE 1.784025 FALSE 1.625682 FALSE 1.564482 FALSE 1.597764 FALSE 1.509278 FALSE 1.443830 FALSE 1.445605 FALSE 1.520399 FALSE 1.377021 FALSE 1.460671 FALSE 1.722973 FALSE 1.864548 FALSE 2.054577 FALSE 2.370376 FALSE 2.130341 FALSE 1.936619 FALSE 1.764786 FALSE 1.791266 FALSE 1.849550 FALSE 1.972338 FALSE 1.781428 FALSE 1.546424 FALSE 1.421219 FALSE 1.329690 FALSE 1.157314 FALSE 0.9199556 FALSE 1.213791 FALSE 1.687987 FALSE 1.699381 FALSE 1.741229 FALSE 1.758894 FALSE 1.519310 FALSE 1.369852 FALSE 1.410669 FALSE 1.184459 FALSE 0.8889793 FALSE 1.166232 FALSE 1.898138 FALSE 2.260776 FALSE 2.203071 FALSE 2.038892 FALSE 1.921937 FALSE 2.134946 FALSE 2.198344 FALSE 2.371886 FALSE 2.616197 FALSE -40.525 FALSE -21.075 FALSE 18.400 FALSE 39.22500 FALSE 1.116796 FALSE 1.101068 FALSE 1.053692 FALSE 1.127847 FALSE 1.153375 FALSE 1.048213 FALSE

Individual rows are the individual QC reports, with the columns being the different parameters. Additionally, if the individual parameter exceeded the variance allowed resulting in a QC failure, it is recorded under the corresponding Flag- column. With the data now “tidy”, it can be more readily used in R to plot individual detector(s) that might be of interest.

Additionally, setting QC_FilePrep() TrackChange to TRUE will generate a similar output to that of the QC report showing Change from the previous QC report which can provide additional information for instrument monitoring.

TidyData_Track <- QC_FilePrep(CSV_Files, TrackChange = TRUE)
#> Lines extracted from 2 to 227 written to LineChunk_1.txt 
#> Lines extracted from 230 to 455 written to LineChunk_2.txt 
#> Lines extracted from 458 to 683 written to LineChunk_3.txt 
#> Lines extracted from 686 to 911 written to LineChunk_4.txt 
#> Lines extracted from 914 to 1139 written to LineChunk_5.txt
gt(head(TidyData_Track, 3))
DateTime FSC-Gain Change_FSC-Gain Flag-FSC-Gain Flag-Change_FSC-Gain SSC-Gain Change_SSC-Gain Flag-SSC-Gain Flag-Change_SSC-Gain SSC-B-Gain Change_SSC-B-Gain Flag-SSC-B-Gain Flag-Change_SSC-B-Gain UV1-Gain Change_UV1-Gain Flag-UV1-Gain Flag-Change_UV1-Gain UV2-Gain Change_UV2-Gain Flag-UV2-Gain Flag-Change_UV2-Gain UV3-Gain Change_UV3-Gain Flag-UV3-Gain Flag-Change_UV3-Gain UV4-Gain Change_UV4-Gain Flag-UV4-Gain Flag-Change_UV4-Gain UV5-Gain Change_UV5-Gain Flag-UV5-Gain Flag-Change_UV5-Gain UV6-Gain Change_UV6-Gain Flag-UV6-Gain Flag-Change_UV6-Gain UV7-Gain Change_UV7-Gain Flag-UV7-Gain Flag-Change_UV7-Gain UV8-Gain Change_UV8-Gain Flag-UV8-Gain Flag-Change_UV8-Gain UV9-Gain Change_UV9-Gain Flag-UV9-Gain Flag-Change_UV9-Gain UV10-Gain Change_UV10-Gain Flag-UV10-Gain Flag-Change_UV10-Gain UV11-Gain Change_UV11-Gain Flag-UV11-Gain Flag-Change_UV11-Gain UV12-Gain Change_UV12-Gain Flag-UV12-Gain Flag-Change_UV12-Gain UV13-Gain Change_UV13-Gain Flag-UV13-Gain Flag-Change_UV13-Gain UV14-Gain Change_UV14-Gain Flag-UV14-Gain Flag-Change_UV14-Gain UV15-Gain Change_UV15-Gain Flag-UV15-Gain Flag-Change_UV15-Gain UV16-Gain Change_UV16-Gain Flag-UV16-Gain Flag-Change_UV16-Gain V1-Gain Change_V1-Gain Flag-V1-Gain Flag-Change_V1-Gain V2-Gain Change_V2-Gain Flag-V2-Gain Flag-Change_V2-Gain V3-Gain Change_V3-Gain Flag-V3-Gain Flag-Change_V3-Gain V4-Gain Change_V4-Gain Flag-V4-Gain Flag-Change_V4-Gain V5-Gain Change_V5-Gain Flag-V5-Gain Flag-Change_V5-Gain V6-Gain Change_V6-Gain Flag-V6-Gain Flag-Change_V6-Gain V7-Gain Change_V7-Gain Flag-V7-Gain Flag-Change_V7-Gain V8-Gain Change_V8-Gain Flag-V8-Gain Flag-Change_V8-Gain V9-Gain Change_V9-Gain Flag-V9-Gain Flag-Change_V9-Gain V10-Gain Change_V10-Gain Flag-V10-Gain Flag-Change_V10-Gain V11-Gain Change_V11-Gain Flag-V11-Gain Flag-Change_V11-Gain V12-Gain Change_V12-Gain Flag-V12-Gain Flag-Change_V12-Gain V13-Gain Change_V13-Gain Flag-V13-Gain Flag-Change_V13-Gain V14-Gain Change_V14-Gain Flag-V14-Gain Flag-Change_V14-Gain V15-Gain Change_V15-Gain Flag-V15-Gain Flag-Change_V15-Gain V16-Gain Change_V16-Gain Flag-V16-Gain Flag-Change_V16-Gain B1-Gain Change_B1-Gain Flag-B1-Gain Flag-Change_B1-Gain B2-Gain Change_B2-Gain Flag-B2-Gain Flag-Change_B2-Gain B3-Gain Change_B3-Gain Flag-B3-Gain Flag-Change_B3-Gain B4-Gain Change_B4-Gain Flag-B4-Gain Flag-Change_B4-Gain B5-Gain Change_B5-Gain Flag-B5-Gain Flag-Change_B5-Gain B6-Gain Change_B6-Gain Flag-B6-Gain Flag-Change_B6-Gain B7-Gain Change_B7-Gain Flag-B7-Gain Flag-Change_B7-Gain B8-Gain Change_B8-Gain Flag-B8-Gain Flag-Change_B8-Gain B9-Gain Change_B9-Gain Flag-B9-Gain Flag-Change_B9-Gain B10-Gain Change_B10-Gain Flag-B10-Gain Flag-Change_B10-Gain B11-Gain Change_B11-Gain Flag-B11-Gain Flag-Change_B11-Gain B12-Gain Change_B12-Gain Flag-B12-Gain Flag-Change_B12-Gain B13-Gain Change_B13-Gain Flag-B13-Gain Flag-Change_B13-Gain B14-Gain Change_B14-Gain Flag-B14-Gain Flag-Change_B14-Gain YG1-Gain Change_YG1-Gain Flag-YG1-Gain Flag-Change_YG1-Gain YG2-Gain Change_YG2-Gain Flag-YG2-Gain Flag-Change_YG2-Gain YG3-Gain Change_YG3-Gain Flag-YG3-Gain Flag-Change_YG3-Gain YG4-Gain Change_YG4-Gain Flag-YG4-Gain Flag-Change_YG4-Gain YG5-Gain Change_YG5-Gain Flag-YG5-Gain Flag-Change_YG5-Gain YG6-Gain Change_YG6-Gain Flag-YG6-Gain Flag-Change_YG6-Gain YG7-Gain Change_YG7-Gain Flag-YG7-Gain Flag-Change_YG7-Gain YG8-Gain Change_YG8-Gain Flag-YG8-Gain Flag-Change_YG8-Gain YG9-Gain Change_YG9-Gain Flag-YG9-Gain Flag-Change_YG9-Gain YG10-Gain Change_YG10-Gain Flag-YG10-Gain Flag-Change_YG10-Gain R1-Gain Change_R1-Gain Flag-R1-Gain Flag-Change_R1-Gain R2-Gain Change_R2-Gain Flag-R2-Gain Flag-Change_R2-Gain R3-Gain Change_R3-Gain Flag-R3-Gain Flag-Change_R3-Gain R4-Gain Change_R4-Gain Flag-R4-Gain Flag-Change_R4-Gain R5-Gain Change_R5-Gain Flag-R5-Gain Flag-Change_R5-Gain R6-Gain Change_R6-Gain Flag-R6-Gain Flag-Change_R6-Gain R7-Gain Change_R7-Gain Flag-R7-Gain Flag-Change_R7-Gain R8-Gain Change_R8-Gain Flag-R8-Gain Flag-Change_R8-Gain FSC-% rCV Change_FSC-% rCV Flag-FSC-% rCV Flag-Change_FSC-% rCV SSC-% rCV Change_SSC-% rCV Flag-SSC-% rCV Flag-Change_SSC-% rCV SSC-B-% rCV Change_SSC-B-% rCV Flag-SSC-B-% rCV Flag-Change_SSC-B-% rCV UV1-% rCV Change_UV1-% rCV Flag-UV1-% rCV Flag-Change_UV1-% rCV UV2-% rCV Change_UV2-% rCV Flag-UV2-% rCV Flag-Change_UV2-% rCV UV3-% rCV Change_UV3-% rCV Flag-UV3-% rCV Flag-Change_UV3-% rCV UV4-% rCV Change_UV4-% rCV Flag-UV4-% rCV Flag-Change_UV4-% rCV UV5-% rCV Change_UV5-% rCV Flag-UV5-% rCV Flag-Change_UV5-% rCV UV6-% rCV Change_UV6-% rCV Flag-UV6-% rCV Flag-Change_UV6-% rCV UV7-% rCV Change_UV7-% rCV Flag-UV7-% rCV Flag-Change_UV7-% rCV UV8-% rCV Change_UV8-% rCV Flag-UV8-% rCV Flag-Change_UV8-% rCV UV9-% rCV Change_UV9-% rCV Flag-UV9-% rCV Flag-Change_UV9-% rCV UV10-% rCV Change_UV10-% rCV Flag-UV10-% rCV Flag-Change_UV10-% rCV UV11-% rCV Change_UV11-% rCV Flag-UV11-% rCV Flag-Change_UV11-% rCV UV12-% rCV Change_UV12-% rCV Flag-UV12-% rCV Flag-Change_UV12-% rCV UV13-% rCV Change_UV13-% rCV Flag-UV13-% rCV Flag-Change_UV13-% rCV UV14-% rCV Change_UV14-% rCV Flag-UV14-% rCV Flag-Change_UV14-% rCV UV15-% rCV Change_UV15-% rCV Flag-UV15-% rCV Flag-Change_UV15-% rCV UV16-% rCV Change_UV16-% rCV Flag-UV16-% rCV Flag-Change_UV16-% rCV V1-% rCV Change_V1-% rCV Flag-V1-% rCV Flag-Change_V1-% rCV V2-% rCV Change_V2-% rCV Flag-V2-% rCV Flag-Change_V2-% rCV V3-% rCV Change_V3-% rCV Flag-V3-% rCV Flag-Change_V3-% rCV V4-% rCV Change_V4-% rCV Flag-V4-% rCV Flag-Change_V4-% rCV V5-% rCV Change_V5-% rCV Flag-V5-% rCV Flag-Change_V5-% rCV V6-% rCV Change_V6-% rCV Flag-V6-% rCV Flag-Change_V6-% rCV V7-% rCV Change_V7-% rCV Flag-V7-% rCV Flag-Change_V7-% rCV V8-% rCV Change_V8-% rCV Flag-V8-% rCV Flag-Change_V8-% rCV V9-% rCV Change_V9-% rCV Flag-V9-% rCV Flag-Change_V9-% rCV V10-% rCV Change_V10-% rCV Flag-V10-% rCV Flag-Change_V10-% rCV V11-% rCV Change_V11-% rCV Flag-V11-% rCV Flag-Change_V11-% rCV V12-% rCV Change_V12-% rCV Flag-V12-% rCV Flag-Change_V12-% rCV V13-% rCV Change_V13-% rCV Flag-V13-% rCV Flag-Change_V13-% rCV V14-% rCV Change_V14-% rCV Flag-V14-% rCV Flag-Change_V14-% rCV V15-% rCV Change_V15-% rCV Flag-V15-% rCV Flag-Change_V15-% rCV V16-% rCV Change_V16-% rCV Flag-V16-% rCV Flag-Change_V16-% rCV B1-% rCV Change_B1-% rCV Flag-B1-% rCV Flag-Change_B1-% rCV B2-% rCV Change_B2-% rCV Flag-B2-% rCV Flag-Change_B2-% rCV B3-% rCV Change_B3-% rCV Flag-B3-% rCV Flag-Change_B3-% rCV B4-% rCV Change_B4-% rCV Flag-B4-% rCV Flag-Change_B4-% rCV B5-% rCV Change_B5-% rCV Flag-B5-% rCV Flag-Change_B5-% rCV B6-% rCV Change_B6-% rCV Flag-B6-% rCV Flag-Change_B6-% rCV B7-% rCV Change_B7-% rCV Flag-B7-% rCV Flag-Change_B7-% rCV B8-% rCV Change_B8-% rCV Flag-B8-% rCV Flag-Change_B8-% rCV B9-% rCV Change_B9-% rCV Flag-B9-% rCV Flag-Change_B9-% rCV B10-% rCV Change_B10-% rCV Flag-B10-% rCV Flag-Change_B10-% rCV B11-% rCV Change_B11-% rCV Flag-B11-% rCV Flag-Change_B11-% rCV B12-% rCV Change_B12-% rCV Flag-B12-% rCV Flag-Change_B12-% rCV B13-% rCV Change_B13-% rCV Flag-B13-% rCV Flag-Change_B13-% rCV B14-% rCV Change_B14-% rCV Flag-B14-% rCV Flag-Change_B14-% rCV YG1-% rCV Change_YG1-% rCV Flag-YG1-% rCV Flag-Change_YG1-% rCV YG2-% rCV Change_YG2-% rCV Flag-YG2-% rCV Flag-Change_YG2-% rCV YG3-% rCV Change_YG3-% rCV Flag-YG3-% rCV Flag-Change_YG3-% rCV YG4-% rCV Change_YG4-% rCV Flag-YG4-% rCV Flag-Change_YG4-% rCV YG5-% rCV Change_YG5-% rCV Flag-YG5-% rCV Flag-Change_YG5-% rCV YG6-% rCV Change_YG6-% rCV Flag-YG6-% rCV Flag-Change_YG6-% rCV YG7-% rCV Change_YG7-% rCV Flag-YG7-% rCV Flag-Change_YG7-% rCV YG8-% rCV Change_YG8-% rCV Flag-YG8-% rCV Flag-Change_YG8-% rCV YG9-% rCV Change_YG9-% rCV Flag-YG9-% rCV Flag-Change_YG9-% rCV YG10-% rCV Change_YG10-% rCV Flag-YG10-% rCV Flag-Change_YG10-% rCV R1-% rCV Change_R1-% rCV Flag-R1-% rCV Flag-Change_R1-% rCV R2-% rCV Change_R2-% rCV Flag-R2-% rCV Flag-Change_R2-% rCV R3-% rCV Change_R3-% rCV Flag-R3-% rCV Flag-Change_R3-% rCV R4-% rCV Change_R4-% rCV Flag-R4-% rCV Flag-Change_R4-% rCV R5-% rCV Change_R5-% rCV Flag-R5-% rCV Flag-Change_R5-% rCV R6-% rCV Change_R6-% rCV Flag-R6-% rCV Flag-Change_R6-% rCV R7-% rCV Change_R7-% rCV Flag-R7-% rCV Flag-Change_R7-% rCV R8-% rCV Change_R8-% rCV Flag-R8-% rCV Flag-Change_R8-% rCV YellowGreen-Laser Delay Change_YellowGreen-Laser Delay Flag-YellowGreen-Laser Delay Flag-Change_YellowGreen-Laser Delay Violet-Laser Delay Change_Violet-Laser Delay Flag-Violet-Laser Delay Flag-Change_Violet-Laser Delay Red-Laser Delay Change_Red-Laser Delay Flag-Red-Laser Delay Flag-Change_Red-Laser Delay UV-Laser Delay Change_UV-Laser Delay Flag-UV-Laser Delay Flag-Change_UV-Laser Delay YellowGreen-Area Scaling Factor Change_YellowGreen-Area Scaling Factor Flag-YellowGreen-Area Scaling Factor Flag-Change_YellowGreen-Area Scaling Factor Violet-Area Scaling Factor Change_Violet-Area Scaling Factor Flag-Violet-Area Scaling Factor Flag-Change_Violet-Area Scaling Factor Blue-Area Scaling Factor Change_Blue-Area Scaling Factor Flag-Blue-Area Scaling Factor Flag-Change_Blue-Area Scaling Factor Red-Area Scaling Factor Change_Red-Area Scaling Factor Flag-Red-Area Scaling Factor Flag-Change_Red-Area Scaling Factor UV-Area Scaling Factor Change_UV-Area Scaling Factor Flag-UV-Area Scaling Factor Flag-Change_UV-Area Scaling Factor FSC Change_FSC Flag-FSC Flag-Change_FSC
2024-09-06 09:55:00 952 0 FALSE FALSE 175 0 FALSE FALSE 360 0 FALSE FALSE 1034 0 FALSE FALSE 262 0 FALSE FALSE 204 0 FALSE FALSE 151 0 FALSE FALSE 192 0 FALSE FALSE 231 0 FALSE FALSE 367 0 FALSE FALSE 294 0 FALSE FALSE 355 0 FALSE FALSE 235 0 FALSE FALSE 301 0 FALSE FALSE 281 0 FALSE FALSE 410 0 FALSE FALSE 675 0 FALSE FALSE 538 0 FALSE FALSE 676 0 FALSE FALSE 124 0 FALSE FALSE 235 0 FALSE FALSE 216 0 FALSE FALSE 143 0 FALSE FALSE 171 0 FALSE FALSE 179 0 FALSE FALSE 235 0 FALSE FALSE 298 0 FALSE FALSE 248 0 FALSE FALSE 287 0 FALSE FALSE 231 0 FALSE FALSE 181 0 FALSE FALSE 172 0 FALSE FALSE 239 0 FALSE FALSE 410 0 FALSE FALSE 276 0 FALSE FALSE 1055 0 FALSE FALSE 645 0 FALSE FALSE 594 0 FALSE FALSE 536 0 FALSE FALSE 392 0 FALSE FALSE 374 0 FALSE FALSE 789 0 FALSE FALSE 555 0 FALSE FALSE 765 0 FALSE FALSE 690 0 FALSE FALSE 473 0 FALSE FALSE 453 0 FALSE FALSE 658 0 FALSE FALSE 733 0 FALSE FALSE 381 0 FALSE FALSE 375 0 FALSE FALSE 242 0 FALSE FALSE 465 0 FALSE FALSE 365 0 FALSE FALSE 411 0 FALSE FALSE 291 0 FALSE FALSE 265 0 FALSE FALSE 358 0 FALSE FALSE 327 0 FALSE FALSE 213 0 FALSE FALSE 199 0 FALSE FALSE 281 0 FALSE FALSE 281 0 FALSE FALSE 229 0 FALSE FALSE 212 0 FALSE FALSE 357 0 FALSE FALSE 208 0 FALSE FALSE 1.1432090 0.1604039 FALSE FALSE 1.656716 0.170127 FALSE FALSE 3.391170 0.223100 FALSE FALSE 6.264603 -0.513898 FALSE FALSE 2.429039 -0.360430 FALSE FALSE 1.863501 -0.137120 FALSE FALSE 1.916417 -0.044862 FALSE FALSE 1.886120 -0.013588 FALSE FALSE 2.022500 -0.006108 FALSE FALSE 2.037093 0.025472 FALSE FALSE 1.997900 -0.022643 FALSE FALSE 1.908385 -0.122100 FALSE FALSE 2.030460 -0.133127 FALSE FALSE 1.977809 -0.229629 FALSE FALSE 1.986099 -0.344250 FALSE FALSE 2.038826 -0.334107 FALSE FALSE 2.067160 -0.489987 FALSE FALSE 2.334379 -0.511013 FALSE FALSE 2.715388 -0.658262 FALSE FALSE 2.129838 0.073439 FALSE FALSE 1.995929 0.064391 FALSE FALSE 1.946202 0.047981 FALSE FALSE 1.767177 0.033358 FALSE FALSE 1.689073 0.031671 FALSE FALSE 1.713192 0.028349 FALSE FALSE 1.596646 0.022683 FALSE FALSE 1.506381 -0.023042 FALSE FALSE 1.484919 0.005252 FALSE FALSE 1.554641 0.014283 FALSE FALSE 1.464889 -0.065008 FALSE FALSE 1.546612 -0.110618 FALSE FALSE 1.828770 -0.024444 FALSE FALSE 2.036353 -0.130219 FALSE FALSE 2.232001 -0.120310 FALSE FALSE 2.520183 -0.329349 FALSE FALSE 2.261960 0.096987 FALSE FALSE 2.048054 0.045434 FALSE FALSE 1.910570 0.073267 FALSE FALSE 1.908745 -0.002810 FALSE FALSE 1.945035 0.017430 FALSE FALSE 2.088102 0.057369 FALSE FALSE 1.905307 0.036652 FALSE FALSE 1.635550 0.003387 FALSE FALSE 1.495144 -0.023298 FALSE FALSE 1.341895 0.016929 FALSE FALSE 1.161039 0.022570 FALSE FALSE 0.9503762 -0.0466058 FALSE FALSE 1.245947 -0.086716 FALSE FALSE 1.722119 -0.298465 FALSE FALSE 1.720193 -0.379336 FALSE FALSE 1.755334 -0.338709 FALSE FALSE 1.767388 -0.312008 FALSE FALSE 1.542750 -0.262746 FALSE FALSE 1.430754 -0.227551 FALSE FALSE 1.466286 -0.162407 FALSE FALSE 1.245032 -0.010961 FALSE FALSE 0.9637733 -0.1695167 FALSE FALSE 1.244421 -0.126382 FALSE FALSE 1.991794 -0.128031 FALSE FALSE 2.455691 0.446813 FALSE FALSE 2.457680 0.539251 FALSE FALSE 2.258698 0.443007 FALSE FALSE 2.106153 0.583373 FALSE FALSE 2.386690 0.771068 FALSE FALSE 2.477646 0.639031 FALSE FALSE 2.586058 0.497536 FALSE FALSE 2.811563 0.236453 FALSE FALSE -40.500 -0.025 FALSE FALSE -21.075 -0.025 FALSE FALSE 18.325 -0.025 FALSE FALSE 39.05000 -0.20000 FALSE FALSE 1.117378 0.002052 FALSE FALSE 1.100811 -0.000512 FALSE FALSE 1.055206 0.005343 FALSE FALSE 1.124783 -0.006235 FALSE FALSE 1.153174 0.005560 FALSE FALSE 1.047562 -0.001598 FALSE FALSE
2024-09-05 09:47:00 952 0 FALSE FALSE 175 0 FALSE FALSE 360 -14 FALSE FALSE 1034 29 FALSE FALSE 262 1 FALSE FALSE 204 3 FALSE FALSE 151 1 FALSE FALSE 192 3 FALSE FALSE 231 3 FALSE FALSE 367 7 FALSE FALSE 294 7 FALSE FALSE 355 9 FALSE FALSE 235 5 FALSE FALSE 301 6 FALSE FALSE 281 8 FALSE FALSE 410 3 FALSE FALSE 675 -19 FALSE FALSE 538 -24 FALSE FALSE 676 -55 FALSE FALSE 124 0 FALSE FALSE 235 -1 FALSE FALSE 216 0 FALSE FALSE 143 0 FALSE FALSE 171 0 FALSE FALSE 179 -1 FALSE FALSE 235 0 FALSE FALSE 298 3 FALSE FALSE 248 1 FALSE FALSE 287 3 FALSE FALSE 231 1 FALSE FALSE 181 3 FALSE FALSE 172 -1 FALSE FALSE 239 -9 FALSE FALSE 410 -19 FALSE FALSE 276 -25 FALSE FALSE 1055 2 FALSE FALSE 645 12 FALSE FALSE 594 7 FALSE FALSE 536 6 FALSE FALSE 392 15 FALSE FALSE 374 8 FALSE FALSE 789 23 FALSE FALSE 555 13 FALSE FALSE 765 25 FALSE FALSE 690 20 FALSE FALSE 473 -7 FALSE FALSE 453 -13 FALSE FALSE 658 -25 FALSE FALSE 733 -55 FALSE FALSE 381 8 FALSE FALSE 375 10 FALSE FALSE 242 3 FALSE FALSE 465 3 FALSE FALSE 365 4 FALSE FALSE 411 2 FALSE FALSE 291 0 FALSE FALSE 265 -9 FALSE FALSE 358 -21 FALSE FALSE 327 -33 FALSE FALSE 213 2 FALSE FALSE 199 5 FALSE FALSE 281 7 FALSE FALSE 281 -1 FALSE FALSE 229 -7 FALSE FALSE 212 -10 FALSE FALSE 357 -22 FALSE FALSE 208 -20 FALSE FALSE 0.9828051 -0.1599799 FALSE FALSE 1.486589 -0.163627 FALSE FALSE 3.168070 -0.236384 FALSE FALSE 6.778501 0.529428 FALSE FALSE 2.789469 0.297605 FALSE FALSE 2.000621 0.138487 FALSE FALSE 1.961279 0.051810 FALSE FALSE 1.899708 0.038603 FALSE FALSE 2.028608 0.027936 FALSE FALSE 2.011621 0.025532 FALSE FALSE 2.020543 0.090278 FALSE FALSE 2.030485 0.141181 FALSE FALSE 2.163587 0.102092 FALSE FALSE 2.207438 0.153472 FALSE FALSE 2.330349 0.237572 FALSE FALSE 2.372933 0.260683 FALSE FALSE 2.557147 0.047954 FALSE FALSE 2.845392 -0.290955 FALSE FALSE 3.373650 -1.038958 FALSE FALSE 2.056399 -0.044490 FALSE FALSE 1.931538 -0.071407 FALSE FALSE 1.898221 -0.034587 FALSE FALSE 1.733819 -0.006752 FALSE FALSE 1.657402 0.000364 FALSE FALSE 1.684843 0.000876 FALSE FALSE 1.573963 -0.006193 FALSE FALSE 1.529423 0.000771 FALSE FALSE 1.479667 -0.052225 FALSE FALSE 1.540358 -0.042086 FALSE FALSE 1.529897 0.014443 FALSE FALSE 1.657230 -0.071484 FALSE FALSE 1.853214 -0.070932 FALSE FALSE 2.166572 -0.249744 FALSE FALSE 2.352311 -0.595957 FALSE FALSE 2.849532 -1.363168 FALSE FALSE 2.164973 -0.075156 FALSE FALSE 2.002620 -0.045622 FALSE FALSE 1.837303 -0.126871 FALSE FALSE 1.911555 -0.059373 FALSE FALSE 1.927605 -0.070879 FALSE FALSE 2.030733 -0.097199 FALSE FALSE 1.868655 -0.142899 FALSE FALSE 1.632163 -0.215146 FALSE FALSE 1.518442 -0.167588 FALSE FALSE 1.324966 -0.019216 FALSE FALSE 1.138469 -0.301961 FALSE FALSE 0.9969820 -0.7584640 FALSE FALSE 1.332663 -1.140267 FALSE FALSE 2.020584 -1.794699 FALSE FALSE 2.099529 0.208352 FALSE FALSE 2.094043 0.242795 FALSE FALSE 2.079396 0.244797 FALSE FALSE 1.805496 0.193155 FALSE FALSE 1.658305 0.128984 FALSE FALSE 1.628693 0.055026 FALSE FALSE 1.255993 0.048225 FALSE FALSE 1.1332900 -0.5415710 FALSE FALSE 1.370803 -1.046386 FALSE FALSE 2.119825 -1.886283 FALSE FALSE 2.008878 -0.690757 FALSE FALSE 1.918429 -0.951675 FALSE FALSE 1.815691 -0.898894 FALSE FALSE 1.522780 -0.513079 FALSE FALSE 1.615622 -0.620851 FALSE FALSE 1.838615 -0.802641 FALSE FALSE 2.088522 -1.103568 FALSE FALSE 2.575110 -1.603253 FALSE FALSE -40.475 -0.025 FALSE FALSE -21.050 -0.025 FALSE FALSE 18.350 0.025 FALSE FALSE 39.25000 0.09999 FALSE FALSE 1.115326 -0.002161 FALSE FALSE 1.101323 0.000960 FALSE FALSE 1.049863 -0.010873 FALSE FALSE 1.131018 0.009584 FALSE FALSE 1.147614 -0.011504 FALSE FALSE 1.049160 -0.000072 FALSE FALSE
2024-09-04 11:54:00 952 0 FALSE FALSE 175 0 FALSE FALSE 374 8 FALSE FALSE 1005 -10 FALSE FALSE 261 0 FALSE FALSE 201 -4 FALSE FALSE 150 1 FALSE FALSE 189 -2 FALSE FALSE 228 -2 FALSE FALSE 360 -5 FALSE FALSE 287 -4 FALSE FALSE 346 -10 FALSE FALSE 230 -7 FALSE FALSE 295 -7 FALSE FALSE 273 -5 FALSE FALSE 407 -2 FALSE FALSE 694 19 FALSE FALSE 562 24 FALSE FALSE 731 58 FALSE FALSE 124 -1 FALSE FALSE 236 1 FALSE FALSE 216 -1 FALSE FALSE 143 0 FALSE FALSE 171 0 FALSE FALSE 180 0 FALSE FALSE 235 -1 FALSE FALSE 295 -3 FALSE FALSE 247 -4 FALSE FALSE 284 -3 FALSE FALSE 230 -1 FALSE FALSE 178 -1 FALSE FALSE 173 1 FALSE FALSE 248 9 FALSE FALSE 429 19 FALSE FALSE 301 23 FALSE FALSE 1053 14 FALSE FALSE 633 4 FALSE FALSE 587 -3 FALSE FALSE 530 -3 FALSE FALSE 377 -10 FALSE FALSE 366 -6 FALSE FALSE 766 -9 FALSE FALSE 542 0 FALSE FALSE 740 0 FALSE FALSE 670 -5 FALSE FALSE 480 13 FALSE FALSE 466 19 FALSE FALSE 683 34 FALSE FALSE 788 62 FALSE FALSE 373 -12 FALSE FALSE 365 -19 FALSE FALSE 239 -7 FALSE FALSE 462 -13 FALSE FALSE 361 -10 FALSE FALSE 409 -8 FALSE FALSE 291 -1 FALSE FALSE 274 8 FALSE FALSE 379 18 FALSE FALSE 360 29 FALSE FALSE 211 1 FALSE FALSE 194 -4 FALSE FALSE 274 -3 FALSE FALSE 282 4 FALSE FALSE 236 11 FALSE FALSE 222 13 FALSE FALSE 379 27 FALSE FALSE 228 22 FALSE FALSE 1.1427850 0.0487100 FALSE FALSE 1.650216 0.143430 FALSE FALSE 3.404454 0.043730 FALSE FALSE 6.249073 -0.212999 FALSE FALSE 2.491864 -0.271252 FALSE FALSE 1.862134 -0.174965 FALSE FALSE 1.909469 -0.140963 FALSE FALSE 1.861105 -0.140227 FALSE FALSE 2.000672 -0.124592 FALSE FALSE 1.986089 -0.119207 FALSE FALSE 1.930265 -0.169643 FALSE FALSE 1.889304 -0.161127 FALSE FALSE 2.061495 -0.150170 FALSE FALSE 2.053966 -0.179439 FALSE FALSE 2.092777 -0.208998 FALSE FALSE 2.112250 -0.302658 FALSE FALSE 2.509193 0.043990 FALSE FALSE 3.136347 0.421327 FALSE FALSE 4.412608 1.392748 FALSE FALSE 2.100889 -0.031329 FALSE FALSE 2.002945 0.015403 FALSE FALSE 1.932808 -0.010340 FALSE FALSE 1.740571 -0.004628 FALSE FALSE 1.657038 0.014591 FALSE FALSE 1.683967 0.028405 FALSE FALSE 1.580156 0.016775 FALSE FALSE 1.528652 0.065034 FALSE FALSE 1.531892 0.111607 FALSE FALSE 1.582444 0.107528 FALSE FALSE 1.515454 0.110902 FALSE FALSE 1.728714 0.177445 FALSE FALSE 1.924146 0.019737 FALSE FALSE 2.416316 0.272027 FALSE FALSE 2.948268 0.645716 FALSE FALSE 4.212700 1.668821 FALSE FALSE 2.240129 0.037766 FALSE FALSE 2.048242 0.031552 FALSE FALSE 1.964174 0.123020 FALSE FALSE 1.970928 0.096847 FALSE FALSE 1.998484 0.095381 FALSE FALSE 2.127932 0.094822 FALSE FALSE 2.011554 0.155282 FALSE FALSE 1.847309 0.264410 FALSE FALSE 1.686030 0.276480 FALSE FALSE 1.344182 0.063288 FALSE FALSE 1.440430 0.332170 FALSE FALSE 1.7554460 0.8424590 FALSE FALSE 2.472930 1.277060 FALSE FALSE 3.815283 2.167264 FALSE FALSE 1.891177 0.226383 FALSE FALSE 1.851248 0.169403 FALSE FALSE 1.834599 0.136874 FALSE FALSE 1.612341 0.128610 FALSE FALSE 1.529321 0.187957 FALSE FALSE 1.573667 0.162193 FALSE FALSE 1.207768 -0.031139 FALSE FALSE 1.6748610 0.7158224 FALSE FALSE 2.417189 1.213709 FALSE FALSE 4.006108 2.063043 FALSE FALSE 2.699635 0.471269 FALSE FALSE 2.870104 0.710064 FALSE FALSE 2.714585 0.722913 FALSE FALSE 2.035859 0.203912 FALSE FALSE 2.236473 0.223781 FALSE FALSE 2.641256 0.511703 FALSE FALSE 3.192090 0.921915 FALSE FALSE 4.178363 1.683597 FALSE FALSE -40.450 -0.075 FALSE FALSE -21.025 0.000 FALSE FALSE 18.325 -0.025 FALSE FALSE 39.15001 -0.02499 FALSE FALSE 1.117487 0.000216 FALSE FALSE 1.100363 0.000502 FALSE FALSE 1.060736 0.000649 FALSE FALSE 1.121434 -0.001461 FALSE FALSE 1.159118 0.000965 FALSE FALSE 1.049232 -0.000280 FALSE FALSE

QC_Plots

Once we have our data, we can visualize it. This can be done with QC_Plots() for individual parameters of interest, or iterarting over the different columns to generate all the plots. Since there are a large number of parameters contained as individual columns, the argument “MeasurementType” will filter the columns for matching character values in the column names. These will be selected from the rest and their data used for the downstream plotting.

head(colnames(TidyData), 20)
#>  [1] "DateTime"        "FSC-Gain"        "Flag-FSC-Gain"   "SSC-Gain"       
#>  [5] "Flag-SSC-Gain"   "SSC-B-Gain"      "Flag-SSC-B-Gain" "UV1-Gain"       
#>  [9] "Flag-UV1-Gain"   "UV2-Gain"        "Flag-UV2-Gain"   "UV3-Gain"       
#> [13] "Flag-UV3-Gain"   "UV4-Gain"        "Flag-UV4-Gain"   "UV5-Gain"       
#> [17] "Flag-UV5-Gain"   "UV6-Gain"        "Flag-UV6-Gain"   "UV7-Gain"
StorageLocation <- file.path("C:", "Users", "JohnDoe", "Desktop")

AvailableBroadMeasurementTypes <- c("Gain", "rCV", "Laser Delay",
                                    "Area Scaling Factor")
SinglePlot <- "UV7-Gain"

TheSinglePlot <- QC_Plots(x = TidyData, MeasurementType = SinglePlot,
                          FailedFlag = TRUE, returntype="patchwork",
                          path=StorageLocation, filename="CytekAurora5L_QC")

TheSinglePlot
#> $`1`

TodaysExample <- c("Gain")

Plots <- QC_Plots(x = TidyData, MeasurementType = TodaysExample,
                  FailedFlag = TRUE, returntype="patchwork",
                  path=StorageLocation, filename="CytekAurora5L_QC")
Plots[1]
#> $`1`

Setting FailedFlag = TRUE will add a red box on the graph to showcase the date when a particular detector failed the automated QC check by exceeding the allowed variance set for the instrument.

As with most functions in Luciernaga, CytekQCPlots() uses Utility_Patchwork() for the .pdf generation. The layout arrangement can be edited by providing additional arguments to generate a desired layout for desired page size.

QC Retrieval

In the absence of QC reports from an instrument, we can use .fcs files acquired on the instrument over a desired period of time to retrieve the same information. This is thanks to a lot of this data being stored as description parameters within an .fcs file.

To do this, we will use .fcs files consisting of 3000 events acquired before the DailyQC as part of monitoring. We will first identify the files of interest, and load them into a GatingSet.

File_Location <- system.file("extdata", package = "Luciernaga")
FCS_Pattern <- ".fcs$"
FCS_Files <- list.files(path = File_Location, pattern = FCS_Pattern,
                        full.names = TRUE, recursive = FALSE)
QCBeads <- FCS_Files[grep("Before", FCS_Files)]
head(QCBeads)
#> [1] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/13_Before.fcs"
#> [2] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/14_Before.fcs"
#> [3] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/15_Before.fcs"
#> [4] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/20_Before.fcs"
#> [5] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/21_Before.fcs"
#> [6] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/22_Before.fcs"
MyCytoSet <- load_cytoset_from_fcs(QCBeads, truncate_max_range = FALSE,
                                   transform = FALSE)
MyGatingSet <- GatingSet(MyCytoSet)
MyGatingSet
#> A GatingSet with 7 samples

Having the files now loaded into a GatingSet, we can retrieve the information using QC_Retrieval function.

SingleSpecimen <- QC_Retrieval(x=MyGatingSet[[1]], sample.name="TUBENAME")

gt(SingleSpecimen)
SAMPLE DATE TIME CYT CYTSN OP UV1-A_Gain UV2-A_Gain UV3-A_Gain UV4-A_Gain UV5-A_Gain UV6-A_Gain UV7-A_Gain UV8-A_Gain UV9-A_Gain UV10-A_Gain UV11-A_Gain UV12-A_Gain UV13-A_Gain UV14-A_Gain UV15-A_Gain UV16-A_Gain SSC-H_Gain SSC-A_Gain V1-A_Gain V2-A_Gain V3-A_Gain V4-A_Gain V5-A_Gain V6-A_Gain V7-A_Gain V8-A_Gain V9-A_Gain V10-A_Gain V11-A_Gain V12-A_Gain V13-A_Gain V14-A_Gain V15-A_Gain V16-A_Gain FSC-H_Gain FSC-A_Gain SSC-B-H_Gain SSC-B-A_Gain B1-A_Gain B2-A_Gain B3-A_Gain B4-A_Gain B5-A_Gain B6-A_Gain B7-A_Gain B8-A_Gain B9-A_Gain B10-A_Gain B11-A_Gain B12-A_Gain B13-A_Gain B14-A_Gain YG1-A_Gain YG2-A_Gain YG3-A_Gain YG4-A_Gain YG5-A_Gain YG6-A_Gain YG7-A_Gain YG8-A_Gain YG9-A_Gain YG10-A_Gain R1-A_Gain R2-A_Gain R3-A_Gain R4-A_Gain R5-A_Gain R6-A_Gain R7-A_Gain R8-A_Gain YellowGreen_LaserDelay Violet_LaserDelay Blue_LaserDelay Red_LaserDelay UV_LaserDelay YellowGreen_AreaScalingFactor Violet_AreaScalingFactor Blue_AreaScalingFactor Red_AreaScalingFactor UV_AreaScalingFactor
13 Before 2024-08-13 8H 44M 54.74S Aurora U1368 Admin 1007 256 200 147 187 225 356 288 345 228 300 279 405 666 527 648 174 174 124 235 216 144 171 180 235 297 248 285 234 182 174 240 410 274 975 975 359 359 1049 635 593 537 384 369 796 557 754 688 472 452 650 718 381 366 236 473 368 420 293 263 354 321 226 208 294 288 231 211 353 204 -40.4 -20.975 0 18.3 38.925 1.12 1.1 1.05 1.13 1.15
AllSpecimens <- map(.x=MyGatingSet, .f=QC_Retrieval, sample.name="TUBENAME") %>%
  bind_rows()

gt(AllSpecimens)
SAMPLE DATE TIME CYT CYTSN OP UV1-A_Gain UV2-A_Gain UV3-A_Gain UV4-A_Gain UV5-A_Gain UV6-A_Gain UV7-A_Gain UV8-A_Gain UV9-A_Gain UV10-A_Gain UV11-A_Gain UV12-A_Gain UV13-A_Gain UV14-A_Gain UV15-A_Gain UV16-A_Gain SSC-H_Gain SSC-A_Gain V1-A_Gain V2-A_Gain V3-A_Gain V4-A_Gain V5-A_Gain V6-A_Gain V7-A_Gain V8-A_Gain V9-A_Gain V10-A_Gain V11-A_Gain V12-A_Gain V13-A_Gain V14-A_Gain V15-A_Gain V16-A_Gain FSC-H_Gain FSC-A_Gain SSC-B-H_Gain SSC-B-A_Gain B1-A_Gain B2-A_Gain B3-A_Gain B4-A_Gain B5-A_Gain B6-A_Gain B7-A_Gain B8-A_Gain B9-A_Gain B10-A_Gain B11-A_Gain B12-A_Gain B13-A_Gain B14-A_Gain YG1-A_Gain YG2-A_Gain YG3-A_Gain YG4-A_Gain YG5-A_Gain YG6-A_Gain YG7-A_Gain YG8-A_Gain YG9-A_Gain YG10-A_Gain R1-A_Gain R2-A_Gain R3-A_Gain R4-A_Gain R5-A_Gain R6-A_Gain R7-A_Gain R8-A_Gain YellowGreen_LaserDelay Violet_LaserDelay Blue_LaserDelay Red_LaserDelay UV_LaserDelay YellowGreen_AreaScalingFactor Violet_AreaScalingFactor Blue_AreaScalingFactor Red_AreaScalingFactor UV_AreaScalingFactor
13 Before 2024-08-13 8H 44M 54.74S Aurora U1368 Admin 1007 256 200 147 187 225 356 288 345 228 300 279 405 666 527 648 174 174 124 235 216 144 171 180 235 297 248 285 234 182 174 240 410 274 975 975 359 359 1049 635 593 537 384 369 796 557 754 688 472 452 650 718 381 366 236 473 368 420 293 263 354 321 226 208 294 288 231 211 353 204 -40.400 -20.975 0 18.300 38.925 1.12 1.1 1.05 1.13 1.15
14 Before 2024-08-14 10H 7M 1.7S Aurora U1368 Admin 1001 257 200 146 187 225 356 287 346 231 299 278 404 665 527 651 174 174 124 235 216 144 171 180 235 297 251 288 234 182 174 240 411 275 976 976 363 363 1047 635 593 539 388 373 796 555 756 686 471 452 651 720 385 376 242 474 369 420 293 264 357 324 218 204 286 282 228 210 351 203 -40.475 -21.025 0 18.300 39.050 1.12 1.1 1.05 1.13 1.16
15 Before 2024-08-15 10H 53M 57.27S Aurora U1368 Admin 979 253 198 143 184 222 351 280 339 227 295 272 399 661 529 663 174 174 124 235 217 143 171 180 235 298 250 286 233 182 174 242 415 282 977 977 238 238 1046 634 600 537 386 372 790 560 764 695 476 457 661 743 388 377 244 479 376 420 299 272 369 342 220 204 287 285 232 215 361 212 -40.400 -20.950 0 18.375 39.075 1.12 1.1 1.06 1.12 1.16
20 Before 2024-08-20 12H 50M 5.41S Aurora U1368 Admin 1000 256 201 147 187 226 358 286 349 231 295 274 402 660 528 658 174 174 124 236 217 143 171 180 236 296 251 285 231 180 172 239 409 276 977 977 240 240 1043 634 591 536 387 372 790 546 754 672 470 451 650 731 380 372 242 468 363 410 291 262 357 327 209 198 277 279 227 209 352 206 -40.475 -21.025 0 18.325 39.100 1.11 1.1 1.05 1.13 1.15
21 Before 2024-08-21 9H 37M 51.18S Aurora U1368 Admin 964 251 197 143 184 222 347 276 335 225 283 259 383 642 531 698 174 174 125 236 216 143 170 178 234 293 249 282 223 172 166 235 417 299 977 977 369 369 1042 622 583 520 381 362 755 529 707 651 455 442 662 784 384 378 244 463 355 399 285 264 371 360 193 181 254 258 218 207 363 222 -40.375 -21.000 0 18.300 39.050 1.12 1.1 1.06 1.12 1.16
22 Before 2024-08-22 8H 55M 15.81S Aurora U1368 Admin 969 249 196 144 184 221 349 281 339 227 293 273 398 652 518 640 175 175 124 234 216 143 171 180 236 297 247 284 235 182 174 239 407 273 977 977 361 361 1069 639 601 538 388 368 792 562 756 697 472 452 647 720 380 369 239 475 373 422 294 264 356 323 225 210 292 290 230 210 352 203 -40.425 -20.975 0 18.450 39.250 1.12 1.1 1.05 1.13 1.16
23 Before 2024-08-23 9H 18M 47.31S Aurora U1368 Admin 986 253 199 146 186 224 354 285 343 229 296 275 402 660 525 647 175 175 124 235 217 143 171 181 237 297 247 284 235 183 174 240 408 274 978 978 362 362 1067 639 599 537 387 366 791 563 754 696 472 451 646 719 378 367 238 473 372 421 293 264 355 322 225 209 293 289 230 211 352 203 -40.475 -21.000 0 18.350 39.100 1.12 1.1 1.05 1.13 1.15

Once we have generated these data outputs, we can now send them to QC_Plots for visualization of the instrument gain, laser delay and area scaling factors similar to as if we had retrieved the data from the Levy-Jennings Tracking .csv.

YellowExample <- c("YG")

Plots <- QC_Plots(x = AllSpecimens, MeasurementType = YellowExample,
                  FailedFlag = FALSE, returntype="patchwork",
                  path=StorageLocation, filename="CytekAurora5L_QC",
                  therows=3, thecolumns=1, width=7, height=9)

Plots[[1]]

QC_GainMonitoring

While QC_FilePrep() and QC_Retrieval() provide two ways of retrieving information about the individual detectors gains, they only tell part of the instrument story. Gains and Lasers are dynamically changed to maintain a stable MFI over time. One way that our cytometry core has set out to monitor this is acquiring 3000 QC beads immediately before and after running the daily QC, then extracting and visualizing the MFI values in combination with the gain parameters. These before/after .fcs files are processed by the QC_GainMonitoring() function.

QCBeads <- FCS_Files[grep("Before|After", FCS_Files)]
head(QCBeads)
#> [1] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/13_After.fcs" 
#> [2] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/13_Before.fcs"
#> [3] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/14_After.fcs" 
#> [4] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/14_Before.fcs"
#> [5] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/15_After.fcs" 
#> [6] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/15_Before.fcs"

BeforeAfter_CS <- load_cytoset_from_fcs(files=QCBeads, transform=FALSE, truncate_max_range = FALSE)

BeforeAfter <- map(.x=BeforeAfter_CS, .f=QC_GainMonitoring, sample.name = "TUBENAME", stats="median") %>% bind_rows()

gt(head(BeforeAfter, 4))
SAMPLE DATE TIME Timepoint CYT CYTSN OP UV1-A_Gain UV2-A_Gain UV3-A_Gain UV4-A_Gain UV5-A_Gain UV6-A_Gain UV7-A_Gain UV8-A_Gain UV9-A_Gain UV10-A_Gain UV11-A_Gain UV12-A_Gain UV13-A_Gain UV14-A_Gain UV15-A_Gain UV16-A_Gain SSC-H_Gain SSC-A_Gain V1-A_Gain V2-A_Gain V3-A_Gain V4-A_Gain V5-A_Gain V6-A_Gain V7-A_Gain V8-A_Gain V9-A_Gain V10-A_Gain V11-A_Gain V12-A_Gain V13-A_Gain V14-A_Gain V15-A_Gain V16-A_Gain FSC-H_Gain FSC-A_Gain SSC-B-H_Gain SSC-B-A_Gain B1-A_Gain B2-A_Gain B3-A_Gain B4-A_Gain B5-A_Gain B6-A_Gain B7-A_Gain B8-A_Gain B9-A_Gain B10-A_Gain B11-A_Gain B12-A_Gain B13-A_Gain B14-A_Gain YG1-A_Gain YG2-A_Gain YG3-A_Gain YG4-A_Gain YG5-A_Gain YG6-A_Gain YG7-A_Gain YG8-A_Gain YG9-A_Gain YG10-A_Gain R1-A_Gain R2-A_Gain R3-A_Gain R4-A_Gain R5-A_Gain R6-A_Gain R7-A_Gain R8-A_Gain YellowGreen_LaserDelay Violet_LaserDelay Blue_LaserDelay Red_LaserDelay UV_LaserDelay YellowGreen_AreaScalingFactor Violet_AreaScalingFactor Blue_AreaScalingFactor Red_AreaScalingFactor UV_AreaScalingFactor UV1-A UV2-A UV3-A UV4-A UV5-A UV6-A UV7-A UV8-A UV9-A UV10-A UV11-A UV12-A UV13-A UV14-A UV15-A UV16-A SSC-H SSC-A V1-A V2-A V3-A V4-A V5-A V6-A V7-A V8-A V9-A V10-A V11-A V12-A V13-A V14-A V15-A V16-A FSC-H FSC-A SSC-B-H SSC-B-A B1-A B2-A B3-A B4-A B5-A B6-A B7-A B8-A B9-A B10-A B11-A B12-A B13-A B14-A YG1-A YG2-A YG3-A YG4-A YG5-A YG6-A YG7-A YG8-A YG9-A YG10-A R1-A R2-A R3-A R4-A R5-A R6-A R7-A R8-A
13 After 2024-08-13 8H 48M 21.21S After Aurora U1368 Admin 1001 257 200 146 187 225 356 287 346 231 299 278 404 665 527 651 174 174 124 235 216 144 171 180 235 297 251 288 234 182 174 240 411 275 976 976 363 363 1047 635 593 539 388 373 796 555 756 686 471 452 651 720 385 376 242 474 369 420 293 264 357 324 218 204 286 282 228 210 351 203 -40.475 -21.025 0 18.300 39.050 1.12 1.1 1.05 1.13 1.16 117904.6 762445.3 661904.7 586761.6 634296.6 976572.1 1382279 842342.2 1321169 1545869 854973.1 437813.3 408506.5 1393654 1852736 2102292 1984859 1860744 445857.5 1022547 1164956 1190935 1120486 817163.0 943516.8 969111.9 1214867 2030828 1006398.5 489580.0 489075.8 1213638 1772899 1347475 1970879 1989145 1978225 1884179 143378.9 130824.3 272576.4 485604.8 686618.6 876702.0 619935.5 452341.9 386115.9 250190.9 350469.3 592305.8 637185.7 1030562.9 584627.6 1388661 2164008 1243471 871903.0 593033.9 713037.1 839604.6 1101498 951768.6 389142.4 526722.2 420617.4 358073.3 669359.1 958557.5 1331739 957759.2
13 Before 2024-08-13 8H 44M 54.74S Before Aurora U1368 Admin 1007 256 200 147 187 225 356 288 345 228 300 279 405 666 527 648 174 174 124 235 216 144 171 180 235 297 248 285 234 182 174 240 410 274 975 975 359 359 1049 635 593 537 384 369 796 557 754 688 472 452 650 718 381 366 236 473 368 420 293 263 354 321 226 208 294 288 231 211 353 204 -40.400 -20.975 0 18.300 38.925 1.12 1.1 1.05 1.13 1.15 112204.6 735725.3 652271.8 587895.8 638151.8 981050.1 1380002 849673.8 1320298 1539217 859490.5 436523.0 408846.3 1386419 1792307 2058909 1984907 1981675 466798.5 1078165 1226517 1205442 1128992 828394.5 954202.0 1013775.3 1210774 2093218 1012397.7 504710.5 500134.1 1247245 1817983 1368498 1968714 1991604 1986582 1978010 142483.9 130807.2 271396.0 483473.4 679594.0 863634.8 623386.2 463262.8 385468.5 249644.7 340693.8 578856.6 614784.8 996369.5 589754.6 1343417 2090647 1241923 871435.4 585505.1 691881.6 812174.9 1051217 913776.2 402288.4 536626.8 428714.6 362460.0 662592.4 949234.7 1301267 939539.1
14 After 2024-08-14 10H 10M 31.84S After Aurora U1368 Admin 979 253 198 143 184 222 351 280 339 227 295 272 399 661 529 663 174 174 124 235 217 143 171 180 235 298 250 286 233 182 174 242 415 282 977 977 238 238 1046 634 600 537 386 372 790 560 764 695 476 457 661 743 388 377 244 479 376 420 299 272 369 342 220 204 287 285 232 215 361 212 -40.400 -20.950 0 18.375 39.075 1.12 1.1 1.06 1.12 1.16 115612.5 755833.6 657551.8 580374.8 625504.6 970113.2 1369624 827943.8 1305119 1517024 840955.1 426343.6 403352.2 1389917 1863255 2150147 1982400 1857755 447282.3 1025331 1180004 1184709 1122221 818680.5 944839.4 967105.1 1198763 2005086 991654.4 486143.0 486754.7 1221019 1788007 1389493 1970336 1990095 1995577 1915996 144162.2 131639.4 278397.8 487093.6 681547.3 868017.3 620416.5 459887.5 394848.6 255590.6 354839.2 603233.5 648428.4 1070436.4 572638.0 1361581 2119910 1209174 874900.7 579265.7 710038.9 846634.2 1115488 986448.6 382909.6 514088.1 411015.1 350039.6 669685.8 967028.5 1353727 993218.7
14 Before 2024-08-14 10H 7M 1.7S Before Aurora U1368 Admin 1001 257 200 146 187 225 356 287 346 231 299 278 404 665 527 651 174 174 124 235 216 144 171 180 235 297 251 288 234 182 174 240 411 275 976 976 363 363 1047 635 593 539 388 373 796 555 756 686 471 452 651 720 385 376 242 474 369 420 293 264 357 324 218 204 286 282 228 210 351 203 -40.475 -21.025 0 18.300 39.050 1.12 1.1 1.05 1.13 1.16 113293.1 747641.2 663131.9 594633.8 650139.9 998866.3 1405886 858603.1 1354592 1611097 866457.7 445029.3 412665.3 1381891 1786468 2028115 1986073 1985836 465074.8 1074143 1224534 1202835 1127028 827767.6 954683.2 1020587.2 1246120 2156764 1013065.4 505094.7 497750.6 1230448 1783860 1322181 1973694 1994224 3130029 3126592 143127.2 131474.6 273186.8 487212.2 702470.8 890981.0 624867.0 458311.4 386742.5 249454.1 338474.7 572389.6 602888.3 970089.7 604001.5 1438799 2207057 1250088 870417.6 581339.7 682257.1 798407.7 1028559 878039.5 372609.1 523663.0 412355.6 350646.0 641142.5 919490.8 1248841 889689.6

The setup for these plots requires a couple additional arguments. The first Metadata designates the column name under which the comparison categories are stored (in this case, Timepoint column, with Before and After designations). The second is we change plotType from the default “individual” to the “comparison” category.

MFIExample <- c("R1")

Plots <- QC_Plots(x = BeforeAfter, MeasurementType = MFIExample,
                  Metadata = "Timepoint", plotType = "comparison",
                  FailedFlag = FALSE, returntype="patchwork",
                  path=StorageLocation, filename="CytekAurora5L_QC")
Plots[[1]]

As we can see from the example, looking at the MFI we can see that after daily QC, the recorded MFI across bead samples is being recorded is similar across time, thanks in part to the changes in the individual gain depicted above.

Library Reference Controls

For Cytek instruments that use SpectroFlo, you are able to store unmixing controls in the library for re-use across future experiments. These can be exported out as .XML files, and re-imported to other instruments. Unfortunately, after original acquisition, there is no good way to visualize what the signature of the stored library control is. Whether the library reference control is accurate, contaminated with autofluorescence, or somewhere in between, we are left to parse out from effect on full-stained samples after unmixing. The following functions are designed to extract the signature information from the .XML files to allow for visualization of the underlying normalized signatures. These additionally can be plotted vs. reference signatures to compare how closely they match.

For an individual user, we would first load the required libraries, and then provide the location where the exported .XML files are stored. An example is provided below.

FolderLocation <- file.path("C:", "Users", "JohnDoe", "Desktop",
                            "LibraryControls5L")
StorageLocation <- file.path(FolderLocation, "Visualized")

In our example today, we will be accessing the .XML files stored within the Luciernaga packages extdata folder.

Folder_Location <- system.file("extdata", package = "Luciernaga")
XML_Pattern <- ".XML$"
XML_Files <- list.files(path = Folder_Location, pattern = XML_Pattern,
                        full.names = TRUE, recursive = FALSE)
XML_Files
#> [1] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/7-AAD(Cells)-BISCC24.XML"       
#> [2] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/APC-Cy7(Cells)-BISCC24.XML"     
#> [3] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/BV510(Beads)-BISCC24.XML"       
#> [4] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/BV750(Beads)-BISCC24.XML"       
#> [5] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/BV750(Cells)-BISCC24.XML"       
#> [6] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/FITC(Beads)-BISCC24.XML"        
#> [7] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/PE-Fire700(Beads)-BISCC24.XML"  
#> [8] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/PE-Fire700(Cells)-BISCC24.XML"  
#> [9] "C:/Users/12692/AppData/Local/R/win-library/4.4/Luciernaga/extdata/SparkBlue550(Beads)-BISCC24.XML"

QC_LibraryParse

QC_LibraryParse() is the function that will convert the .XML files into “tidy” data, as either plots or a dataframe. This can either be done individually, or in combination with map() for all the files.

By setting the returntype to “plots”, we can return each file as a ggplot object. In combination with Utility_Patchwork() we can generate a .pdf file or an assembled patchwork plot to our desired dimensions.

SinglePlot <- QC_LibraryParse(XML_Files[2], returntype="plots", references=FALSE)

ThePlots <- map(.x=XML_Files, .f=QC_LibraryParse, returntype="plots",
                references=FALSE)

AssembledPlot <- Utility_Patchwork(x=ThePlots, filename="LibraryControls5L",
                  outfolder=NULL, returntype="patchwork", thecolumns=3,
                  therows = 3, width = 7, height = 9)

AssembledPlot[1]
#> $`1`

The Library Reference Controls featured above where acquired during a training workshop. As you may notice, some library reference controls appear normal, while others have some quality control issues. Profiling the reference controls acquired on our institutions instruments, we noticed that the location the detector gate is placed on the brightness detector plot ties in to whether the y-axis and peak max-value is at 1. When this is misplaced, the stored reference control has a peak greater than 1.

By setting the argument “references=TRUE”, we can append the reference signatures in red to our existing library controls.

ThePlots <- map(.x=XML_Files, .f=QC_LibraryParse, returntype="plots",
                references=TRUE)

AssembledPlot <- Utility_Patchwork(x=ThePlots, filename="LibraryControls5L",
                  outfolder=NULL, returntype="patchwork", thecolumns=3,
                  therows = 3, width = 7, height = 9)

AssembledPlot[1]
#> $`1`

We have attempted to provide coverage for most fluorophores on all Cytek Aurora and Northern Light Instruments. Some fluorophores not present in the internal .csv, a mismatch in the instrument specific fluorophore name can lead to the absence of a reference signature being appended to the individual plot. You can investigate which of these is the case using the QC_ReferenceLibrary() function.

QC_ReferenceLibrary(FluorNameContains = "FITC", NumberDetectors=64)
#>       Fluorophore
#> 1            FITC
#> 2 Vio Bright FITC

Alternatively for QC_LibraryParse, we can set the returntype to “dataframe” and return in a “tidy” format.

LibraryData_Single <- QC_LibraryParse(XML_Files[2], returntype="dataframe", references=FALSE)

LibraryData <- map(.x=XML_Files, .f=QC_LibraryParse, returntype="dataframe", references=FALSE) %>% bind_rows()
gt(head(LibraryData, 4))
Fluorochrome Sample Creator Date 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
7-AAD BISCC_Aurora 4 BISCC24 2024-04-22 0.000000e+00 0.0000000000 0.0000000000 0.0000000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 3.357841e-03 0.0200933330 0.0269295648 0.0351323448 0.031176023 0.02734881 0.02701301 0.0008614465 2.197239e-05 0.0003561859 0.0002874869 0.0000000000 0.0000000000 0.0000000000 0.0071704444 0.0384922177 0.2119562000 0.9707101000 1.1845543400 1.65461421 1.7723749 2.1561450 2.535599 0.000000e+00 0.000000e+00 0.000000e+00 0.0130858915 4.635381e-02 1.709323e-01 1.000000e+00 1.187494e+00 1.5193587500 1.976335880 2.2245504900 2.30240600 2.551642660 2.94315457 2.104682e-02 1.389085e-02 1.771384e-02 0.024102336 2.454833e-02 0.0234715976 0.03078522 4.115970e-02
APC-Cy7 BISCC_CD19_Aurora 4 BISCC24 2024-04-22 0.000000e+00 0.0000000000 0.0000000000 0.0000000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0001239171 0.0001191841 0.0001597688 0.005176608 0.03450280 0.03727421 0.0000000000 0.000000e+00 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0045011616 0.0009675164 0.00678298 0.1113393 0.9478439 1.296947 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000 0.000000e+00 0.000000e+00 4.444736e-04 4.964399e-04 0.0002054263 0.000000000 0.0008714843 0.02904116 0.087956876 0.09239815 7.936542e-03 3.202018e-03 2.718762e-03 0.004644698 3.135787e-02 0.2705970000 1.00000000 1.278071e+00
BV510 BISCC_CD5_Day 2 BISCC24 2024-04-23 2.579751e-02 0.0003314757 0.0001892647 0.0040828455 1.739238e-02 5.436631e-02 1.877477e-01 3.018546e-01 2.225809e-01 7.746916e-02 0.0569705330 0.0550897121 0.0565819144 0.041321658 0.03384400 0.02612195 0.0028797654 1.728448e-02 0.0767551700 0.1833572090 0.5149905680 0.7400627000 1.0000000000 1.1565735300 1.0466210000 1.0731535000 0.8709386590 0.7513141630 0.83628800 0.7499129 0.8432913 0.886213 1.359256e-02 1.316562e-02 5.320899e-03 0.0019610294 1.647135e-03 1.483940e-03 9.997307e-04 1.617119e-03 0.0017682174 0.000943677 0.0013562749 0.00000000 0.004724612 0.00000000 0.000000e+00 0.000000e+00 3.441415e-05 0.000216865 8.330735e-05 0.0002015475 0.00000000 2.408894e-05
BV750 BISCC_CD4_Day 2 BISCC24 2024-04-23 1.833979e-05 0.0000000000 0.0001768138 0.0001059261 9.296519e-05 4.824572e-05 2.452453e-05 2.213248e-05 2.117732e-05 8.294084e-06 0.0000106847 0.0001562465 0.0044613980 0.024650610 0.02805302 0.01853093 0.0059054834 2.287031e-03 0.0018268854 0.0006855681 0.0003058358 0.0002672605 0.0002272015 0.0002505331 0.0002086246 0.0002300744 0.0003114131 0.0047987495 0.14692925 1.0000000 1.4655287 1.379369 3.193051e-05 6.657506e-05 4.044967e-05 0.0000229305 1.932283e-05 1.919852e-05 1.346646e-05 4.830633e-05 0.0002198810 0.002983311 0.0247765724 0.05669076 0.050219400 0.05182420 2.189264e-06 1.145108e-05 8.538878e-05 0.001145449 8.734865e-03 0.0167495348 0.01845885 2.085280e-02

The data from the extracted signatures can then be saved as a .csv file for future reference.

StorageLocation <- file.path("C:", "Users", "JohnDoe", "Desktop",
                             "LibraryControls5L")
FileName <- "ReferenceData.csv"
StorageName <- file.path(StorageLocation, FileName)
# write.csv(TheData, file=StorageName, row.names=FALSE)

Please be aware, if the .XML library controls imported originated from different instruments (consequently different laser and detector configurations), the map() followed with bind_rows() can occasionally fail to produce the desired output. A workaround is to take the map() outputted rows, sort them based on number of columns, and then bind them into their own data.frames on the basis of shared instruments laser and detector configurations. An example of how we did this is provided below and can be adapted for your individual situation.

#Setting up example
LibraryData <- map(.x=XML_Files, .f=QC_LibraryParse, returntype="dataframe", references=FALSE)

LibraryData[[3]] <- LibraryData[[3]][, -ncol(LibraryData[[3]])]

ncol(LibraryData[[3]]) == ncol(LibraryData[[1]])
#> [1] FALSE
FirstItem <- ncol(LibraryData[[1]])

MisbehavingRows <- which(sapply(LibraryData, function(x) ncol(x) != FirstItem))

if(length(MisbehavingRows) != 0) {
  TheData_filtered <- LibraryData[-MisbehavingRows]
} else {TheData_filtered <- LibraryData}

TheData <- bind_rows(TheData_filtered)

#write.csv(TheData, file=StorageName, row.names=FALSE)

QC_UserLibraries

When working with XML files for multiple users, the assembled dataframe output of QC_LibraryParse() can be passed to the QC_UserLibraries function, that will filter the individual library controls by user, and send them off to Utility_Patchwork() to create a .pdf output to the desired specifications. This can be useful tool for core staff to quickly generate outputs for each instrument user, that can then be sent to them to decide if they need to change any of their existing library reference controls. The saveCSV = TRUE argument would additionally return a .csv of the corresponding dataframe.

TemporaryLocation <- file.path(tempdir(), "LuciernagaTemporaryExamples")
if (!dir.exists(TemporaryLocation)) {dir.create(TemporaryLocation)}

TheIndividuals <- TheData %>% pull(Creator) %>% unique()
TheIndividuals
#> [1] "BISCC24"

IndividualUser <- QC_UserLibraries(x=TheIndividuals[[1]], Data=TheData,
                                   NameAppend="_LibraryQC", outpath=TemporaryLocation,
                                   references = TRUE, thecolumns = 3, therows=4,
                                   width=7, height=9, saveCSV=FALSE)
#> $`1`

AllUsers <- map(.x=TheIndividuals[1:2], .f=QC_UserLibraries, Data=TheData,
                 NameAppend="_LibraryQC", outpath=TemporaryLocation,references = TRUE,
                 thecolumns = 3, therows=4, width=7, height=9, saveCSV=FALSE)
#> $`1`
#> 
#> named list()

ThePDF <- list.files(TemporaryLocation, pattern="_LibraryQC.pdf")
ThePDF
#> [1] "__LibraryQC.pdf"        "BISCC24__LibraryQC.pdf"

Comparing Normalized Signatures

We previously highlighted the ability within QC_LibraryParse to set reference=TRUE and compare our acquired library signatures to that of a reference signature. The following functions provide additionally functionality, extending this to signatures derrived from additional sources (including those derrived from .fcs files, covered extensively in Vignette 04_Fluorescent Signatures).

Let’s for now continue by using a signature derrived from the Library controls highlighted above:

LibraryData_Single <- QC_LibraryParse(XML_Files[2], returntype="dataframe", references=FALSE)
gt(LibraryData_Single)
Fluorochrome Sample Creator Date 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
APC-Cy7 BISCC_CD19_Aurora 4 BISCC24 2024-04-22 0 0 0 0 0 0 0 0 0 0 0.0001239171 0.0001191841 0.0001597688 0.005176608 0.0345028 0.03727421 0 0 0 0 0 0 0 0 0 0 0.004501162 0.0009675164 0.00678298 0.1113393 0.9478439 1.296947 0 0 0 0 0 0 0.0004444736 0.0004964399 0.0002054263 0 0.0008714843 0.02904116 0.08795688 0.09239815 0.007936542 0.003202018 0.002718762 0.004644698 0.03135787 0.270597 1 1.278071

As it currently exist, there are a few additional columns that are not required for the following functions, which we will remove.

Data <- LibraryData_Single %>% select(-Sample, -Creator, -Date) %>% rename(Sample=Fluorochrome)
gt(Data)
Sample 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
APC-Cy7 0 0 0 0 0 0 0 0 0 0 0.0001239171 0.0001191841 0.0001597688 0.005176608 0.0345028 0.03727421 0 0 0 0 0 0 0 0 0 0 0.004501162 0.0009675164 0.00678298 0.1113393 0.9478439 1.296947 0 0 0 0 0 0 0.0004444736 0.0004964399 0.0002054263 0 0.0008714843 0.02904116 0.08795688 0.09239815 0.007936542 0.003202018 0.002718762 0.004644698 0.03135787 0.270597 1 1.278071

QC_WhatsThis

The QC_WhatsThis() functions takes the above output, and will search the reference data for fluorophores with the closest resembling signature

TheFluorophore <- Data %>% pull(Sample)

Results <- QC_WhatsThis(x=TheFluorophore, data=Data, NumberHits = 10, returnPlots=TRUE)
#> Normalizing Data for Signature Comparison

Results[[1]]
#>                  Fluorophore ID_APC-Cy7
#> 1            Alexa Fluor 790       0.97
#> 2                      CF770       0.89
#> 3                DyLight 800       0.88
#> 4  Fixable Viability Dye 780       0.81
#> 5          Ghost Dye Red 780       0.81
#> 6                 eFluor 780       0.79
#> 7              LIVE DEAD NIR       0.79
#> 8               APC-Fire 810       0.78
#> 9                cFluor R780       0.78
#> 10               cFluor R840       0.78

Setting returnPlots = TRUE, will additionally provide the plotted signatures. In combination with ggplotly(), this can be quite useful.

plotly::ggplotly(Results[[2]])

As we can see, the acquired library signature differs from the reference signature.

QC_SimilarFluorophores

Additionally, we don’t even need to provide a signature to compare to, if the fluorophore is present within the reference dataset, we can compare it to the other fluorophores present and similarly visualize it using the QC_SimilarFluorophores() option.

Results <- QC_SimilarFluorophores(TheFluorophore="Spark Blue 550", NumberDetectors=64, NumberHits = 10, returnPlots=TRUE)

Results[[1]]
#>           Fluorophore Spark Blue 550
#> 1               CF514           1.00
#> 2         cFluor B548           1.00
#> 3               RB545           0.96
#> 4                 YFP           0.94
#> 5         NucView 488           0.91
#> 6     Alexa Fluor 532           0.90
#> 7               CF532           0.89
#> 8  NovaFluor Blue 555           0.89
#> 9          eFluor 520           0.88
#> 10               EYFP           0.87
plotly::ggplotly(Results[[2]])

QC_ReferenceLibrary

If there is a mismatch in how the fluorophore is named within the reference data (or is absent), using the QC_ReferenceLibrary() function would be useful in correcting the inputed name for QC_SimilarFluorophores() for the output listed above.

QC_ReferenceLibrary(FluorNameContains = "Spark", NumberDetectors=64)
#>          Fluorophore
#> 1     Spark Blue 515
#> 2     Spark Blue 550
#> 3     Spark Blue 574
#> 4      Spark NIR 685
#> 5  Spark PLUS UV 395
#> 6      Spark Red 718
#> 7       Spark UV 387
#> 8   Spark Violet 423
#> 9   Spark Violet 500
#> 10  Spark Violet 538
#> 11      Spark YG 570
#> 12      Spark YG 581
#> 13      Spark YG 593

QC_ProspectiveFluorophores

And finally, we have an experimental function QC_ProspectiveFluorophores() that will leverage information about an existing panel (and the peak detectors its fluorophore currently occupy) and contrast that to the reference library fluorophores to find candidate fluorophores that might potentially fit in the gaps.

OutPath <- file.path("C:", "Users", "JohnDoe", "Desktop")

Folder_Location <- system.file("extdata", package = "Luciernaga")
ThePanelLocation <- list.files(Folder_Location, pattern="^Panel.csv", full.names=TRUE)
ThePanel <- read.csv(ThePanelLocation, check.names=FALSE) %>% select(Fluorophore)

The arguments to provide to the function are a filepath to the panel.csv, NumberDetectors that your instrument has (64 for a 5L Aurora). TheCutoff corresponds to the cosine value when two fluorophores are compared to each other, I set the cutoff at 0.9 similarity. Rank Value comes from base R’s kappa() how error introduced will spill over factoring across all fluorophore references in the matrix. Rough estimate for relative complexity in our case.

ProspectiveAdditions <- QC_ProspectiveAdditions(path=ThePanelLocation, NumberDetectors=64,
                                                TheCutoff=0.9, returnAll=FALSE, returnCSV=FALSE,
                                                filename="ProspectiveAdditions", outpath=OutPath)
gt(ProspectiveAdditions)
Fluorophore TheDetector HighOverlaps RankValue
PerCP-eFluor 710 42 1 182.58
PerCP 40 1 203.19
StarBright Y720 53 1 208.46
CellVue Claret Far Red 59 1 223.8
BB660 39 1 224.02
Spark Blue 515 33 1 236.71
Vio Bright V423 18 1 238.45
CellTrace BODIPY 49 1 244.59
NovaFluor Yellow 690 52 1 244.67
PE-Fire 640 50 1 247.53
Zombie UV 6 1 249.14
VioBlue 19 1 250.12
Spark UV 387 1 1 255.73
BB755 44 1 255.84
Qdot 585 24 1 260.27
SYTOX Blue 20 1 260.9
Alexa Fluor 790 64 1 260.9
CF583 48 1 262.17
PE-Fire 744 54 1 262.49
PerCP-Fire 806 46 1 263.31
ViaKrome 808 61 1 263.46
NovaFluor Yellow 755 55 1 263.76
PE-Fire 810 56 1 269.24
NovaFluor Blue 760 45 1 270.41
BB630 38 1 283.69
Sapphire 22 1 319.11
Spark Blue 574 36 1 421.65
NovaFluor Blue 585 37 1 431.67

The results indicate potential fluorophores for Detectors not currently occupied by our panel, with cosine overlaps of less than TheCutoff (0.9). The RankValue is for the existing panel plus the given fluorophore. For panel design/exploratory purposes in our own lab, we would search for the Fluorophore name using QC_SimilarFluorophores() and identify other similar fluorophores by other commercial vendors to further investigate.

For example from the above list:

Results <- QC_SimilarFluorophores(TheFluorophore="PE-Fire 744", NumberDetectors=64, NumberHits = 10, returnPlots=TRUE)
plotly::ggplotly(Results[[2]])

Concluding Thoughts

We hope that this vignette walkthrough was of interest, and that you can think of ways to implement it within your own workflow. If you have thought on how to improve things, please reach out! This was a particular fun section of the package to work on and I would love to continue to improve on the existing functions in the future.

#> R version 4.4.1 (2024-06-14 ucrt)
#> Platform: x86_64-w64-mingw32/x64
#> Running under: Windows 11 x64 (build 22631)
#> 
#> Matrix products: default
#> 
#> 
#> locale:
#> [1] LC_COLLATE=English_United States.utf8 
#> [2] LC_CTYPE=English_United States.utf8   
#> [3] LC_MONETARY=English_United States.utf8
#> [4] LC_NUMERIC=C                          
#> [5] LC_TIME=English_United States.utf8    
#> 
#> time zone: America/New_York
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#>  [1] tidyr_1.3.1          xml2_1.3.6           htmltools_0.5.8.1   
#>  [4] plotly_4.10.4        gt_0.11.1            stringr_1.5.1       
#>  [7] purrr_1.0.2          dplyr_1.1.4          data.table_1.16.2   
#> [10] ggcyto_1.32.0        ncdfFlow_2.50.0      BH_1.84.0-0         
#> [13] ggplot2_3.5.1        openCyto_2.16.1      flowWorkspace_4.16.0
#> [16] flowCore_2.16.0      Luciernaga_0.99.1    BiocStyle_2.32.1    
#> 
#> loaded via a namespace (and not attached):
#>  [1] RBGL_1.80.0           gridExtra_2.3         rlang_1.1.4          
#>  [4] magrittr_2.0.3        matrixStats_1.4.1     ggridges_0.5.6       
#>  [7] compiler_4.4.1        dir.expiry_1.12.0     png_0.1-8            
#> [10] systemfonts_1.1.0     vctrs_0.6.5           reshape2_1.4.4       
#> [13] pkgconfig_2.0.3       fastmap_1.2.0         labeling_0.4.3       
#> [16] utf8_1.2.4            rmarkdown_2.28        graph_1.82.0         
#> [19] ragg_1.3.3            xfun_0.48             zlibbioc_1.50.0      
#> [22] cachem_1.1.0          jsonlite_1.8.9        highr_0.11           
#> [25] SnowballC_0.7.1       parallel_4.4.1        R6_2.5.1             
#> [28] bslib_0.8.0           stringi_1.8.4         RColorBrewer_1.1-3   
#> [31] reticulate_1.39.0     lubridate_1.9.3       jquerylib_0.1.4      
#> [34] figpatch_0.2          Rcpp_1.0.13           bookdown_0.41        
#> [37] knitr_1.48            zoo_1.8-12            Matrix_1.7-0         
#> [40] timechange_0.3.0      tidyselect_1.2.1      rstudioapi_0.17.0    
#> [43] yaml_2.3.10           viridis_0.6.5         lattice_0.22-6       
#> [46] tibble_3.2.1          plyr_1.8.9            Biobase_2.64.0       
#> [49] basilisk.utils_1.16.0 withr_3.0.1           evaluate_1.0.1       
#> [52] Rtsne_0.17            desc_1.4.3            pillar_1.9.0         
#> [55] lsa_0.73.3            BiocManager_1.30.25   filelock_1.0.3       
#> [58] stats4_4.4.1          generics_0.1.3        S4Vectors_0.42.1     
#> [61] munsell_0.5.1         scales_1.3.0          glue_1.8.0           
#> [64] lazyeval_0.2.2        tools_4.4.1           hexbin_1.28.4        
#> [67] fs_1.6.4              XML_3.99-0.17         grid_4.4.1           
#> [70] flowClust_3.42.0      RProtoBufLib_2.16.0   crosstalk_1.2.1      
#> [73] colorspace_2.1-1      patchwork_1.3.0       basilisk_1.16.0      
#> [76] cli_3.6.3             textshaping_0.4.0     fansi_1.0.6          
#> [79] cytolib_2.16.0        viridisLite_0.4.2     uwot_0.2.2           
#> [82] Rgraphviz_2.48.0      gtable_0.3.5          sass_0.4.9           
#> [85] digest_0.6.37         BiocGenerics_0.50.0   htmlwidgets_1.6.4    
#> [88] farver_2.1.2          pkgdown_2.1.1         lifecycle_1.0.4      
#> [91] httr_1.4.7