ConfigFeatures: QcConfigFeatures

ConfigFeaturesR Documentation

QcConfigFeatures

Description

See the example feature config file system.file(package = "ssvQC", "extdata/ssvQC_peak_config.csv").

Usage

ConfigFeatures(
  config_df,
  run_by = "All",
  to_run = NULL,
  to_run_reference = NULL,
  color_by = "file",
  color_mapping = NULL,
  feature_load_FUN = NULL,
  n_peaks = 1000,
  balance_groups = FALSE,
  overlap_extension = 0,
  consensus_fraction = getOption("SQC_CONSENSUS_FRACTION", 0),
  consensus_n = getOption("SQC_CONSENSUS_N", 1),
  process_features = getOption("SQC_PROCESS_FEATURES", TRUE),
  is_null = FALSE
)

Arguments

config_df

data.frame defining configuration parameters. At a minimum, paths to valid files in either the first column or a column named "file". Additional columns defined by color_by and run_by parameters have a big impact on the configuration.

run_by

character that defines the column of config_df that groups the features. The default of "All" will simply group all features into a single comparison.

to_run

group name to run

to_run_reference

group name to included in all runs

color_by

character that defines the column of config_df that controls color mapping. The default of "file" will assign a unique color to every feature set.

color_mapping

named character vector that maps values of color_by to valid R colors, i.e. "red" or "#FF0000".

feature_load_FUN

function that takes a vector of file paths and returns list of GRanges.

n_peaks

number of peaks to subset for

balance_groups

If TRUE, will attempt to represent imbalanced groups more equally

overlap_extension

bp to extends regions by before calculating overlaps

consensus_fraction

A numeric between 0 and 1 specifying the fraction of grs that must overlap to be considered consensus.

consensus_n

An integer number specifying the absloute minimum of input grs that must overlap for a site to be considered consensus.

process_features

if TRUE, features are loaded and overlapped to generate assement regions as part of creating QcConfigFeatures object

is_null

if TRUE this object will be treated as NULL

Details

Or create a config file using QcConfigFeatures.save_config after making one using a different method.

Value

QcConfigFeatures object

QcConfigFeatures object

a QcConfigFeatures object

A QcConfigFeatures object

Invisibly returns path to written config file.

Slots

feature_load_FUN

function.

n_peaks

numeric.

consensus_fraction

numeric.

consensus_n

numeric.

Examples

feature_config_file = system.file(package = "ssvQC", "extdata/ssvQC_peak_config.csv")
config_df = .parse_config_body(feature_config_file)
config_df$file = file.path(system.file(package = "ssvQC", "extdata"), config_df$file)
feature_conf = QcConfigFeatures(config_df, process_features = TRUE)
QcConfigFeatures.null()
np_files = dir(system.file(package = "ssvQC", "extdata"), pattern = "Peak$", full.names = TRUE)
object = QcConfigFeatures.files(np_files, balance_groups = TRUE)
object = ssvQC.prepFeatures(object)
plot(object)

object = QcConfigFeatures.files(np_files, 
  group_names = c("10A", "AT1", "CA1"), 
  sample_names = c("MCF10A_CTCF", "MCF10AT1_CTCF", "MCF10CA1a_CTCF"))
object = ssvQC.prepFeatures(object)
plot(object)
feature_config_file = system.file(package = "ssvQC", "extdata/ssvQC_peak_config.csv")
object = QcConfigFeatures.parse(feature_config_file)
plot(object)
feature_config_file = system.file(package = "ssvQC", "extdata/ssvQC_peak_config.csv")
feature_config = QcConfigFeatures.parse(feature_config_file)

jrboyd/seqtsne documentation built on Nov. 5, 2022, 6:37 a.m.