Skip to content

Results depend on the ordering of the input fasta #160

@jchorl

Description

@jchorl

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions