Obtain a single integration matrix from individual quantification matrices.
Source:R/utility-functions.R
comparison_matrix.Rd
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
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
))
#> # A tibble: 4 × 6
#> chr integration_locus strand CompleteAmplificationID fragmentEstimate
#> <chr> <dbl> <chr> <chr> <dbl>
#> 1 1 45324 + ID1 56.8
#> 2 2 52423 - ID1 78.3
#> 3 6 54623 - ID2 123.
#> 4 X 12314 + ID3 5.34
#> # ℹ 1 more variable: seqCount <dbl>