CONTRIBUTED RESEARCH ARTICLES 171 beadarrayFilter: An R Package to Filter Beads

Microarrays enable the expression levels of thousands of genes to be measured simultaneously. However, only a small fraction of these genes are expected to be expressed under different experimental conditions. Nowadays, filtering has been introduced as a step in the microarray preprocessing pipeline. Gene filtering aims at reducing the dimensionality of data by filtering redundant features prior to the actual statistical analysis. Previous filtering methods focus on the Affymetrix platform and can not be easily ported to the Illumina platform. As such, we developed a filtering method for Illumina bead arrays. We developed an R package, beadarrayFilter, to implement the latter method. In this paper, the main functions in the package are highlighted and using many examples, we illustrate how beadarrayFilter can be used to filter bead arrays.


Introduction
Gene expression patterns are commonly assessed by microarrays that can measure thousands of genes simultaneously.However, in a typical microarray experiment, only a small fraction of the genes are informative which motivated the development of gene filtering methods.Gene filtering aims at reducing the dimensionality of data by filtering redundant features prior to the actual statistical analysis.This has been shown to improve differential expression analysis with Affymetrix microarrays (e.g., Talloen et al., 2007;Calza et al., 2007;Kasim et al., 2010).
Although different microarrays platforms share the same principle of hybridizing DNA to a complementary probe, they differ considerably by design.Unlike the Affymetrix microarrays which have sets of unique probes targeting a particular gene (resulting in a probe set for a targeted gene), Illumina microarrays have sets of identical probes.Thus, the existing filtering methods can not be readily ported to the Illumina platform.As a result, Forcheh et al. (2012) developed a filtering method for Illumina bead arrays.Forcheh et al. (2012) equally showed that filtering improves the analysis of differential expression.We provide the implementation of their method in the beadarrayFilter R software package.The beadarrayFilter package can take a normalized data frame or a normalized bead array ExpressionSetIllumina object (obtained using the summarize or readBeadSummaryData functions in the Bioconductor package beadarray by Dunning et al., 2007) or a normalized LumiBatch object as input and returns a list containing a filtered data frame or a filtered bead array ExpressionSetIllumina object or a filtered LumiBatch object, respectively.The package can also process summarized and normalized average intensities (eSet), their standard errors (seSet) and the number of beads used for summarization (nSet) as input and returns a list of components including the intra-cluster correlations (ICC), which can be used to assess different filtering strategies.
The paper contains a brief background of the filtering methodology followed by the introduction of the beadarrayFilter package with illustrative examples.

Filtering Illumina bead types
Let Y kij be the bead-level expression intensity of bead j in sample (array) i in treatment group k, i = 1, . . ., n k , j = 1, . . ., m ki , k = 1, . . ., K, then, Forcheh et al. (2012) proposed the following filtering model: where µ represents the average expression for a bead type across all samples, b i is the array specific random effect and kij are the measurement errors, both normally distributed with mean zero and variance τ 2 and σ 2 , respectively: The τ 2 captures the between-array variability while σ 2 models the within-array variability.Model (1) implies a common ICC, (Verbeke and Molenberghs, 2000), given by (2) The R Journal Vol.5/1, June ISSN 2073-4859 which is the correlation among the replicate probes on the array.
An informative bead type is expected to have a relatively high value of ρ since all corresponding beads have the same sequence.As such, the between-array variability is the dominant variance component for informative bead types while the within-array variability is the largest variance component for the non-informative bead types.
For Illumina bead arrays, within-array variability is expected to vary across all arrays and treatment groups in the experiment.In this regard, Forcheh et al. (2012) included an array/treatment specific variance component to adjust the model for heteroscedasticity i.e., kij ∼ N(0, σ 2 ki ).Hence, the ICC becomes bead/array/group specific, and ∑ K k=1 n k ICCs are obtained for each bead type ( more details can be found in Forcheh et al., 2012).ICC based filtering of Affymetrix microarray data has been proposed in the literature (e.g., Talloen et al., 2007;Kasim et al., 2010).Typically, an ICC cut-off δ = 0.5 has been used to declare a transcript informative.Forcheh et al. (2012) also relied on the ICC as a filtering criterion and proposed different thresholding schemes based on the five number summaries, i.e., a bead type can be called informative based on thresholding (1) the minimum ICC, (2) 25, (3) 50, (4) 75 quantiles or (5) the maximum ICC of all the arrays.Filtering is expected to become less stringent from strategy (1)-( 5).These different thresholding strategies are implemented within the package.

beadarrayFilter package
The beadarrayFilter package can either take a normalized ExpressionSetIllumina object, a normalized LumiBatch object, a normalized data.frame or a normalized eSet, seSet and nSet as input and returns a list.We refer the user to the documentation of the Bioconductor packages beadarray and lumi for more details on generating ExpressionSetIllumina objects or LumiBatch objects.For each bead type, the ICCs can be summarized using the 5 number summary or user specified quantiles.The corresponding ICC summaries are used for obtaining informative bead types.The package contains two major functions, which we refer to as: (1) a low level function iccFun and (2) a wrapper function beadtypeFilter.Model fitting is done using a modified version of the MLM.beadarray function of Kim and Lin (2011).Details on the functions can be obtained by using the help function in R (?beadtypeFilter or ?iccFun).

Installation of beadarrayFilter
The beadarrayFilter package is available at CRAN, and can be installed using install.packages("beadarrayFilter").

beadtypeFilter function
The beadtypeFilter function is a wrapper function for the iccFun function and is designed for users with a primary interest in obtaining filtered bead types.This function takes a normalized ExpressionSetIllumina object, a normalized LumiBatch object or a normalized data.frameand returns the names of the informative bead types.Optionally, the filtered ExpressionSetIllumina object or the filtered data.framecan also be returned.The filtered ExpressionSetIllumina object, or filtered LumiBatch object or the filtered data.framecan then be used for the downstream analysis.
iccFun function iccFun is a low level function.It is designed for users who want to assess different filtering strategies.It takes a normalized eSet, seSet and nSet and the bead types identification variable (ProbeID), fits the filtering Model (1), calculates the ICC for each bead type on each array/treatment group, summaries the ICCs at the specified quantiles, and returns the ICC summaries, the within-array variances, the between-array variances as well as all ICCs.The ICCs output can later be used for filtering or to assess different filtering strategies.Note the information printed as you execute the beadtypeFilter or iccFun functions: This indicates the number of transcripts for which the filtering model has already converged while "Now ... remaining..." tells the number of transcripts still to be processed.
The R Journal Vol.5/1, June ISSN 2073-4859 • [1] "Computing ICC for each array" This message is printed when the function begins to calculate the ICC for each array once the filtering model has been fitted to all the transcripts.
• [1] "Summarising the ICC at supplied quantile(s)" This message indicates the last stage of the filtering function where the ICCs are summarized at the supplied quantiles (see Forcheh et al., 2012).
The emCDF function within the beadarrayFilter package is used to plot the empirical cumulative density functions (edcfs) for the different threshold strategies discussed above.It processes the iccFun output and plots the empirical cumulative density functions (ecdf) for the different threshold strategies as discussed in Forcheh et al. (2012).It is expected that the filtering becomes more stringent as the ICC threshold increases and/or as the the thresholded ICC quantile decreases.
Informative bead types will have larger between-array variances as compared to the within-array variances.The varianceplot function takes the estimated between-and within-array variances from the iccFun function as inputs and plots them.The variances of noninformative bead types are plotted in blue while those of the informative bead types are displayed in red.
Upon filtering the MLM.beadarray function can be used for downstream analysis of single factor designs.For more details, see Kim and Lin (2011).
A summary of the functions within the beadarrayFilter package and their use is presented in Table 1.

Examples
The data set exampleSummaryData from the Bioconductor package beadarrayExampleData (Dunning et al., 2007), is used to illustrate filtering of ExpressionSetIllumina objects while the publicly available spike-in data (Dunning et al., 2008) are used to process data.frames.The log 2 summarized expression intensities, obtained from Brain and Universal Human Reference RNA (UHRR) samples in the data set exampleSummaryData will be used.There are 12 arrays, 6 for the Brain samples and 6 for the UHRR samples.The spike-in dataset consists of 48 arrays and an array contained ∼ 48,000 bead types (non-spikes) and 33 bead types (spikes) targeting bacterial and viral genes absent in the mouse genome.We use the same subset of the spike-in data as in Kim and Lin (2011).This dataset includes 34,654 bead types targeting annotated genes with Genebank IDs and the 33 spikes.The data can be downloaded from https://ephpublic.aecom.yu.edu/sites/rkim/Supplementary/files/KimLin2 1 .htmlwith the folder name "A normalized dataset for example analysis".We also show how the downstream analysis can be performed upon filtering using the spike-in data.Filtering of LumiBatch objects is illustrated using the BeadStudio output used in the vignette "beadsummary" from the beadarray package, which can be downloaded from http://www.switchtoi.com/datasets.ilmn.

beadtypeFilter function
This subsection shows how to use the beadtypeFilter function to filter normalized ExpressionSetIllumina objects, LumiBatch objects and data.frames.For an ExpressionSetIllumina, this is done using the The R Journal Vol.5/1, June ISSN 2073-4859 exampleSummaryData data set from the beadarrayExampleData package.
For a LumiBatch object, filtering is illustrated using the non-normalized data, an output of Bead-Studio used in the "beadsummary" vignette from the beadarray package.The data file, 'AsuragenMAQC_BeadStudioOutput.zip', can be downloaded from http://www.switchtoi.com/datasets.ilmn.Once the file has been downloaded, unzip its content to your R working directory.
> dim(lumi.N) Features Samples 487 1 6 > dim(iccResult$informData) Features Samples 1195 6 The R Journal Vol.5/1, June ISSN 2073-4859 Only 1195 of the 48701 bead types were declared informative using the maximum ICC at a cutoff of 50%.This may be due to the way the data was summarized and normalized.How the processing of bead array data affects bead types filtering is a topic of future research.
For a data.frame, the beadtypeFilter function is illustrated using the Illumina spike-in data.Read the data from the file location where the data had been downloaded, unzipped and saved.
> filepath <-"C:/Multi_level_Illumina_feb2 11/log2scale.normalized.txt"> dt <-read.delim(filepath,header = TRUE, as.is = TRUE, row.names= NULL)[,-1] > dt [1:6,1:5 Note, that the data.framesupplied to the beadtypeFilter function should contain the summarized intensities (eSet), standard errors (seSet) and the number of beads used for the summarization (nSet).When using a data frame, column names should be conform to BeadStudio output, i.e., the column names for eSet should end on "Signal", those for seSet on "STDERR" and the columns corresponding to nSet should end on "NBEADS".It is preferable to use an identification variable with a unique ID for each bead type.In the spike-in data, the spikes all have the same TargetID, thus the ProbeID is preferred.Similar to the ExpressionSetIllumina example, the beadtypeFilter function is used for filtering.
> head(iccResults$InformProbeNames) [1] 5 28 5 44 7 594 11 138 11 685 13 4 2 > dim(dt) [1] 34687 193 > dim(iccResults$informData) [1] 238 193 238 of the 34687 bead types were declared informative based on thresholding the median ICC at a cutoff of 50%.A large number of bead types have been filtered out.It should be noted that this is probably due to the artificial nature of the spike-in data and we would expect lesser bead types to be filtered out in real life data.

iccFun function
The examples in this section show how the iccFun function can be used to process different data types, observe its output and assess the filtering strategies.

Discussion
The beadarrayFilter package can be used to filter Illumina bead array data.The beadtypeFilter function can filter normalized ExpressionSetIllumina objects, normalized LumiBatch objects as well as normalized data.framesand returns the names of the informative bead types.Optionally, the user can also obtain the filtered data.This, however, does not return the required outputs to assess different filtering strategies nor the variances using the emCDF or the varianceplot functions, respectively.The iccFun function can be used to customize filtering strategies.It returns the required outputs for assessing different filtering strategies and the between-and within-array variances.
The R Journal Vol.5/1, June ISSN 2073-4859 Fits the filtering model as inForcheh et al. (2012), and computes the ICC which can later be used for filtering or to assess different filtering strategies MLM.beadarray() Function to fit the filtering model or for the downstream analysis of single factor experimental designs emCDF() Plots the ecdf for the different threshold strategies varianceplot() Plots the the between-array and the within-array variances

Figure 1 :
Figure 1: The empirical cumulative density function of the ICCs at the specified quantiles.

Figure 2 :
Figure 2: Variance of random intercept versus variance of measurement error.Bead types are declared informative based on thresholding the minimum ICC at a cutoff point of 80%: noninformative bead types (•) and informative bead types ( ).

Table 1 :
Main Functions within the beadarrayFilter package.