exclude_features_scExp: Remove specific features (CNA, repeats)

View source: R/preprocessing_filtering_reduction.R

exclude_features_scExpR Documentation

Remove specific features (CNA, repeats)

Description

Remove specific features (CNA, repeats)

Usage

exclude_features_scExp(
  scExp,
  features_to_exclude,
  by = "region",
  verbose = TRUE
)

Arguments

scExp

A SingleCellExperiment object.

features_to_exclude

A GenomicRanges object or data.frame containing genomic regions or features to exclude or path towards a BED file containing the features to exclude.

by

Type of features. Either 'region' or 'feature_name'. If 'region', will look for genomic coordinates in columns 1-3 (chr,start,stop). If 'feature_name', will look for a genes in first column. ('region')

verbose

(TRUE)

Value

A SingleCellExperiment object without features to exclude.

Examples


raw <- create_scDataset_raw()
scExp = create_scExp(raw$mat, raw$annot)
features_to_exclude = data.frame(chr=c("chr4","chr7","chr17"),
start=c(50000,8000000,2000000),
end=c(100000,16000000,2500000))
features_to_exclude = as(features_to_exclude,"GRanges")
scExp = exclude_features_scExp(scExp,features_to_exclude)
scExp


vallotlab/ChromSCape documentation built on Oct. 15, 2023, 1:47 p.m.