completeMatrix: This function performs an iterative matrix completion...

View source: R/GLDS.R

completeMatrixR Documentation

This function performs an iterative matrix completion algorithm to predict drug response for pre-clinical data when there are missing ('NA') values.

Description

This function performs an iterative matrix completion algorithm to predict drug response for pre-clinical data when there are missing ('NA') values.

Usage

completeMatrix(senMat, nPerms = 50, folder = FALSE)

Arguments

senMat

A matrix of drug sensitivity data with missing ('NA') values. rownames() are samples (e.g. cell lines), and colnames() are drugs.

nPerms

The number of iterations that the EM-algorithm (expectation maximization approach) run. The default is 50, as previous findings recommend 50 iterations (https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-1050-9)

folder

If TRUE, write the completed matrix to complete_matrix_output.txt in the current working directory. The default is FALSE.

Value

A matrix of drug sensitivity scores without missing values. rownames() are samples, and colnames are drugs.

Examples

set.seed(1)
senMat <- matrix(rnorm(80 * 4), nrow=80,
                 dimnames=list(paste0("sample", 1:80), paste0("drug", 1:4)))
senMat[1, 1] <- NA
completed <- completeMatrix(senMat, nPerms=1)
dim(completed)

oncoPredict documentation built on June 29, 2026, 5:07 p.m.