EBI-Metagenomics / mgnify-sourmash-component

A web component that let you select FastA or FastQ sequence files and creates sketches (KmerMinHash signatures) using Sourmash.
2 stars 1 forks source link

Add support for passing sourmash signature and/or NCBI acc #3

Open mr-eyes opened 9 months ago

mr-eyes commented 9 months ago

Hi dev team,

I suggested that the branch water web tool support searching with sourmash signatures alongside the FASTA files, and @luizirber mentioned we would need to create PR for this feature here.

luizirber: We need to ask/make PR for https://github.com/ebi-metagenomics/mgnify-sourmash-component/ for that.

luizirber: Might be worth a new release from them since there is a new NPM package too.

mo: So they just load and pass a sketch?

luizirber: Not even load, just pass the sig file along.

Luizirber: The other one it would be cool is passing a NCBI assembly accession, and retrieve other from wort =]

luizirber: But that might be easier on the backend, hmm.

That would be very cool to add.

Thank you! —Mo

SandyRogers commented 9 months ago

Hi @mr-eyes , I've collected a bit of background on this from our team. It sounds sensible to allow .sig uploads, but we will need to ensure the Sourmash version used on any backends, on the web component, and on users' own sig creations are all in sync; since to my understanding the signature files are not (necessarily) compatible between Sourmash versions.

Part of the the reason this component uses an older sourmash release is to maintain version parity with the signatures we have created for previously released MAG Catalogues on MGnify, although it isn't a particularly big step to update those – we simply haven't done it so far so this component now lags behind the upstream.

We would be happy to see a PR to enable .sig uploads provided we also include clarity of the compatibility of sourmash versions. I don't believe we are likely to have dedicated time to develop this in the short-term – but would certainly be happy to review a PR.

Many thanks, Sandy

luizirber commented 9 months ago

since to my understanding the signature files are not (necessarily) compatible between Sourmash versions.

Please file a bug on sourmash if you ever see a newer sourmash version being unable to load an older sig, they should all be loadable! (past version loading newer ones is more tricky, but we haven't changed the sig format for a long time and there are no plans to change it anytime soon)

SandyRogers commented 9 months ago

@luizirber Thanks for the info! Sorry, I misremembered.

ctb commented 9 months ago

No worries at all! But in general we do work pretty hard to keep backwards compat ;)