NACHO

A NAnostring quality Control dasHbOard

Mickaël Canouil, Ph.D., Gerard A. Bouland and Roderick C. Slieker, Ph.D.

January 09, 2020

1 Installation

# Install NACHO from CRAN:
install.packages("NACHO")

# Or the the development version from GitHub:
# install.packages("remotes")
remotes::install_github("mcanouil/NACHO")
# Load NACHO
library(NACHO)

2 Overview

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: load_rcc() and visualise().

NACHO also includes a function normalise(), which (re)calculates sample specific size factors and normalises the data.

In addition (since v0.6.0) NACHO includes two (three) additional functions:

For more vignette("NACHO") and vignette("NACHO-analysis").

Canouil M, Bouland GA, Bonnefond A, Froguel P, Hart L, Slieker R (2019). “NACHO: an R package for quality control of NanoString nCounter data.” Bioinformatics. ISSN 1367-4803, doi: 10.1093/bioinformatics/btz647.

@Article{,
  title = {{NACHO}: an {R} package for quality control of {NanoString} {nCounter} data},
  author = {Mickaël Canouil and Gerard A. Bouland and Amélie Bonnefond and Philippe Froguel and Leen Hart and Roderick Slieker},
  journal = {Bioinformatics},
  address = {Oxford, England},
  year = {2019},
  month = {aug},
  issn = {1367-4803},
  doi = {10.1093/bioinformatics/btz647},
}

3 An example

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.

3.1 Get NanoString nCounter data

3.1.1 Presummarised data from NACHO

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).

3.1.2 Raw data from GEO

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.

## # A tibble: 263 x 71
##    IDFILE title geo_accession status submission_date last_update_date type 
##    <chr>  <fct> <chr>         <fct>  <fct>           <fct>            <fct>
##  1 GSM18… NPC-… GSM1824143    Publi… Jul 15 2015     Jul 20 2015      RNA  
##  2 GSM18… NPC-… GSM1824144    Publi… Jul 15 2015     Jul 20 2015      RNA  
##  3 GSM18… NPC-… GSM1824145    Publi… Jul 15 2015     Jul 20 2015      RNA  
##  4 GSM18… NPC-… GSM1824146    Publi… Jul 15 2015     Jul 20 2015      RNA  
##  5 GSM18… NPC-… GSM1824147    Publi… Jul 15 2015     Jul 20 2015      RNA  
##  6 GSM18… NPC-… GSM1824148    Publi… Jul 15 2015     Jul 20 2015      RNA  
##  7 GSM18… NPC-… GSM1824149    Publi… Jul 15 2015     Jul 20 2015      RNA  
##  8 GSM18… NPC-… GSM1824150    Publi… Jul 15 2015     Jul 20 2015      RNA  
##  9 GSM18… NPC-… GSM1824151    Publi… Jul 15 2015     Jul 20 2015      RNA  
## 10 GSM18… NPC-… GSM1824152    Publi… Jul 15 2015     Jul 20 2015      RNA  
## # … with 253 more rows, and 64 more variables: channel_count <fct>,
## #   source_name_ch1 <fct>, organism_ch1 <fct>, characteristics_ch1 <fct>,
## #   characteristics_ch1.1 <fct>, characteristics_ch1.2 <fct>,
## #   characteristics_ch1.3 <fct>, characteristics_ch1.4 <fct>,
## #   characteristics_ch1.5 <fct>, characteristics_ch1.6 <fct>,
## #   characteristics_ch1.7 <fct>, characteristics_ch1.8 <fct>,
## #   characteristics_ch1.9 <fct>, characteristics_ch1.10 <fct>,
## #   characteristics_ch1.11 <fct>, characteristics_ch1.12 <fct>,
## #   characteristics_ch1.13 <fct>, characteristics_ch1.14 <fct>,
## #   characteristics_ch1.15 <fct>, characteristics_ch1.16 <fct>,
## #   characteristics_ch1.17 <fct>, characteristics_ch1.18 <fct>,
## #   characteristics_ch1.19 <fct>, treatment_protocol_ch1 <fct>,
## #   growth_protocol_ch1 <fct>, molecule_ch1 <fct>, extract_protocol_ch1 <fct>,
## #   label_ch1 <fct>, label_protocol_ch1 <fct>, taxid_ch1 <fct>,
## #   hyb_protocol <fct>, scan_protocol <fct>, data_processing <fct>,
## #   platform_id <fct>, contact_name <fct>, contact_email <fct>,
## #   contact_institute <fct>, contact_address <fct>, contact_city <fct>,
## #   contact_state <fct>, `contact_zip/postal_code` <fct>,
## #   contact_country <fct>, supplementary_file <fct>, data_row_count <fct>,
## #   `age:ch1` <chr>, `bin.t:ch1` <chr>, `chemo:ch1` <chr>,
## #   `disease.event:ch1` <chr>, `disease.spec.event:ch1` <chr>,
## #   `disease.spec.time:ch1` <chr>, `disease.time:ch1` <chr>,
## #   `distant.event:ch1` <chr>, `distant.time:ch1` <chr>, `gender:ch1` <chr>,
## #   `local.event:ch1` <chr>, `local.regional.event:ch1` <chr>,
## #   `local.regional.time:ch1` <chr>, `local.time:ch1` <chr>, `n:ch1` <chr>,
## #   `nodal.event:ch1` <chr>, `nodal.time:ch1` <chr>,
## #   `survival.event:ch1` <chr>, `survival.time:ch1` <chr>, `t:ch1` <chr>

After we extracted the dataset to the /tmp/Rtmp2fqDkM/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.

3.2 The load_rcc() function

The 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.

3.3 The visualise() function

When 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.

The sidebar includes widgets to control quality-control thresholds. These widgets differ according to the selected tab. 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.

3.4 The normalise() function

NACHO 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.

Let’s say hsa-miR-103 and hsa-let-7e are not suitable, therefore, you want to exclude these genes from the normalisation process.

The next step is the actual normalisation. The first argument requires the summary which is created with the load_rcc() 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.

normalise() returns a list object (same as load_rcc()) with raw_counts and normalised_counts slots filled with the raw and normalised counts. Both counts are also in the NACHO data.frame.

3.5 The autoplot() function

The autoplot() function provides an easy way to plot any quality-control from the visualise() function.

The possible metrics (x) are:

3.5.1 Binding Density

3.5.2 Imaging

3.5.3 Positive Control Linearity

3.5.4 Limit of Detection

3.5.5 Positive Controls

3.5.6 Negative Controls

3.5.7 Housekeeping Genes

3.5.8 Positive Controls vs. Negative Controls

3.5.9 Average Counts vs. Binding Density

3.5.10 Average Counts vs. Median Counts

3.5.11 Principal Component 1 vs. 2

3.5.12 Principal Component scree plot

3.5.13 Principal Components planes

3.5.14 Positive Factor vs. Negative Factor

## Warning: Transformation introduced infinite values in continuous y-axis

3.5.15 Housekeeping Factor

## Warning: Transformation introduced infinite values in continuous x-axis
## Warning: Transformation introduced infinite values in continuous x-axis
## Warning: Transformation introduced infinite values in continuous y-axis

## Warning: Transformation introduced infinite values in continuous y-axis

3.5.16 Normalisation Factor