Learn R Programming

iSubGen (version 1.0.4)

create.autoencoder.irf.matrix: Create matrix of independent reduced features

Description

Create matrix of independent reduced features using autoencoders

Usage

create.autoencoder.irf.matrix(data.types, data.matrices,
autoencoders, filter.to.common.patients = FALSE,
patients.to.return = NULL)

Value

matrix where rows are patients and columns are pairs of data types

Arguments

data.types

vector, where each element is a data type ID matching the names in data.matrices and dist.metrics

data.matrices

list, where each element is a matrix with features as rows and patients as columns

autoencoders

list, where each element is an autoencoder corresponding to each data type. Can be either an keras autoencoder object or the file where the autoencoder was saved.

filter.to.common.patients

logical, where TRUE indicates to filter out patients that don't have all data types.

patients.to.return

vector of patients to return correlations for. If NULL all patients/columns will be used.

Author

Natalie Fox

Examples

Run this code
if (FALSE) {

# Load three data types and create an autoencder for each
example.molecular.data.dir <- paste0(path.package('iSubGen'),'/exdata/');
molecular.data <- list();
ae.result <- list();
for (i in c('cna','snv','methy')) {
  molecular.data[[i]] <- load.molecular.aberration.data(
    paste0(example.molecular.data.dir,i,'_profiles.txt'),
    patients = c(paste0('EP00',1:9), paste0('EP0',10:30))
    );
  ae.result[[i]] <- create.autoencoder(
    data.type = i,
    data.matrix = molecular.data[[i]],
    encoder.layers.node.nums = c(10,2)
    )$autoencoder;
  }

# Create a matrix of the bottleneck layers
irf.matrix <- create.autoencoder.irf.matrix(
  data.types = names(molecular.data),
  data.matrices = molecular.data,
  autoencoders = ae.result
  );
}

Run the code above in your browser using DataLab