comparison_matrix: Obtain a single integration matrix from individual...

View source: R/utility-functions.R

comparison_matrixR Documentation

Obtain a single integration matrix from individual quantification matrices.

Description

[Stable] Takes a list of integration matrices referring to different quantification types and merges them into a single data frame with multiple value columns, each renamed according to their quantification type of reference.

Usage

comparison_matrix(
  x,
  fragmentEstimate = "fragmentEstimate",
  seqCount = "seqCount",
  barcodeCount = "barcodeCount",
  cellCount = "cellCount",
  ShsCount = "ShsCount",
  value_col_name = "Value"
)

Arguments

x

A named list of integration matrices, ideally obtained via import_parallel_Vispa2Matrices. Names must be quantification types in quantification_types().

fragmentEstimate

The name of the output column for fragment estimate values

seqCount

The name of the output column for sequence count values

barcodeCount

The name of the output column for barcode count values

cellCount

The name of the output column for cell count values

ShsCount

The name of the output column for Shs count values

value_col_name

Name of the column containing the corresponding values in the single matrices

Value

A single data frame

See Also

quantification_types

Other Utilities: as_sparse_matrix(), enable_progress_bars(), export_ISA_settings(), generate_Vispa2_launch_AF(), generate_blank_association_file(), generate_default_folder_structure(), import_ISA_settings(), separate_quant_matrices(), transform_columns()

Examples

sc <- tibble::tribble(
    ~chr, ~integration_locus, ~strand, ~CompleteAmplificationID, ~Value,
    "1", 45324, "+", "ID1", 543,
    "2", 52423, "-", "ID1", 42,
    "6", 54623, "-", "ID2", 67,
    "X", 12314, "+", "ID3", 8
)
fe <- tibble::tribble(
    ~chr, ~integration_locus, ~strand, ~CompleteAmplificationID, ~Value,
    "1", 45324, "+", "ID1", 56.76,
    "2", 52423, "-", "ID1", 78.32,
    "6", 54623, "-", "ID2", 123.45,
    "X", 12314, "+", "ID3", 5.34
)
comparison_matrix(list(
    fragmentEstimate = fe,
    seqCount = sc
))

calabrialab/ISAnalytics documentation built on Nov. 2, 2023, 8:57 p.m.