jj_bind_features_with_dr_df: bind features together with meta.data

View source: R/jj_bind_features_with_dr_df.R

jj_bind_features_with_dr_dfR Documentation

bind features together with meta.data

Description

add values from a matrix/seurat object to data.frame containing metadata (df)

Usage

jj_bind_features_with_dr_df(
  obj,
  assay = "RNA",
  slot = "counts",
  features,
  dr_df = NULL,
  cap_top = NULL,
  cap_bottom = NULL,
  log10Transform = FALSE,
  ...
)

Arguments

obj

Seurat object or matrix of features*samples

assay

assay in Seurat object to use

slot

slot in assay to use

features

Features to extract from obj

dr_df

optional data.frame, which is joined together with the feature matrix

cap_top

value passed to jj_cap_vals

cap_bottom

value passed to jj_cap_vals

log10Transform

if TRUE, return log10 transformed feature values, default: F

Examples

j(jj_bind_features_with_dr_df(pbmc_small, assay='RNA', slot='data', features = c('CD8A', 'CD79A'), cap_top = 'q95'))
red_df = jj_get_reduction_coords(pbmc_small, 'tsne')
head(jj_bind_features_with_dr_df(pbmc_small, features = c('CD8A', 'CD79A'), dr_df=red_df))

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