Running ‘testthat.R’ [119s/193s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(NACHO)
  > 
  > # setwd("tests")
  > 
  > rcc_files_directory <- "testthat/plexset_data"
  > plexset_files <- list.files(rcc_files_directory, full.names = TRUE, pattern = "\\.RCC")
  > plexset_tidy <- data.frame(stringsAsFactors = FALSE,
  +   name = basename(plexset_files),
  +   datapath = plexset_files,
  +   IDFILE = basename(plexset_files),
  +   plexset_id = rep(paste0("S", seq_len(8)), each = length(plexset_files))
  + )
  > plexset_nacho <- load_rcc(
  +   data_directory = rcc_files_directory,
  +   ssheet_csv = plexset_tidy,
  +   id_colname = "IDFILE"
  + )
  [NACHO] Importing RCC files.
  
  [NACHO] Performing QC and formatting data.
  [NACHO] "housekeeping_norm" has been set to FALSE.
    Note:
    - No default housekeeping genes available in your data;
    - "housekeeping_genes" is NULL;
    - "housekeeping_predict" is FALSE.
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Normalising data using "GEO" method without housekeeping genes.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  > 
  > rcc_files_directory <- "testthat/salmon_data"
  > salmon_files <- list.files(rcc_files_directory, full.names = TRUE, pattern = "\\.RCC")
  > salmon_tidy <- data.frame(stringsAsFactors = FALSE,
  +   name = basename(salmon_files),
  +   datapath = salmon_files,
  +   IDFILE = basename(salmon_files),
  +   plexset_id = rep(paste0("S", seq_len(8)), each = length(salmon_files))
  + )
  > salmon_nacho <- load_rcc(
  +   data_directory = rcc_files_directory,
  +   ssheet_csv = salmon_tidy,
  +   id_colname = "IDFILE"
  + )
  [NACHO] Importing RCC files.
  
  [NACHO] Performing QC and formatting data.
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Normalising data using "GEO" method with housekeeping genes.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  > 
  > rcc_files_directory <- "testthat"
  > plexset_salmon_tidy <- data.frame(stringsAsFactors = FALSE,
  +   name = list.files(rcc_files_directory, pattern = "\\.RCC", recursive = TRUE),
  +   datapath = list.files(rcc_files_directory, full.names = TRUE, pattern = "\\.RCC", recursive = TRUE),
  +   IDFILE = basename(list.files(rcc_files_directory, full.names = TRUE, pattern = "\\.RCC", recursive = TRUE)),
  +   plexset_id = rep(paste0("S", seq_len(8)), each = length(list.files(rcc_files_directory, pattern = "\\.RCC", recursive = TRUE)))
  + )
  > 
  > test_check("NACHO")
  [NACHO] "PCL" and "LoD" are not available for RCC type "n8".
  [NACHO] "PCL" and "LoD" are not available for RCC type "n8".
  [NACHO] "PCL" and "LoD" are not available for RCC type "n8".
  [NACHO] "PCL" and "LoD" are not available for RCC type "n8".
  [NACHO] "PCL" and "LoD" are not available for RCC type "n8".
  [NACHO] "PCL" and "LoD" are not available for RCC type "n8".
  [NACHO] "PCL" and "LoD" are not available for RCC type "n8".
  [NACHO] "PCL" and "LoD" are not available for RCC type "n8".
  [NACHO] "House_factor" was not computed.
  [NACHO] No housekeeping genes found.
  [NACHO] Importing RCC files.
  
  [NACHO] Performing QC and formatting data.
  [NACHO] Computing normalisation factors using "GLM" method.
  
  [NACHO] Normalising data using "GLM" method without housekeeping genes.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Importing RCC files.
  
  [NACHO] Performing QC and formatting data.
  [NACHO] Searching for the best housekeeping genes.
  [NACHO] Computing normalisation factors using "GLM" method for housekeeping genes prediction.
  
  [NACHO] The following predicted housekeeping genes will be used for normalisation:
    - POMC A1
    - CIGSSA_106427
    - CIGSSA_051281
    - CIGSSA_032361
    - PRL
  [NACHO] Computing normalisation factors using "GLM" method.
  
  [NACHO] Normalising data using "GLM" method without housekeeping genes.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  Setting options('download.file.method.GEOquery'='auto')
  Setting options('GEOquery.inmemory.gpl'=FALSE)
  Found 1 file(s)
  GSE74821_series_matrix.txt.gz
  No supplemental files found.
  Check URL manually if in doubt
  https://ftp.ncbi.nlm.nih.gov/geo/series/GSE74nnn/GSE74821/suppl/
  /usr/bin/tar: /home/hornik/tmp/scratch/RtmpNGwFgN/GSE74821/GSE74821_RAW.tar: Cannot open: No such file or directory
  /usr/bin/tar: Error is not recoverable: exiting now
  [NACHO] Nothing was done. Parameters in "normalise()", were the same as in "GSE74821".
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_predict = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Searching for the best housekeeping genes.
  [NACHO] Computing normalisation factors using "GEO" method for housekeeping genes prediction.
  [NACHO] The following predicted housekeeping genes will be used for normalisation:
    - ACTB
    - SF3A1
    - MRPL19
    - PUM1
    - PSMC4
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_norm = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GLM" method.
  
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
    - n_comp = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - remove_outliers = TRUE
    - outliers_thresholds = TRUE
  [NACHO] Computing normalisation factors using "GLM" method.
  
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
    - remove_outliers = TRUE
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - normalisation_method = TRUE
    - remove_outliers = TRUE
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - housekeeping_genes = TRUE
    - normalisation_method = TRUE
    - remove_outliers = TRUE
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "GSE74821" with new value for parameters:
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "plexset_nacho" with new value for parameters:
    - housekeeping_predict = TRUE
    - housekeeping_norm = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Searching for the best housekeeping genes.
  [NACHO] Computing normalisation factors using "GEO" method for housekeeping genes prediction.
  [NACHO] The following predicted housekeeping genes will be used for normalisation:
    - NKX2-2
    - HNF1B
    - GCGR
    - P48
    - TBP
  [NACHO] Computing normalisation factors using "GEO" method.
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  [NACHO] Normalising "plexset_nacho" with new value for parameters:
    - housekeeping_predict = TRUE
    - housekeeping_norm = TRUE
    - normalisation_method = TRUE
  [NACHO] Outliers have already been removed!
  [NACHO] Searching for the best housekeeping genes.
  [NACHO] Computing normalisation factors using "GLM" method for housekeeping genes prediction.
  
  [NACHO] The following predicted housekeeping genes will be used for normalisation:
    - HNF1B
    - NKX2-2
    - TBP
    - GCGR
    - P48
  [NACHO] Computing normalisation factors using "GLM" method.
  
  [NACHO] Returning a list.
    $ access              : character
    $ housekeeping_genes  : character
    $ housekeeping_predict: logical
    $ housekeeping_norm   : logical
    $ normalisation_method: character
    $ remove_outliers     : logical
    $ n_comp              : numeric
    $ data_directory      : character
    $ pc_sum              : data.frame
    $ nacho               : data.frame
    $ outliers_thresholds : list
  List of 11
   $ access              : chr "IDFILE"
   $ housekeeping_genes  : chr [1:8] "MRPL19" "PSMC4" "SF3A1" "RPLP0" ...
   $ housekeeping_predict: logi FALSE
   $ housekeeping_norm   : logi TRUE
   $ normalisation_method: chr "GLM"
   $ remove_outliers     : logi FALSE
   $ n_comp              : num 10
   $ data_directory      : chr "~/"
   $ pc_sum              :'data.frame':	10 obs. of  4 variables:
   $ nacho               :Classes 'data.table' and 'data.frame':	3456 obs. of  86 variables:
    ..- attr(*, "sorted")= chr "IDFILE"
    ..- attr(*, ".internal.selfref")=<externalptr> 
    ..- attr(*, "index")= int(0) 
    .. ..- attr(*, "__Name")= int [1:3456] 70 142 214 286 358 430 502 574 646 718 ...
   $ outliers_thresholds :List of 6
   - attr(*, "RCC_type")= chr "n1"
   - attr(*, "class")= chr "nacho"
  List of 11
   $ access              : chr "IDFILE"
   $ housekeeping_genes  : chr [1:8] "MRPL19" "PSMC4" "SF3A1" "RPLP0" ...
   $ housekeeping_predict: logi FALSE
   $ housekeeping_norm   : logi TRUE
   $ normalisation_method: chr "GLM"
   $ remove_outliers     : logi FALSE
   $ n_comp              : num 10
   $ data_directory      : chr "~/"
   $ pc_sum              :'data.frame':	10 obs. of  4 variables:
   $ nacho               :Classes 'data.table' and 'data.frame':	3456 obs. of  86 variables:
    ..- attr(*, "sorted")= chr "IDFILE"
    ..- attr(*, ".internal.selfref")=<externalptr> 
    ..- attr(*, "index")= int(0) 
    .. ..- attr(*, "__Name")= int [1:3456] 70 142 214 286 358 430 502 574 646 718 ...
   $ outliers_thresholds :List of 6
   - attr(*, "RCC_type")= chr "n1"
   - attr(*, "class")= chr "nacho"
  
  
  # RCC Summary
  
    - Samples: 48 
    - Endogenous: 50
     - Housekeeping: 8
     - Negative: 8
     - Positive: 6
  
  
  # Settings
  
    - Predict housekeeping genes: FALSE 
    - Normalise using housekeeping genes: TRUE 
    - Housekeeping genes available: MRPL19, PSMC4, SF3A1, RPLP0, PUM1, ACTB, TFRC and GUSB 
    - Normalise using: GLM 
    - Principal components to compute: 10 
    - Remove outliers: FALSE 
  
       +  Binding Density (BD) < 0.1 
       +  Binding Density (BD) > 2.25 
       +  Field of View (FoV) < 95 
       +  Positive Control Linearity (PCL) < 0.95 
       +  Limit of Detection (LoD) < 2 
       +  Positive normalisation factor (Positive_factor) < 0.25 
       +  Positive normalisation factor (Positive_factor) > 4 
       +  Housekeeping normalisation factor (house_factor) < 0.091 
       +  Housekeeping normalisation factor (house_factor) > 11 
  
  
  # QC Metrics
  
  
  
  ## Binding Density 
  
  The imaging unit only counts the codes that are unambiguously distinguishable.  
  It simply will not count codes that overlap within an image.  
  This provides increased confidence that the molecular counts you receive are from truly recognisable codes.  
  Under most conditions, forgoing the few barcodes that do overlap will not impact your data.  
  Too many overlapping codes in the image, however, will create a condition called image saturation in which significant data loss could occur (critical data loss from saturation is uncommon).
  
  To determine the level of image saturation, the nCounter instrument calculates the number of optical features per square micron for each lane as it processes the images.  
  This is called the **Binding Density** (**BD**).  
  The **Binding Density** is useful for determining whether data collection has been compromised due to image saturation.
  The acceptable range for **Binding Density** is:
  
  * `0.1 - 2.25` for **MAX**/**FLEX** instruments
  * `0.1 - 1.8` for **SPRINT** instruments
  
  Within these ranges, relatively few reporters on the slide surface will overlap, enabling the instrument to accurately tabulate counts for each reporter species.  
  A **Binding Density** significantly greater than the upper limit in either range is indicative of overlapping reporters on the slide surface.  
  The counts observed in lanes with a **Binding Density** at this level may have had significant numbers of codes ignored, which could potentially affect quantification and linearity of the assay. 
  
  
  
  
  ## Field of View (Imaging) 
  
  Each individual lane scanned on an nCounter system is divided into a few hundred imaging sections, called Fields of View (**FOV**), the exact number of which will depend on the system being used (*i.e.*, **MAX/FLEX** or **SPRINT**), and the scanner settings selected by the user.  
  The system images these **FOV**s separately, and sums the barcode counts of all **FOV**s from a single lane to form the final raw data count for each unique barcode target.  
  Finally, the system reports the number of **FOV**s successfully imaged as **FOV** Counted.
  
  Significant discrepancy between the number of **FOV** for which imaging was attempted (**FOV Count**) and for which imaging was successful (**FOV Counted**) may indicate an issue with imaging performance.  
  Recommended percentage of registered FOVs (*i.e.*, **FOV Counted** over **FOV Count**) is `75 %`. 
  
  
  
  
  ## Positive Control Linearity 
  
  Six synthetic DNA control targets are included with every nCounter Gene Expression assay.  
  Their concentrations range linearly (in *codeset*) from `128 fM` to `0.125 fM`, and they are referred to as **POS_A** to **POS_F**, respectively.  
  These **Positive Controls** are typically used to measure the efficiency of the hybridization reaction, and their step-wise concentrations also make them useful in checking the linearity performance of the assay.
  
  Since the known concentrations of the **Positive Controls** increase in a linear fashion, the resulting counts should, as well. 
  
  <!--
  Note that because **POS_F** has a known concentration of `0.125 fM`, which is considered below the limit of detection of the system, it should be excluded from this calculation (although you will see that **POS_F** counts are significantly higher than the negative control counts in most cases).
  --> 
  
  
  
  
  ## Limit of Detection 
  
  The limit of detection (**LoD**) is determined by measuring the ability to detect **POS_E**, the `0.5 fM` positive control probe, which corresponds to about 10,000 copies of this target within each sample tube.  
  On a **FLEX**/**MAX** system, the standard input of `100 ng` of total RNA will roughly correspond to about 10,000 cell equivalents (assuming one cell contains `10 pg` total RNA on average).  
  An nCounter assay run on the **FLEX**/**MAX** system should thus conservatively be able to detect roughly one transcript copy per cell for each target (or 10,000 total transcript copies).  
  In most (codeset) assays, you will observe that even the **POS_F** probe (equivalent to 0.25 copies per cell) is detectable above background. 
  
  
  
  
  # Control Genes 
  
  
  
  ## Positive 
  
  
  
  
  ## Negative 
  
  
  
  
  ## Housekeeping 
  
  
  
  
  ## Control Probe Expression 
  
  `geom_smooth()` using formula = 'y ~ x'
  
  
  
  # Quality-Control Visuals 
  
  
  
  ## Average Count vs. Binding Density 
  
  
  
  
  ## Average Count vs. Median Count 
  
  
  
  
  ## Principal Component 
  
  
  
  ### PC1 vs. PC2 
  
  
  
  
  ### Factorial planes 
  
  
  
  
  ### Proportion of Variance Explained 
  
  
  
  
  # Normalisation 
  
  
  
  ## Positive Factor vs. Background Threshold 
  
  
  
  
  ## Housekeeping Factor 
  
  
  
  
  ## Normalisation Result 
  
  `geom_smooth()` using formula = 'y ~ x'
  
  
  
  ## Outliers 
  
  
  
  |IDFILE                                                             |CartridgeID     |   BD|   FoV|     PCL|   LoD|     MC| MedC| Positive_factor| House_factor|
  |:------------------------------------------------------------------|:---------------|----:|-----:|-------:|-----:|------:|----:|---------------:|------------:|
  |GSM1934699_20111102_20111102-9741-1_LGWU102569-1036382WU_06.RCC.gz |20111102-9741-1 | 0.17| 93.94| 0.99418| 17.39| 918.48|  611|       0.8973975|     1.027674|
  
  
  ---
  
  # RCC Summary
  
    - Samples: 48 
    - Endogenous: 50
     - Housekeeping: 8
     - Negative: 8
     - Positive: 6
  
  
  ---
  
  # Settings
  
    - Predict housekeeping genes: FALSE 
    - Normalise using housekeeping genes: TRUE 
    - Housekeeping genes available: MRPL19, PSMC4, SF3A1, RPLP0, PUM1, ACTB, TFRC and GUSB 
    - Normalise using: GLM 
    - Principal components to compute: 10 
    - Remove outliers: FALSE 
  
       +  Binding Density (BD) < 0.1 
       +  Binding Density (BD) > 2.25 
       +  Field of View (FoV) < 75 
       +  Positive Control Linearity (PCL) < 0.95 
       +  Limit of Detection (LoD) < 2 
       +  Positive normalisation factor (Positive_factor) < 0.25 
       +  Positive normalisation factor (Positive_factor) > 4 
       +  Housekeeping normalisation factor (house_factor) < 0.091 
       +  Housekeeping normalisation factor (house_factor) > 11 
  
  
  ---
  
  # Binding Density 
  
  
  
  .pull-left.font70[
  
  The imaging unit only counts the codes that are unambiguously distinguishable.  
  It simply will not count codes that overlap within an image.  
  This provides increased confidence that the molecular counts you receive are from truly recognisable codes.  
  Under most conditions, forgoing the few barcodes that do overlap will not impact your data.  
  Too many overlapping codes in the image, however, will create a condition called image saturation in which significant data loss could occur (critical data loss from saturation is uncommon).
  
  To determine the level of image saturation, the nCounter instrument calculates the number of optical features per square micron for each lane as it processes the images.  
  This is called the **Binding Density** (**BD**).  
  The **Binding Density** is useful for determining whether data collection has been compromised due to image saturation.
  The acceptable range for **Binding Density** is:
  
  * `0.1 - 2.25` for **MAX**/**FLEX** instruments
  * `0.1 - 1.8` for **SPRINT** instruments
  
  Within these ranges, relatively few reporters on the slide surface will overlap, enabling the instrument to accurately tabulate counts for each reporter species.  
  A **Binding Density** significantly greater than the upper limit in either range is indicative of overlapping reporters on the slide surface.  
  The counts observed in lanes with a **Binding Density** at this level may have had significant numbers of codes ignored, which could potentially affect quantification and linearity of the assay. 
  
  
  
  ]
  
  .pull-right[
  
  
  
  ]
  
  
  
  
  ---
  
  # Field of View (Imaging) 
  
  
  
  .pull-left.font70[
  
  Each individual lane scanned on an nCounter system is divided into a few hundred imaging sections, called Fields of View (**FOV**), the exact number of which will depend on the system being used (*i.e.*, **MAX/FLEX** or **SPRINT**), and the scanner settings selected by the user.  
  The system images these **FOV**s separately, and sums the barcode counts of all **FOV**s from a single lane to form the final raw data count for each unique barcode target.  
  Finally, the system reports the number of **FOV**s successfully imaged as **FOV** Counted.
  
  Significant discrepancy between the number of **FOV** for which imaging was attempted (**FOV Count**) and for which imaging was successful (**FOV Counted**) may indicate an issue with imaging performance.  
  Recommended percentage of registered FOVs (*i.e.*, **FOV Counted** over **FOV Count**) is `75 %`. 
  
  
  
  ]
  
  .pull-right[
  
  
  
  ]
  
  
  
  
  ---
  
  # Positive Control Linearity 
  
  
  
  .pull-left.font70[
  
  Six synthetic DNA control targets are included with every nCounter Gene Expression assay.  
  Their concentrations range linearly (in *codeset*) from `128 fM` to `0.125 fM`, and they are referred to as **POS_A** to **POS_F**, respectively.  
  These **Positive Controls** are typically used to measure the efficiency of the hybridization reaction, and their step-wise concentrations also make them useful in checking the linearity performance of the assay.
  
  Since the known concentrations of the **Positive Controls** increase in a linear fashion, the resulting counts should, as well. 
  
  <!--
  Note that because **POS_F** has a known concentration of `0.125 fM`, which is considered below the limit of detection of the system, it should be excluded from this calculation (although you will see that **POS_F** counts are significantly higher than the negative control counts in most cases).
  --> 
  
  
  
  ]
  
  .pull-right[
  
  
  
  ]
  
  
  
  
  ---
  
  # Limit of Detection 
  
  
  
  .pull-left.font70[
  
  The limit of detection (**LoD**) is determined by measuring the ability to detect **POS_E**, the `0.5 fM` positive control probe, which corresponds to about 10,000 copies of this target within each sample tube.  
  On a **FLEX**/**MAX** system, the standard input of `100 ng` of total RNA will roughly correspond to about 10,000 cell equivalents (assuming one cell contains `10 pg` total RNA on average).  
  An nCounter assay run on the **FLEX**/**MAX** system should thus conservatively be able to detect roughly one transcript copy per cell for each target (or 10,000 total transcript copies).  
  In most (codeset) assays, you will observe that even the **POS_F** probe (equivalent to 0.25 copies per cell) is detectable above background. 
  
  
  
  ]
  
  .pull-right[
  
  
  
  ]
  
  
  
  
  ---
  
  # Positive Control Genes 
  
  
  
  
  ---
  
  # Negative Control Genes 
  
  
  
  
  ---
  
  # Housekeeping Genes 
  
  
  
  
  ---
  
  # Control Probe Expression 
  
  `geom_smooth()` using formula = 'y ~ x'
  
  
  
  ---
  
  # Average Count vs. Binding Density 
  
  
  
  
  ---
  
  # Average Count vs. Median Count 
  
  
  
  
  ---
  
  # PC1 vs. PC2 
  
  
  
  
  ---
  
  # Factorial planes 
  
  
  
  
  ---
  
  # Proportion of Variance Explained 
  
  
  
  
  ---
  
  # Positive Normalisation Factor vs. Background 
  
  
  
  
  ---
  
  # Housekeeping Normalisation Factor 
  
  
  
  
  ---
  
  # Normalisation Result 
  
  `geom_smooth()` using formula = 'y ~ x'
  
  [ FAIL 1 | WARN 94 | SKIP 0 | PASS 192 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-load_rcc.R:77:5'): (code run outside of `test_that()`) ─────────
  Error in ``$<-.data.frame`(`*tmp*`, IDFILE, value = character(0))`: replacement has 0 rows, data has 1321
  Backtrace:
      ▆
   1. ├─base::`$<-`(`*tmp*`, IDFILE, value = `<chr>`) at test-load_rcc.R:77:4
   2. └─base::`$<-.data.frame`(`*tmp*`, IDFILE, value = `<chr>`) at test-load_rcc.R:77:4
  
  [ FAIL 1 | WARN 94 | SKIP 0 | PASS 192 ]
  Error: Test failures
  Execution halted