ParkerICI / premessa

R package for pre-processing of mass and flow cytometry data
GNU General Public License v3.0
42 stars 24 forks source link

panel editor does not report missing parameters #12

Closed SamGG closed 6 years ago

SamGG commented 6 years ago

The panel editor is a very interesting tool. Thanks for delivering it.

Whereas the orange color is dedicated to highlight missing parameters, missing parameters are currently colored in pink. This seems to be due to that the 'NA' keyword is not present in such cells of the table. It may be due to a change in handsometable.

Anyway, I think the code could force the resulting from the merge function to be coded as 'NA'. Alternatively, I would suggest that NA should be replaced with a more informative word such as 'missing' or 'absent'.

https://github.com/ParkerICI/premessa/blob/b3e949e371365d531ea762cabb4b54cf9c56d41a/R/paneleditor_helpers.R#L33

pfgherardini commented 6 years ago

Hi

I am not sure I understand what you are referring to... Can you send me a couple of example FCS files that reproduce the behaviour you are describing?

Thanks

Federico

SamGG commented 6 years ago

Thanks for your reply. Please do find a minimal code to reproduce the following illustration, as well as the FCS files. The documentation says "If a parameter is missing from a file, an NA is displayed in the corresponding cell, which will be colored orange.". In the current display, there is no orange, although FL4-H and Time are missing from some FCS. The orange colour is set when the cell contains NA, but NA is not set as the value of those cells that should report the parameters as missing. As a feature, a link to the online documentation of the panel editor would help me.

# Configure
temp.dir = "C:/temp"

# write some files
library(flowCore)
packageVersion("flowCore")
data("GvHD")
GvHD

# rename a channel from 1st file
F1 = GvHD[[1]]
F1
markernames(F1) = c("FL2-A" = "FL2")
markernames(F1)
write.FCS(F1, file.path(temp.dir,"F1.fcs"))

# keep 6 first channels from other files
write.FCS(GvHD[[2]][, 1:6], file.path(temp.dir,"F2.fcs"))
write.FCS(GvHD[[3]][, 1:6], file.path(temp.dir,"F3.fcs"))

library(premessa)
paneleditor_GUI()

2018-05-09_160526

temp-premessa.zip

pfgherardini commented 6 years ago

I have fixed this in the latest version. Thanks for reporting!

SamGG commented 6 years ago

Thanks for quick fix.