kharchenkolab / numbat

Haplotype-aware CNV analysis from single-cell RNA-seq
https://kharchenkolab.github.io/numbat/
Other
156 stars 22 forks source link

Error in mutate(., state = run_allele_hmm ... Not a matrix #177

Closed whitneyt1 closed 1 month ago

whitneyt1 commented 2 months ago

log.txt Hello, When running numbat on cryo Visium sections, I receive this error

ERROR [2024-03-07 23:14:10] Error in mutate(., state = run_allele_hmm(pAD = pAD, DP = DP, p_s = p_s,  : 
  [1m[22m[36mℹ[39m In argument: `state = run_allele_hmm(...)`.
[36mℹ[39m In group 10: `CHROM = 10`.
[1mCaused by error:[22m
[33m![39m Not a matrix.

I have attached the full log.txt file

I receive this error for a number of sections. My reference is a tumor-adjacent normal visium reaction with no tumor as verified by a pathologist.

Is there any recommendation to get past this error?

Additionally, should I change any of my phasing parameters?

Thank you!

whitneyt1 commented 1 month ago

hi @teng-gao

I have figured out that this occurs when running main() > run_groups_hmm() > analyze_bulk() > find_common_diploid() > run_allele_hmm_s5() because when the bulks object is `bulks %>% split(.$sample) %>% ... %>% group_by(CHROM) for some chromosomes, Screen Shot 2024-04-03 at 4 00 49 PM

my pAD column is empty. Do you have any advice on how to skip and continue on with the hmm instead of this completely stopping the final bulk clone assignment?

whitneyt1 commented 1 month ago

I identified that I was following the mouse tutorial for human spatial data and did not phase my human data appropriately as per the "Getting Started" vignette. After running pileup_and_phase.R correctly, it resolved this issue.