-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Thanks for the great tool!
#159 addresses unstable ordering when sorting contig-link counts.
When assigning contigs to clusters, it feels the priority should be correctness, and then stability. One option is to always sort the fasta before processing begins. While that would provide stability across different-ordered-fastas, it doesn't necessarily provide correctness (what's to say whether ascending or descending sort would yield more correct results). Therefore it seems that for each method of assigning contigs to clusters, the correct ordering might be subtly different. For low linkage contigs, I think it makes sense to prioritize lower link count and use cluster score as a tie-breaker.
In the case of assigning based on high-confidence references, there can also be ties for the reference scores, which can impact cluster assignment. Here are some example reference scores:
('JX627737', 103233.0),
('NC_019424', 103233.0),
...
('JX981514', 52572.0),
('NC_022105', 52572.0),
('CP011290', 52532.0),
('CP011293', 52532.0),
assign_contigs_to_clusters is fairly complex, assigning contigs to clusters based on many different criteria. I'm curious if you've given thought to make assignment correct/stable, regardless of the order of the input fasta. Happy to help here!