Mon Nov 02, 2020 5:18 pm by juliam
Hi ALL,
I am running into the problems when I am cleaning up FCS files to have only channels which I am using with the following code
template_file <- read.FCS(filename = "Ep_s1.fcs", column.pattern = c('Y89Di|Pr141Di|Nd142Di|Nd143Di|Nd144Di|Nd146Di|Sm147Di|Nd148Di|Sm149Di|Nd150Di|Eu151Di|Sm152Di|Eu153Di|Sm154Di|Gd155Di|Gd156Di|Tb159Di|Gd160Di|Dy162Di|Dy163Di|Dy164Di|Ho165Di|Er166Di|Er168Di|Tm169Di|Yb171Di|Yb172Di|Yb173Di|Yb176Di|Bi209Di'), header=T, transformation = FALSE, truncate_max_range = FALSE)
write.FCS(template_file, "template_file.fcs")
bar <- read.FCS("template_file.fcs", transform=FALSE, truncate_max_range = FALSE)
all(exprs(template_file) == exprs(bar))
cytofCore.updatePanel(templateFile="template_file.fcs", fcsFolder="to change/")
The problem is that these relabelled files are overwritten, as values in particular channels (after relabelling) are exactly the same ...
> read.FCS(filename = "Ep_s2.fcs")
flowFrame object 'file997451472840'
with 317283 cells and 30 observables:
name desc range minRange maxRange
$P1 Y89Di 89Y_CD45 4096 0 4096
$P2 Pr141Di 141Pr_SPB 32768 0 32768
$P3 Nd142Di 142Nd_CleavedCaspase3 8192 0 8192
$P4 Nd143Di 143Nd_p53_Human 32768 0 32768
$P5 Nd144Di 144Nd_MHC_ClassI 16384 0 16384
$P6 Nd146Di 146Nd_SPC 16384 0 16384
$P7 Sm147Di 147Sm_gH2A.x 8192 0 8192
$P8 Nd148Di 148Nd_CD140ab90.2 32768 0 32768
$P9 Sm149Di 149Sm_p-p65 32768 0 32768
> read.FCS(filename = "Ep_s3.fcs")
flowFrame object 'file997476b9ba7a'
with 294568 cells and 30 observables:
name desc range minRange maxRange
$P1 Y89Di 89Y_CD45 4096 0 4096
$P2 Pr141Di 141Pr_SPB 32768 0 32768
$P3 Nd142Di 142Nd_CleavedCaspase3 8192 0 8192
$P4 Nd143Di 143Nd_p53_Human 32768 0 32768
$P5 Nd144Di 144Nd_MHC_ClassI 16384 0 16384
$P6 Nd146Di 146Nd_SPC 16384 0 16384
$P7 Sm147Di 147Sm_gH2A.x 8192 0 8192
$P8 Nd148Di 148Nd_CD140ab90.2 32768 0 32768
Why is it overwriting?