marschall-lab / strand-seq-graph-phasing

MIT License
6 stars 1 forks source link

Error in rule count_haplotype_markers #54

Open nidhi12k opened 3 weeks ago

nidhi12k commented 3 weeks ago

Hello, I am running this pipeline on a hifiasm (v0.19.5) assembly and encountered an error in the rule count_haplotype_markers. Below is the error message:

Creating a new cluster: (C1.7)40 with members: utg000233l, utg012382l, sim: 0.822358665594437
Creating a new cluster: (C1.7)41 with members: utg004332l, utg017412l, sim: 0.78491744796882
Creating a new cluster: (C1.7)42 with members: utg002706l, utg009353l, sim: 0.718917665706054
Creating a new cluster: (C1.7)43 with members: utg003457l, utg003550l, sim: 0.691540887386546
Merging  (C1.7)0  into  (C1.7)22 , cosine similarity:  0.8311097 
Merging  (C1.7)15  into  (C1.7)27 , cosine similarity:  0.8122068 
Merging  (C1.7)12  into  (C1.7)25 , cosine similarity:  0.7833042 
Merging  (C1.7)11  into  (C1.7)14 , cosine similarity:  0.7779648 
Merging  (C1.7)17  into  (C1.7)7 , cosine similarity:  0.7636204 
Merging  (C1.7)14  into  (C1.7)37 , cosine similarity:  0.7540062 
Merging  (C1.7)18  into  (C1.7)29 , cosine similarity:  0.7455664 
Merging  (C1.7)3  into  (C1.7)33 , cosine similarity:  0.7395661 
Merging  (C1.7)23  into  (C1.7)30 , cosine similarity:  0.677555 
Error in `bind_rows()`:
! Can't combine `..1$cluster` <logical> and `..2$cluster` <character>.
Backtrace:
     ▆
  1. ├─anti_join(cluster_df, cluster_df2, by = "unitig") %>% ...
  2. ├─dplyr::bind_rows(., cluster_df2)
  3. │ └─vctrs::vec_rbind(!!!dots, .names_to = .id, .error_call = current_env())
  4. └─vctrs (local) `<fn>`()
  5.   └─vctrs::vec_default_ptype2(...)
  6.     ├─base::withRestarts(...)
  7.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
  8.     │   └─base (local) doWithOneRestart(return(expr), restart)
  9.     └─vctrs::stop_incompatible_type(...)
 10.       └─vctrs:::stop_incompatible(...)
 11.         └─vctrs:::stop_vctrs(...)
 12.           └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
Execution halted

Any help resolving this would be greatly appreciated! I am happy to provide additional information or details if needed.

mir-cat commented 3 weeks ago

Hi @nidhi12k ! There appears to be an incompatibility regarding an edge-case during clustering, but it is hard to know exactly what the issue is without a little further inspection. Would it be possible for you to share your input files with me? (mir.henglin@gmail.com) I could take a closer look at exactly what is happening in that case.