View source: R/unify.FCSheaders.R
unify.FCSheaders | R Documentation |
It checks if FCS files within a specific folder, or indicated in a vector, have the same header (i.e., same channels:markers nomenclature and order) and offer the possibility to unify them creating new ones.
unify.FCSheaders(
filelist = NULL,
directory = getwd(),
pattern = ".fcs$",
dataset = 1,
fix = T,
select.freq = 1,
events = "all",
view = F
)
filelist |
A vector with full path of FCS files to be read, commonly generated through |
directory |
If |
pattern |
Pattern for reading files within |
dataset |
Specify data segment to be read in the FCS file (same behaviour as |
fix |
Logical indicating if user wants to perform the unification of FCS's headers or only display header frecuencies. If |
select.freq |
Of diplayed frequencies (row-numered), indicate which is your option for unifiying FCS files. Default = |
events |
Numeric vector indicating how many events to read in each FCS file (same behaviour as |
view |
Logical indicating whether table with frequencies should be displayed in the terminal or in a external table. Default = |
The final output if fix = F
is a table with three columns: names
for channels, freq
for frequency of apparition of these channel names and length
for number of channels within that frequency.
If fix = TRUE
, those FCS files with a distinct header from selected frequency will be renamed/reordered, added with the suffix fixed.fcs
and the original ones (unchanged) will be stored in a new original_files
folder. In the case a FCS would have a different number of channels, it will moved to a new folder called discarded_files_because_diffs
and dicarded from downstream analysis (this will be changed in the future).
## Not run:
## detect header's frequencies
unify.FCSheaders(directory = "../data/", pattern = "fcs", fix = F)
# names freq length
# 1 FSC-H, SSC-H, FITC-A, PE-A, PerCP-Cy5-5-A, APC-A, APC-H7-A, V500-A, V450-A 12 10
# 2 FSC-H, SSC-H, FITC-A, PE-A, PerCP-C5-A, APC-A, APC-H7-A, Pac-Orange, Pac-Blue 10 10
## unify FCS's headers
unify.FCSheaders(directory = "../data/", pattern = "fcs", fix = T, select.freq = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.