see code below to duplicate the error. I think we would want the quantile_dist to return NA for the specific image that does not contain the mask type but still return the quantile_dist for other images.
creating fake data with slide A containing just 2 types and slide B containing all 3 types
x <- runif(100,-50,50)
y <- runif(100,-50,50)
sid<-c(rep("A",50),rep("B",50))
typesA<-sample(rep_len(sample(paste0("X",1:2)),50))
typesB<-sample(rep_len(sample(paste0("X",1:3)),50))
types<-c(typesA,typesB)
exp <- new_MltplxExperiment(x,y,types,sid)
exp <- update_intensity(exp,ps=2,bw=3)
from<-c(0,50)
to<-c(50,100)
q_probs<-cbind.data.frame(from,to)
want quantile dist with X3 as mask type but X3 is not in image A
see code below to duplicate the error. I think we would want the quantile_dist to return NA for the specific image that does not contain the mask type but still return the quantile_dist for other images.
creating fake data with slide A containing just 2 types and slide B containing all 3 types
x <- runif(100,-50,50) y <- runif(100,-50,50) sid<-c(rep("A",50),rep("B",50)) typesA<-sample(rep_len(sample(paste0("X",1:2)),50)) typesB<-sample(rep_len(sample(paste0("X",1:3)),50)) types<-c(typesA,typesB) exp <- new_MltplxExperiment(x,y,types,sid) exp <- update_intensity(exp,ps=2,bw=3) from<-c(0,50) to<-c(50,100) q_probs<-cbind.data.frame(from,to)
want quantile dist with X3 as mask type but X3 is not in image A
add_QuantileDist(exp,cor,mask_type = "X3",q_probs)