subsetMainMat: subset main expression mat

Description Usage Arguments Details Value

View source: R/aheatmat.R

Description

this can be used to subset genes, extract effective columns in augMat, and further subset columns.

Usage

1
2
subsetMainMat(mat, gSel = NULL, sSel0 = NULL, cluster_rows, cluster_cols,
  sSel1 = NULL, colOrderIndex = NULL, rowOrderIndex = NULL)

Arguments

mat

matrix for heatmap

gSel

gene selection (global index or gene names). This can be index or gene names. Internally, both will be converted to integer based index (global or local)

sSel0

sample selection filter 0; by default, this deals with augMat to remove all NA columns the user can override this by supplying a vector of indeces or sample names.

cluster_rows

whether to draw row clusters

cluster_cols

whether to draw column clusters

sSel1

sample selection (index or sample names). This is useful to select a subset of samples based on phenotype, i.e. some mutation, like ++ to be removed

colOrderIndex

index/sample names to order column (global index or sample names); The actual number of samples surviving is an intersect between colOrderIndex and sSel (from sSel0 and sSel1). if not specified, column clustering will be instructed to construct; otherwise, no clumn clustering will be done later on

rowOrderIndex

index (integer or gene names) to order rows; The actual genes surviving is an intersect between rowOrderIndex and gSel. if not specified, row clustering will be instructed to construct; otherwise, no row clustering will be done later on

Details

Users can subset samples through two selectors: sSel0 and sSel1. However, sSel0 is primarily preserved to select effective samples after data augmentation. sSel1 is for subsetting. colOrderIndex can be used to sort the samples (columns). The final samples presented is the intersection between sSel0, sSel1 and colOrderIndex. Notice that when index is provided, it is assumed to be global index for easy tracking (both gSel and sSel0, sSel1 and colOrderIndex). Provoding sample name or gene name in the form of rownames or colnames also works.

Value

expression matrix with attributes gSel, sSel and so on


nickytong/GenAnalysis documentation built on July 20, 2019, 8:57 a.m.