Process a list of S4 expressionSet objects.
Source:R/curatedBreastData_process.R
processExpressionSetList.RdA wrapper function for the post-processing function processExpressionSet() on a list of S4 expressionSet objects. This function is run after initial dataset normalization, such as quantile normalization on microarray datasets.
Usage
processExpressionSetList(
exprSetList,
outputFileDirectory = "./",
numTopVarGenes,
minVarPercentile,
maxVarPercentile = 1,
minVar
)Arguments
- exprSetList
List of S4 expression sets.
- outputFileDirectory
Output file directory for messages that print status of post-processing the ExpressionSets.
- numTopVarGenes
A numeric value indicating the number of genes (features) to select; the function will only take this number of genes that have the highest variance across all genes.
- minVarPercentile
Minimum variance percentile. Must be provided in conjunction with maxVarPercentile to use percentiles to threshold genes.
- maxVarPercentile
Maximum variance percentile. Defaul is 1, i.e. 1%. Must be provided in conjunction with minVarPercentile to use percentiles to threshold genes.
- minVar
If maxVar is provided, as opposed to minVarPercentile and maxVarPercentile, genes are removed that are below a certain variance magnitude. This is helpful before running certain algorithms, such as the popular Combat batch normalization technique, that can throw errors if genes with extremely low variances are in the data matrix. May be used in conjunction with maxVar or in isolation.
Examples
#load up our datasets
curatedBreastDataExprSetList <- getCuratedBreastDataExprSetList(test=TRUE)
#just take top 100 genes by variance
#this will post-process every dataset in the package
#to make them ready for downstream analyses.
proc_curatedBreastDataExprSetList <- processExpressionSetList(
exprSetList=curatedBreastDataExprSetList,
outputFileDirectory = tempdir(), numTopVarGenes=100)
#>
#> Analyzing dataset 1 or dataset named study_1379_GPL1223_all
#>
#> Note: this function assumes your missing values
#> are proper NAs, not "null",etc.
#> It's best to impute NA values before running this function
#> otherwise it may set averages to NA if there is 1 NA present.
#> This function just removes any genes whose key is NA.
#>
#> You may get a notification here because key (usually gene) names are
#> duplicated so it can't use them as row names.
#> That's OK, because we are immediately collapsing them into one feature.
#>
#> Starting with 30patients.
#> found no multiple samples from the same patient(s)
#>
#> Analyzing dataset 2 or dataset named study_2034_GPL96_all
#>
#> Note: this function assumes your missing values
#> are proper NAs, not "null",etc.
#> It's best to impute NA values before running this function
#> otherwise it may set averages to NA if there is 1 NA present.
#> This function just removes any genes whose key is NA.
#>
#> You may get a notification here because key (usually gene) names are
#> duplicated so it can't use them as row names.
#> That's OK, because we are immediately collapsing them into one feature.
#>
#> Starting with 30patients.
#> found no multiple samples from the same patient(s)