View source: R/compMat_to_FCS.R
compMat_to_fcs | R Documentation |
When a compensation matrix is made in flowjo it only exists in the workspace. It is applied like a mask on the fcs file. In case the workspace is lost or gets corrupted, the compensation matrix is lost. To avoid that one may want to hard-code the matrix into the fcs-file. This function takes a csv file of a compensation matrix as exported from flowjo and writes it into the SPILL-keyword of a fcs file. Moreover, a full compensation matrix is generated: You may have noticed that a compensation matrix purely generated in flowjo is not complete - spillover into channels can only be assigned for existing compensation controls. This is different to a matrix generated by BDs DIVA software where spillover into all channels can be assigned, no matter if for respective channel a compensation control was recorded. E.g. for a live/dead-channel we are generally only interested in spillover into the channel, not which spillover comes out of it, as dead cells are not of interest in most cases.
compMat_to_fcs(
fcs_file_path,
compMat_file_path,
max_match_dist = 1,
skip_check = F
)
fcs_file_path, |
character, file path to the fcs file |
compMat_file_path |
character, file path to the csv file of the compensation matrix |
max_match_dist |
numeric, maximum string distance for matching channel names using utils::adist |
skip_check |
logical, whether to ask for confirmation by the user if channel names were matched correctly |
no return but an fcs file with an updated compensation matrix (SPILL keyword) on disk
## Not run:
compMat_to_fcs(fcs_file_path = "myfolder/my_file.fcs",
compMat_file_path = "myfolder/compmat_export_from_flowjo.csv")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.