carmonalab / GeneNMF

Methods to discover gene programs on single-cell data
47 stars 1 forks source link

Programs don't assign to metaprogram #8

Closed Li-ZhiD closed 3 weeks ago

Li-ZhiD commented 3 weeks ago

Hi, Nice package! I have five 10X visium expression data, only a part of programs were clustered to be metaprogram after running GeneNMF, but the rest also show high similarity. Is there something wrong?

Thank you!

stRNA <-
  NormalizeData(
      object = stRNA,
      normalization.method = "LogNormalize",
      scale.factor = 10000
    ) %>%
    FindVariableFeatures(
      object = .,
      selection.method = "vst",
      nfeatures = 2000
    )
stRNA_lst <-
  SplitObject(
    stRNA,
    split.by = "Chip.ID"
  )
geneNMF <-
  multiNMF(
    stRNA_lst,
    assay = "RNA",
    slot = "data",
    k = 4:12,
    L1 = c(0, 0),
    do_centering = TRUE,
    nfeatures = 2000
  )
geneNMF_meta <-
  getMetaPrograms(
    geneNMF,
    nprograms = 8,
    max.genes = 50,
    hclust.method = "ward.D2",
    min.confidence = 0.2
  )
plotMetaPrograms(geneNMF_meta, jaccard.cutoff = c(0, 0.8))

image

mass-a commented 3 weeks ago

Hello, your results look fine to me. You have 7 MPs with quite high jaccard score, and then a large block (to the right in your heatmap) with little internal similarity. This block of programs was probably dropped because there were no marker genes found across enough programs. If you think you are missing some important MP, you may try to play with the parameters of getMetaPrograms, e.g. by asking for a larger number of MPs (nprograms) or by lowering the confidence score (min.confidence).

Li-ZhiD commented 3 weeks ago

Thank you! The results after adjusting 'nprograms' looks nice.