calcPhenotype: This function predicts a phenotype (drug sensitivity score)...

calcPhenotypeR Documentation

This function predicts a phenotype (drug sensitivity score) when provided with microarray or bulk RNAseq gene expression data of different platforms. The imputations are performed using ridge regression, training on a gene expression matrix where phenotype is already known. This function integrates training and testing datasets via a user-defined procedure, and power transforming the known phenotype.

Description

This function predicts a phenotype (drug sensitivity score) when provided with microarray or bulk RNAseq gene expression data of different platforms. The imputations are performed using ridge regression, training on a gene expression matrix where phenotype is already known. This function integrates training and testing datasets via a user-defined procedure, and power transforming the known phenotype.

Usage

calcPhenotype(
  trainingExprData,
  trainingPtype,
  testExprData,
  batchCorrect,
  powerTransformPhenotype = TRUE,
  removeLowVaryingGenes = 0.2,
  minNumSamples,
  selection = 1,
  printOutput,
  pcr = FALSE,
  removeLowVaringGenesFrom,
  report_pc = FALSE,
  cc = FALSE,
  percent = 80,
  rsq = FALSE
)

Arguments

trainingExprData

The training data. A matrix of expression levels. rownames() are genes, colnames() are samples (cell line names or cosmic ides, etc.). rownames() must be specified and must contain the same type of gene ids as "testExprData"

trainingPtype

The known phenotype for "trainingExprData". This data must be a matrix of cell lines/rows or cosmic ids/rows x drugs/columns. This matrix can contain NA values, that is ok (they are removed in the calcPhenotype() function).

testExprData

The test data where the phenotype will be estimated. It is a matrix of expression levels, rows contain genes and columns contain samples, "rownames()" must be specified and must contain the same type of gene ids as "trainingExprData".

batchCorrect

How should training and test data matrices be homogenized. Choices are "eb" (default) for ComBat, "qn" for quantiles normalization or "none" for no homogenization.

powerTransformPhenotype

Should the phenotype be power transformed before we fit the regression model? Default to TRUE, set to FALSE if the phenotype is already known to be highly normal.

removeLowVaryingGenes

What proportion of low varying genes should be removed? 20 percent be default

minNumSamples

How many training and test samples are required. Print an error if below this threshold

selection

How should duplicate gene ids be handled. Default is -1 which asks the user. 1 to summarize by their or 2 to disguard all duplicates.

printOutput

Set to FALSE to supress output.

pcr

Indicates whether or not you'd like to use pcr for feature (gene) reduction. Options are 'TRUE' and 'FALSE'. If you indicate 'report_pc=TRUE' you need to also indicate 'pcr=TRUE'

removeLowVaringGenesFrom

Determine method to remove low varying genes. Options are 'homogenizeData' and 'rawData'.

report_pc

Indicates whether you want to output the training principal components. Options are 'TRUE' and 'FALSE'.

cc

Indicate if you want correlation coefficients for biomarker discovery.

percent

Indicate percent variability (of the training data) you'd like principal components to reflect if pcr=TRUE. Default is 80 for 80% These are the correlations between a given gene of interest across all samples vs. a given drug response across samples. These correlations can be ranked to obtain a ranked correlation to determine highly correlated drug-gene associations.

rsq

Indicate whether or not you want to output the R^2 values for the data you train on from true and predicted values. These values represent the percentage in which the optimal model accounts for the variance in the training data. Options are 'TRUE' and 'FALSE'.

Value

.txt files will be saved into your working directory. Depending on the parameter specified, the .txt file outputs of this function can include the estimated phenotype/sensitivity predictions, the R^2 data, and the correlation coefficients. Principal components are stored as .RData files for each drug in your drug dataset.

Examples


try(calcPhenotype(trainingExprData=trainingExprData,
trainingPtype=trainingPtype,
testExprData=testExprData,
batchCorrect=batchCorrect,
powerTransformPhenotype=powerTransformPhenotype,
removeLowVaryingGenes=removeLowVaryingGenes,
minNumSamples=minNumSamples,
selection=selection,
printOutput=printOutput,
pcr=pcr,
removeLowVaringGenesFrom=removeLowVaringGenesFrom,
report_pc=report_pc,
cc=cc,
percent=percent,
rsq=rsq))


maese005/oncoPredict documentation built on Sept. 13, 2023, 2:57 p.m.