Remove genes show high signal in the background expression data from markers.

remove_bg_exp_mat(sig_mat, bg_mat, markers, snr = 1, gene_id = "SYMBOL")

Arguments

sig_mat

log-transformed expression matrix of interested signal data

bg_mat

log-transformed expression matrix of interested background data

markers

vector, a vector of gene names, listed the gene symbols to be filtered. Must be gene SYMBOLs.

snr

num, the cutoff of SNR to screen markers which are not or lowly expressed in bg_data

gene_id

character, specify the gene ID types of row names of sig_mat and bg_mat data, could be one of 'ENSEMBL', 'SYMBOL', 'ENTREZ'..., default 'SYMBOL'

Value

a vector of genes after filtration

Examples

data("im_data_6", "nk_markers", "ccle_crc_5")
remove_bg_exp_mat(
  sig_mat = Biobase::exprs(im_data_6),
  bg_mat = ccle_crc_5$counts,
  markers = nk_markers$HGNC_Symbol[30:40],
  gene_id = c("ENSEMBL", "SYMBOL")
)
#> 'select()' returned 1:1 mapping between keys and columns
#>  [1] "GRAP2"  "GZMB"   "GNLY"   "FASLG"  "GPR18"  "GZMA"   "GFI1"   "FCGR3B"
#>  [9] "EOMES"  "GPR171" "FCGR3A"