Nanostring-Biostats / InSituType

An R package for performing cell typing in SMI and other single cell data
Other
29 stars 11 forks source link

when computing profiles at last step, need to handle profiles with no clusters #143

Closed patrickjdanaher closed 2 years ago

patrickjdanaher commented 2 years ago

This happens at the end of insitutypeML, and maybe elsewhere, causing an error.

These lines:

  profiles <- Estep(counts, 
                    clust = clust,
                    neg = neg)
  profiles <- profiles[, colnames(logliks)]

Options for handling this:

  1. just don't include profiles of missing clusters (in which case they won't align to logliks, causing flightpath trouble) -- then should we output 2 loglik matrices, e.g. "logliks" and "logliks_including_lost_clusters"?
  2. include the original fixedprofiles values for missing clusters -- potentially with NAs for missing genes. -- or potentially removing genes that are NA in the original fixedprofiles

... is there any reason to think we want to keep the complete logliks? Is anyone going to do anything with a lost cluster? Maybe people will want to hack with it, in which case outputting an extra logliks matrix is fine.

patrickjdanaher commented 2 years ago

merged into iss132-cohorting branch