ssvQC.removeFeatures: ssvQC.selectFeatures

View source: R/ssvQC_select.R

ssvQC.selectFeaturesR Documentation

ssvQC.selectFeatures

Description

ssvQC.selectFeatures

ssvQC.removeFeatures

Usage

ssvQC.selectFeatures(
  sqc,
  ids = NULL,
  grs = NULL,
  features_name = NULL,
  invert = FALSE
)

ssvQC.removeFeatures(
  sqc,
  ids = NULL,
  grs = NULL,
  features_name = NULL,
  invert = FALSE
)

Arguments

sqc

A valid ssvQC object after clustering by ssvQC.prepSignal

ids

region ids.

grs

GRanges to use to fine region ids.

invert

If true, flip removal to selection and vice versa.

Value

ssvQC object with selected regions removed.

Examples

library(ssvQC)
options(mc.cores = 1)
set.seed(0)
features_config_file = system.file(package = "ssvQC", "extdata/ssvQC_peak_config.csv")
features_config = QcConfigFeatures.parse(features_config_file)

bam_config_file = system.file(package = "ssvQC", "extdata/ssvQC_bam_config.csv")
bam_config = QcConfigSignal.parse(bam_config_file)

sqc.complete.file = ssvQC(features_config_file, bam_config_file)

sqc.complete = ssvQC(features_config, bam_config)
sqc = ssvQC.runAll(sqc.complete)
ids = c("region_1", "region_2")
grs = NULL
invert = FALSE
features_name = NULL

sqc$plots$SCC$dots

#removal
sqc.filtered = ssvQC.removeFeatures(sqc, ids = c("region_1", "region_2"))

sqc.filtered2 = ssvQC.removeFeatures(sqc.filtered, ids = c("region_1", "region_2"))

sqc.filtered.inv = ssvQC.removeFeatures(sqc, ids = c("region_1", "region_2", "region_3", "region_4", "region_5"), invert = TRUE)

sqc.filtered.gr = ssvQC.removeFeatures(sqc, grs = GRanges(paste0("chr", 1:16), IRanges(1, 1e9)))
sqc.filtered.gr$features_config$assessment_features
sqc.filtered.gr$plots$signal$heatmaps
sqc.filtered.gr$plots$SCC$dots

sqc.filtered.gr_inv = ssvQC.removeFeatures(sqc, grs = GRanges(paste0("chr", 1:16), IRanges(1, 1e9)), invert = TRUE)
sqc.filtered.gr_inv$features_config$assessment_features
sqc.filtered.gr_inv$plots$signal$heatmaps
sqc.filtered.gr_inv$plots$SCC$dots

# selection
sqc.selected = ssvQC.selectFeatures(sqc, ids = c("region_1", "region_2", "region_3", "region_4", "region_5"))

sqc.selected2 = ssvQC.selectFeatures(sqc.selected, ids = c("region_1", "region_2", "region_3", "region_4", "region_5"))

sqc.selected.inv = ssvQC.selectFeatures(sqc, ids = c("region_1", "region_2", "region_3", "region_4", "region_5"), invert = TRUE)

sqc.selected.gr = ssvQC.selectFeatures(sqc, grs = GRanges(paste0("chr", 1:16), IRanges(1, 1e9)))
sqc.selected.gr$features_config$assessment_features
sqc.selected.gr$plots$signal$heatmaps
sqc.selected.gr$plots$SCC$dots

sqc.selected.gr_inv = ssvQC.selectFeatures(sqc, grs = GRanges(paste0("chr", 1:16), IRanges(1, 1e9)), invert = TRUE)
sqc.selected.gr_inv$features_config$assessment_features
sqc.selected.gr_inv$plots$signal$heatmaps
sqc.selected.gr_inv$plots$SCC$dots


FrietzeLabUVM/ssvQC documentation built on March 25, 2024, 12:24 a.m.