Skip to content

Implement initial SSSOM export - #124

Open
cthoyt wants to merge 7 commits into
sciknoworg:devfrom
cthoyt-forks:sssom-export
Open

Implement initial SSSOM export#124
cthoyt wants to merge 7 commits into
sciknoworg:devfrom
cthoyt-forks:sssom-export

Conversation

@cthoyt

@cthoyt cthoyt commented Aug 26, 2026

Copy link
Copy Markdown

Closes #123

This PR implements an initial SSSOM exporter.

Because the matching object appears to be an arbitrary dictionary, I wasn't able to make any interesting additions to the SSSOM data model beyond the subject, predicate, object, and confidence beyond what I could understand from the Alignment API XML export.

Ideally, there is a possibility for representing much more rich information about the methods used to produce mappings, which can be done in a follow-up.

**kwargs: Any,
) -> None:
if converter is None:
converter = bioregistry.get_default_converter()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not clear if this package produces a coherent prefix map somewhere else, so Bioregistry is a good place to get a comprehensive one if you aren't sure what you'll get



LOOKUPS = {
"=": v.exact_match,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: what else can appear as a relation besides =?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I would keep it as it then we can fix this later.

@HamedBabaei
HamedBabaei changed the base branch from main to dev August 26, 2026 12:55
@HamedBabaei
HamedBabaei changed the base branch from dev to main August 26, 2026 12:55
@cthoyt

cthoyt commented Aug 26, 2026

Copy link
Copy Markdown
Author

@HamedBabaei is there a source of example matching objects? Ideally, I would want to include unit tests for the conversion into SSSOM objects

@HamedBabaei

Copy link
Copy Markdown
Member

@HamedBabaei is there a source of example matching objects? Ideally, I would want to include unit tests for the conversion into SSSOM objects

Thanks @cthoyt for taking care of this. With what @abhishekreddyallu is doing, I think we can add more info to this module's SSSOM data.

Sure, here are the samples:
ensemble_alignments.json
ensemble_alignments.xml

@HamedBabaei
HamedBabaei changed the base branch from main to dev August 26, 2026 13:04
@cthoyt

cthoyt commented Aug 26, 2026

Copy link
Copy Markdown
Author

@HamedBabaei I added a test that uses the JSON file, but it does not contain any more exotic information (for now)

I did notice that the scores are bigger than 1 - should these be interpreted as percentages out of 100?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retrieving results as SSSOM

2 participants