GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — toConciseAlignmentString is non-deterministic · Issue #907 · biojava/biojava

toConciseAlignmentString is non-deterministic #907

New issue
Copy link
New issue
Copy link
Open
Open
toConciseAlignmentString is non-deterministic#907
Copy link

Description

@sbliven
sbliven
opened on Dec 7, 2020
Issue body actions

In #906, @Vidishab18 showed some test cases using AlignmentTools.toConciseAlignmentString can produce different results depending on HashMap iteration order.

The method takes an alignment map (a way of representing a pairwise alignment as a map between residue indices) and outputs a string representation. The representation is not unique. For instance "1>2>3>2 4>3" and "4>3 1>2>3>2" are the same alignment. Likewise, "1>2>1" and "2>1>2" are the same alignment. Outputs potentially hinge on the enumeration order of the underlying map.

Possible solutions:

  1. Create a canonical form (e.g. sorted some way). I'm not sure whether this is feasible; general graph canonization is computationally hard, but perhaps the special structure of alignment graphs gives an obvious order
  2. Use a SortedMap (TreeMap) internally. This should make it deterministic, although perhaps not in a simple form
  3. Merge Fixing flaky test in AlignmentToolsTest.java #906, which apparently fixes the tests even though it leaves the function itself unchanged.

The method was intended as a concise human-readable output of the map, so the order doesn't really matter. Option 2 appears to be the simplest solution. Performance on this method is not critical.

Activity

  1. sbliven
    added a commit that references this issue on Dec 7, 2020

    Ensure deterministic order in toConciseAlignmentString

    This issue will close once commit 1fe5059 is merged into the 'master' branch.
    1fe5059
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.