NACHO (NAnostring quality Control dasHbOard) is developed for NanoString nCounter data.
NanoString nCounter data is a messenger-RNA/micro-RNA (mRNA/miRNA) expression assay and works with fluorescent barcodes.
Each barcode is assigned a mRNA/miRNA, which can be counted after bonding with its target.
As a result each count of a specific barcode represents the presence of its target mRNA/miRNA.
NACHO is able to load, visualise and normalise the exported NanoString nCounter data and facilitates the user in performing a quality control.
NACHO does this by visualising quality control metrics, expression of control genes, principal components and sample specific size factors in an interactive web application.
With the use of two functions, RCC files are summarised and visualised, namely: summarise()
and visualise()
.
summarise()
function is used to preprocess the data.visualise()
function initiates a Shiny-based dashboard that visualises all relevant QC plots.NACHO also includes a function normalise()
, which (re)calculates sample specific size factors and normalises the data.
normalise()
function creates a list in which your settings, the raw counts and normalised counts are stored.In addition (since v0.6.0) NACHO includes two (three) additional functions:
render()
function renders a full quality-control report (HTML) based on the results of a call to summarise()
or normalise()
(using print()
in a Rmarkdown chunk).autoplot()
function draws any quality-control metrics from visualise()
and render()
.To display the usage and utility of NACHO, we show three examples in which the above mentioned functions are used and the results are briefly examined.
NACHO comes with presummarised data and in the first example we use this dataset to call the interactive web application using visualise()
.
In the second example, we show the process of going from raw RCC files to visualisations with a dataset queried from GEO using GEOquery
.
In the third example, we use the summarised dataset from the second example to calculate the sample specific size factors using normalise()
and its added functionality to predict housekeeping genes.
Besides creating interactive visualisations, NACHO also identifies poorly performing samples which can be seen under the Outlier Table tab in the interactive web application.
While calling normalise()
, the user has the possibility to remove these outliers before size factor calculation.
This example shows how to use summarised data to call the interactive web application.
The raw data used is from a study of Liu et al. (2016) and was acquired from the NCBI GEO public database (Barrett et al. 2013).
Numerous NanoString nCounter datasets are available from GEO (Barrett et al. 2013).
In this example, we use a mRNA dataset from the study of Bruce et al. (2015) with the GEO accession number: GSE70970. The data is extracted and prepared using the following code.
library(GEOquery)
# Download data
gse <- getGEO("GSE70970")
# Get phenotypes
targets <- pData(phenoData(gse[[1]]))
getGEOSuppFiles(GEO = "GSE70970", baseDir = tempdir())
# Unzip data
untar(
tarfile = paste0(tempdir(), "/GSE70970/GSE70970_RAW.tar"),
exdir = paste0(tempdir(), "/GSE70970/Data")
)
# Add IDs
targets$IDFILE <- list.files(paste0(tempdir(), "/GSE70970/Data"))
After we extracted the dataset to the paste0(tempdir(), "/GSE70970/Data")
directory, a Samplesheet.csv
containing a column with the exact names of the files for each sample can be written or use as is.
summarise()
functionThe first argument requires the path to the directory containing the RCC files, the second argument is the location of samplesheet followed by third argument with the column name containing the exact names of the files.
The housekeeping_genes
and normalisation_method
arguments respectively indicate which housekeeping genes and normalisation method should be used.
library(NACHO)
##
## Attaching package: 'NACHO'
## The following object is masked from 'package:BiocGenerics':
##
## normalize
GSE70970_sum <- summarise(
data_directory = paste0(tempdir(), "/GSE70970/Data"), # Where the data is
ssheet_csv = targets, # The samplesheet
id_colname = "IDFILE", # Name of the column that contains the identfiers
housekeeping_genes = NULL, # Custom list of housekeeping genes
housekeeping_predict = TRUE, # Predict the housekeeping genes based on the data?
normalisation_method = "GEO", # Geometric mean or GLM
n_comp = 5 # Number indicating the number of principal components to compute.
)
## [NACHO] Importing RCC files.
## [NACHO] Performing QC and formatting data.
## [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:
## - hsa-miR-103
## - hsa-let-7e
## - hsa-miR-1260
## - hsa-miR-500+hsa-miR-501-5p
## - hsa-miR-1274b
## [NACHO] Computing normalisation factors using "GEO" method.
## [NACHO] Missing values have been replaced with zeros for PCA.
## [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
## $ raw_counts : data.frame
## $ normalised_counts : data.frame
visualise()
functionWhen the summarisation is done, the summarised (or normalised) data can be visualised using the visualise()
function as can be seen in the following chunk of code.
On the left, there are widgets that control the interactive plotting area. These widgets differ dependent on which main tab is chosen. The second layer of tabs is also interactive and changes based on which main tab is chosen. Each sample in the plots can be coloured based on either technical specifications which are included in the RCC files or based on specifications of your own choosing, though these specifications need to be included in the samplesheet.
normalise()
functionNACHO allows the discovery of housekeeping genes within your own dataset. NACHO finds the five best suitable housekeeping genes, however, it is possible that one of these five genes might not be suitable, which is why a subset of these discovered housekeeping genes might work better in some cases. For this example, we use the GSE70970 dataset from the previous example. The discovered housekeeping genes are saved in the result object as predicted_housekeeping.
print(GSE70970_sum[["housekeeping_genes"]])
## [1] "hsa-miR-103" "hsa-let-7e"
## [3] "hsa-miR-1260" "hsa-miR-500+hsa-miR-501-5p"
## [5] "hsa-miR-1274b"
Let’s say hsa-miR-103 and hsa-let-7e are not suitable, therefore, you want to exclude these genes from the normalisation process.
my_housekeeping <- GSE70970_sum[["housekeeping_genes"]][-c(1, 2)]
print(my_housekeeping)
## [1] "hsa-miR-1260" "hsa-miR-500+hsa-miR-501-5p"
## [3] "hsa-miR-1274b"
The next step is the actual normalisation. The first argument requires the summary which is created with the summarise()
function. The second argument requires a vector of gene names. In this case, it is a subset of the discovered housekeeping genes we just made. With the third argument the user has the choice to remove the outliers. Lastly, the normalisation method can be choosed.
Here, the user has a choice between "GLM"
or "GEO"
. The differences between normalisation methods are nuanced, however, a preference for either method are use case specific.
In this example, "GLM"
is used.
GSE70970_norm <- normalise(
nacho_object = GSE70970_sum,
housekeeping_genes = my_housekeeping,
housekeeping_predict = FALSE,
housekeeping_norm = TRUE,
normalisation_method = "GEO",
remove_outliers = TRUE
)
## [NACHO] Normalising "GSE70970_sum" with new value for parameters:
## - housekeeping_genes = TRUE
## - housekeeping_predict = TRUE
## - remove_outliers = TRUE
## [NACHO] Computing normalisation factors using "GEO" method.
## [NACHO] Missing values have been replaced with zeros for PCA.
## [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
## $ raw_counts : data.frame
## $ normalised_counts : data.frame
normalise()
returns a list
object (same as summarise()
) with raw_counts
and normalised_counts
slots filled with the raw and normalised counts. Both counts are also in the NACHO data.frame.
autoplot()
functionThe autoplot()
function provides an easy way to plot any quality-control from the visualise()
function.
The possible metrics (x
) are:
"BD"
(Binding Density)"FoV"
(Imaging)"PC"
(Positive Control Linearity)"LoD"
(Limit of Detection)"Positive"
(Positive Controls)"Negative"
(Negative Controls)"Housekeeping"
(Housekeeping Genes)"PN"
(Positive Controls vs. Negative Controls)"ACBD"
(Average Counts vs. Binding Density)"ACMC"
(Average Counts vs. Median Counts)"PCA12"
(Principal Component 1 vs. 2)"PCAi"
(Principal Component scree plot)"PCA"
(Principal Components planes)"PFNF"
(Positive Factor vs. Negative Factor)"HF"
(Housekeeping Factor)"NORM"
(Normalisation Factor)render()
functionThe render()
function renders (using print(..., echo = TRUE)
a comprehensive HTML report which includes all quality-control metrics and description of those metrics.
render(
nacho_object = GSE74821,
colour = "CartridgeID",
output_file = "NACHO_QC.html",
output_dir = ".",
size = 0.5,
show_legend = TRUE,
clean = TRUE
)
The underneath function print()
can be used directly within any Rmarkdown chunk, setting the parameter echo = TRUE
.
print(
x = GSE74821,
colour = "CartridgeID",
size = 0.5,
show_legend = TRUE,
echo = TRUE,
title_level = 3
)
Remove outliers: FALSE
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. 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 instruments0.1 - 1.8
for SPRINT instrumentsWithin 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. Some of the factors that may contribute to increased Binding Density are listed in the Factors affecting Binding Density box.
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 FOVs separately, and sums the barcode counts of all FOVs from a single lane to form the final raw data count for each unique barcode target. Finally, the system reports the number of FOVs 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 %
. Lanes will be flagged if this percentage is lower.
Six synthetic DNA control targets are included with every nCounter Gene Expression assay. Their concentrations range linearly 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. An R2 value is calculated from the regression between the known concentration of each of the Positive Controls and the resulting counts from them (this calculation is performed using log2-transformed values).
Since the known concentrations of the Positive Controls increase in a linear fashion, the resulting counts should, as well. Therefore, R2 values should be higher than 0.95
.
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).
The limit of detection 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 assays, you will observe that even the POS_F probe (equivalent to 0.25 copies per cell) is detectable above background.
To determine whether POS_E is detectable, it can be compared to the counts for the negative control probes. Every nCounter Gene Expression assay is manufactured with eight negative control probes that should not hybridize to any targets within the sample. Counts from these will approximate general non-specific binding of probes within the samples being run. The counts of POS_E should be higher than two times the standard deviation above the mean of the negative control.
Barrett, Tanya, Stephen E. Wilhite, Pierre Ledoux, Carlos Evangelista, Irene F. Kim, Maxim Tomashevsky, Kimberly A. Marshall, et al. 2013. “NCBI GEO: Archive for Functional Genomics Data Sets—Update.” Nucleic Acids Research 41 (D1): D991–D995. https://doi.org/10.1093/nar/gks1193.
Bruce, Jeff P., Angela B. Y. Hui, Wei Shi, Bayardo Perez-Ordonez, Ilan Weinreb, Wei Xu, Benjamin Haibe-Kains, et al. 2015. “Identification of a microRNA Signature Associated with Risk of Distant Metastasis in Nasopharyngeal Carcinoma.” Oncotarget 6 (6): 4537–50. https://doi.org/10.18632/oncotarget.3005.
Liu, Minetta C., Brandelyn N. Pitcher, Elaine R. Mardis, Sherri R. Davies, Paula N. Friedman, Jacqueline E. Snider, Tammi L. Vickery, et al. 2016. “PAM50 Gene Signatures and Breast Cancer Prognosis with Adjuvant Anthracycline- and Taxane-Based Chemotherapy: Correlative Analysis of C9741 (Alliance).” Npj Breast Cancer 2 (January): 15023. https://doi.org/10.1038/npjbcancer.2015.23.