cqc_match_update: Manual update/delete the match report

Description Usage Arguments Details Examples

View source: R/cqc_match.R

Description

There are cases that the automatic string match from ‘cqc_match' can’t resolve. This function provides the remedy to manually update the match result.

Usage

1
2
3
4
5
cqc_match_update(x, map, group_id = NULL)

cqc_match_delete_unmatched(x, map, group_id = NULL)

cqc_match_remove(x, map, group_id = NULL)

Arguments

x

'cqc_match_result_and_solution' object generated by "cqc_match"

map

For cqc_match_update, it is a named vector that provides the paired strings(i.e. old value vs new value). For cqc_match_remove or cqc_match_delete_unmatched, it is a character vector that provides the items to be removed from matched pairs or mark the unmatched items for deletion.

group_id

the group to update. If NULL, then operate on all groups

Details

cqc_match_update() matches the items from target groups to the reference by the named vector through 'map' argument. cqc_match_remove() undo the matching that are produced either from cqc_match_update or cqc_match() cqc_match_delete_unmatched() forces the unmatched items marked for deletion.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
fcs_files <- list.files(system.file("extdata", "GvHD_QC", package = "cytoqc"), full.names = TRUE)
qc_cf_list <- cqc_load_fcs(fcs_files)
groups <- cqc_check(qc_cf_list, type = "marker")
match_result <- cqc_match(groups, ref = 3)

# add the matching pairs to the auto-matching results
match_result <- cqc_match_update(match_result, map = c("PTPRC PE" = "CD45 PE"), group_id = 5)

# You can delete any match added manually or automatically by cqc_match
match_result <- cqc_match_remove(match_result, "PTPRC PE", group_id = 5)

# or mark selected items for deletion
#match_result <- cqc_drop_unmatched(match_result, "PTPRC PE", group_id = 5)

# You can also omit the group_id to apply to all groups
match_result <- cqc_match_update(match_result, map = c("PTPRC PE" = "CD45 PE"))

RGLab/cytoqc documentation built on Nov. 25, 2020, 11:27 p.m.