jj_get_feature_mat: extract expression values for features of interest from...

View source: R/jj_get_feature_mat.R

jj_get_feature_matR Documentation

extract expression values for features of interest from feature matrix

Description

extracts gene expression values for a given vector of features of interest

Usage

jj_get_feature_mat(
  feature_mat,
  features,
  fail_on_missing = FALSE,
  use_features_order = TRUE,
  verbose = TRUE
)

Arguments

feature_mat

matrix with n features (rows) and m observations (columns)

features

features for which the values should be extracted from the matrix

fail_on_missing

return error if not all features are found

use_features_order

order the rows in the matrix by the order of features, otherwise just leave the order as in the supplied feature_mat

Examples

mat_use = matrix(1:20, nrow=10, byrow=T)
rownames(mat_use) = LETTERS[1:10]
jj_get_feature_mat(mat_use, c('D','J','A'))
jj_get_feature_mat(mat_use, c('D','J','A', 'Z'),  use_features_order=F)

mathosi/jj documentation built on Feb. 25, 2024, 2:29 p.m.