You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all
After the workshop organized by Désirée Kunkel I gave the multicut approach another try, but for reasons I do not understand, some of my ROIs have NAs in the channels I want to merge, leading to Error in quantile.default(over.one, 0.05) : missing values and NaN's not allowed if 'na.rm' is FALSE
One can patch that by adding na.rm=T whenever write.hdf5 is calculating quantiles within the !is.null(merge.channels) bracket like so (I never tried if all 4 na.rm are needed, I just patched them all at once):
for (u in names(rw.tbl)) {
over.one <- rw.tbl[[u]][rw.tbl[[u]] > 0]
# take NAs out since this seems to crash the function:
rw.tbl[[u]][rw.tbl[[u]] <= quantile(over.one,
0.05, na.rm = TRUE)] <- 0
}
rw.sms <- rowSums(rw.tbl)
# same game here: add all na.rm=T patches the crash:
rw.sms[rw.sms > quantile(rw.sms, 0.95, na.rm = TRUE)] <- quantile(rw.sms, 0.95, na.rm = TRUE)
# same game here: add all na.rm=T patches the crash:
rw.sms[rw.sms <= quantile(rw.sms, 0.05, na.rm = TRUE)] <- 0
The question I got however is, what is the likely cause for NAs in these tiffs? And: Going with na.rm into that function, am I likely to get some weird effects in the merged channel? I didnt check them in ilastik yet (I gotta find 1.3.3post2 first...)
Best, matthias
The text was updated successfully, but these errors were encountered:
Hi,
Just wanted to add to this that I had the same problem... I checked my channels and it seems that in one of them the staining did not work at all, I basically have an empty channel and that was causing the problem. Once I removed that one channel the merging worked perfectly.
Hi, yes that could be the case. I got one channel that I keep in the data that was used in the first few batches but was left empty in later ones. That was mostly the reason for that problem. Thank you so much! @tomashhurst yes these are IMC data
Hi all
After the workshop organized by Désirée Kunkel I gave the multicut approach another try, but for reasons I do not understand, some of my ROIs have NAs in the channels I want to merge, leading to
Error in quantile.default(over.one, 0.05) : missing values and NaN's not allowed if 'na.rm' is FALSE
One can patch that by adding
na.rm=T
whenever write.hdf5 is calculating quantiles within the!is.null(merge.channels)
bracket like so (I never tried if all 4 na.rm are needed, I just patched them all at once):The question I got however is, what is the likely cause for NAs in these tiffs? And: Going with na.rm into that function, am I likely to get some weird effects in the merged channel? I didnt check them in ilastik yet (I gotta find 1.3.3post2 first...)
Best, matthias
The text was updated successfully, but these errors were encountered: