r/bioinformatics • • 9d ago

programming [ Removed by moderator ]

[removed] — view removed post

29 Upvotes

23 comments sorted by

•

u/bioinformatics-ModTeam 8d ago

Bioinformatics tools should be shared in r/bioinformaticstools.

10

u/zstars 8d ago

What's wrong with biocontainers exactly? quay.io/biocontainers

Also, when you say you've released images open source with apache-2.0, what specifically is covered by that license? These tools already have licenses, you can't just change them....

-1

u/ldipotet 8d ago

Fair questions, thanks.

Nothing wrong with BioContainers at all, and I didn’t mean to suggest otherwise. It’s a great project and we’d point people to it for most tools. Ours are a different take: they’re built and tested together as one microbial pipeline (fastp → SPAdes → … → ABRicate), with test data for every step, smoke tests that run before each push, and guides for setting up the big databases on AWS: Bakta’s (~64 GB) and Kraken2’s prebuilt Standard index (~109 GiB) on EFS, so AWS Batch jobs can share one copy. We also fixed a few issues we hit in practice, like Prokka’s tbl2asn expiry and Roary picking genes at random with duplicate names.

On the licence, you’re right, my wording was too loose. Apache-2.0 covers only our own work: the Dockerfiles, scripts, test scripts and docs. Every tool inside the images keeps its own licence, and some of the databases have their own terms too, especially for commercial use. That’s spelled out in the NOTICE file in the repo. Thanks for pointing it out, it’s an important distinction.

2

u/dat_GEM_lyf PhD | Government 8d ago

> thanks for pointing that out, it’s an important distinction

Holy AI slop wording

2

u/HowManyAccountsPoo 9d ago

Big fan of Kaiju and the biobakery suite (metaphlan etc)

0

u/ldipotet 8d ago

Thanks, that’s really helpful! We already have Kraken2, and Kaiju would complement it well, since it classifies at the protein level rather than with DNA k-mers. bioBakery is a great suite too, though it’s a much bigger one to containerise well (databases, version pinning), so that’s one we’d need to look into carefully. Are you mostly using them for metagenomic samples? Our images are focused on isolate WGS right now, so it’s good to know there’s interest in the metagenomics side.

2

u/mr--tee 8d ago edited 8d ago

Hello! Sorry to be a bit off topic, but why use Kraken2 when there's sylph?

In my limited experience, sylph is faster, more efficient and actually has statistics and doesn't just blindly report every kmer hit it finds. Context: I'm normally doing microbial genomics on isolates and only have limited experience with metagenomics.


Also, I've created sylphd (AGPL-3) based on sylph and pysylph.

My intuitions behind sylphd were: split sylph into two parts:

  1. a relatively light kmer sketcher and
  2. RAM-heavy reference database daemon

Goal: only load reference db into RAM once -> quicker queries from sketcher clients. (I needed that for a responsive UI.)

Then, I realized that since sylph is written in Rust, I could compile the sketcher to WASM and the daemon could live on a (public) server. Result: you can now directly sketch on my static GitHub pages site and classify on my public server (GTDB+UHGV+FungiRefSeq)! So you can, without having to install dependencies or download large reference dbs, directly taxonomically classify assemblies or reads from the browser on any device! It even works with reads that are gigabytes in size from my phone!

I'd welcome feedback on this, since I've merely discovered a clever hack on top of other people's hard work, and lack experience to tell of it's already useful like that. Please feel free to make suggestions.

(I've been toying with the idea of enabling the upload of multiple samples -> enabling full metagenomic data analysis via the browser. But for that, I'd definitely need help.)

1

u/ldipotet 8d ago

Hi,! I’ve only read about sylph. We normally do microbial genomics on isolates and only have limited experience with metagenomics. We use Kraken2 mainly to confirm the species of each isolate and check for contamination, and because it fits into a lot of existing workflows, so it makes sense to take time for the automation that allows the tool to be run from anywhere.

the second part of your comment is more exciting for me. I don’t have time at the moment, but I’ll share how we deal with some of the same problems.

The main problem that I see is the reference DB. We have to access two big ones, Bakta (full) and Kraken2 (Standard), and in the case of Kraken2 the DB is > 100 GB. We use AWS EFS, which is expensive, but it allows multi-access with high throughput. Before that we tried other solutions, like attaching an AWS EBS volume to a container, which is much cheaper, but at least with Bakta it didn’t work. About uploading multiple samples, we use a framework from AWS Labs that we branched, and we use AWS Batch to run multiple samples. There are also plenty of distributed task queue frameworks if you want to do it on your own. In my opinion, for the democratization of bioinformatics, everything must be as simple as possible for the end user (researchers, biologists, scientists, etc.): don’t overcomplicate the graphical interface, and make everything as asynchronous as possible.

Something that deserves a look: https://benlangmead.github.io/aws-indexes/k2

These DBs are stored in AWS S3. I guess if your project fits into some categories, the storage and the API services are free. I’ll keep your project in mind, and if at some point we have more time we can try something there.

0

u/mr--tee 8d ago

Look into sylph's new database v2 format! I think one way forward is to create a massive dereplicated sylphd-like server. Basically, I'm already going in this direction, right now, I'm working on upgrading from GTDB alone to the GlobDB.

As I wrote, I'm not really from this field, so you require even more inclusive databases than GlobDB? Do these exist off the shelf? Do you agree with dereplication?

And again, I think Kraken2 really falls short because it mindlessly reports every kmer hit. Sylph is the way!

So my imagined ideal stack is basically: sylph (smarter algorithm, dbv2 format), large ref database (is GlobDB enough?), dereplicated (reasonable tradeoff), sylphd (server daemon with reference db v2 in RAM)

Would you be open to a virtual meeting to exchange ideas?

2

u/ldipotet 8d ago

Thanks, I really appreciate it! Right now I’m fully busy with work, so I can’t commit to a meeting. My schedule is pretty full. The post has been removed, and the moderator recommended that it must be in r/bioinformaticstools, so I’ll re-share it there, but I won’t answer comments there. Just as a reminder: in case you try to post your tools here, that must be done in the other room. Your tool is fine; I think you have to focus on infrastructure.

Good luck with sylphd!

1

u/mr--tee 8d ago

Thanks! Same to you.

1

u/HandPuzzleheaded3974 8d ago

I love sylph and totally agree with you. Your website feels like logan. I can see people using it. You could expand it to globdb and offer it to them.

1

u/mr--tee 8d ago

thanks for the feedback. i forgot about globdb, but you're right, it's a significant improvement for certain analyses. working on it now. will require a paid server with more RAM...

also, i'm working on a simple binary gui that enables end-to-end metagenomics - via sylphd - without dependencies. for small datasets, it may even run via wasm in browser, too... i already discovered all puzzle pieces to make this possible, i think. 🤯 i'm suffering from some form of AI psychosis, though...

however, i'm mostly doing this because i see the opportunity to build sth great here with the new possibilities of LLMs, but as i said, i lack expertise in this field. do you have experience/expertise? would you be interested to discuss?

2

u/HandPuzzleheaded3974 8d ago

How to say this politely... yes i am an academic working in metagenomics, yes i have expertise, but no i am not interested in discussing this. Sorry, i have enough colleagues immersed in llms (possibly also with ai psychosis) trying to build tools quickly with them and not taking the time to understand the science for themselves, and am not trying to interact with this category of people more than i already do. Nothing personal. And i am not implying your work will not be useful. Just a preference on how i spend my own time.

-1

u/mr--tee 8d ago edited 8d ago

Fair enough, you decide how to use your time.

this category of people

  • That does sound quite rude.
  • This is not my main focus, I am quite deeply knowledgeable in my main area of interest, at least in my judgement. This is just a side project and I'm pursuing it as an engineer because I see how useful it could be.
  • I think engineering tools that actually work well for actual users is valuable and something that bioinformatics desperately needs.

2

u/dat_GEM_lyf PhD | Government 8d ago

Only a slop merchant would get upset by the phrase “this category of people” when referring to AI slop merchants.

You don’t have to wear your heart on your sleeve like that.

6

u/RemoveInvasiveEucs 8d ago • Heartwarming

People should also be aware of Staph-B, it's a fantastic resource from state public health labs:

https://hub.docker.com/u/staphb

https://github.com/StaPH-B/docker-builds

5

u/Sarcoglycan 8d ago

I love StaPH-B docker builds. Makes building pipelines or running tools directly from the command line so easy.

4

u/DrBacti 8d ago

I'm surprised to see good old roary here, but I'd recommend replacing it with panaroo which handles annotation errors and fragmented assemblies much better. But great work!

4

u/Away-Suggestion1737 8d ago edited 8d ago

Some recommendations for tools to add

  • NCBI FCS-adaptor / FCS-GX
  • GTDB-TK for taxonomy assignment (or skani for lightweight option)
  • you have a de-novo assembler but no alignment tool? BWA-MEM2 + SAMtools for alignment stats
  • id consider replacing pilon with polypolish and pypolca

Oxford Nanopore tools

  • QC: NanoPack2, Chopper, Filtlong, Porechop_ABI
  • flye assembler
  • Minimap2 for alignment (shared SAMtools)
  • Medaka for polisher

Something else to consider for annotation. Right now you have bakta and prokka which feels a bit unnecessary since bakta is the successor to prokka, but more importantly the only NCBI annotation compliant tool is the tbl2asn tied to prokka. Tbl2asn is deprecated and it's successor is table2asn, more importantly if providing an NCBI compliant annotation option is something you want to offer, consider adding PGAP because even the newest bakta with the compliant flag + the newest table2asn will not give NCBI compliant genomes without extra alterations.

-5

u/[deleted] 8d ago

[removed] — view removed comment

1

u/ldipotet 8d ago

Thanks for the detailed review, much appreciated. Quick notes on each point:

Build-time installers: fair point. FimTyper's Perlbrew step and the Miniconda installers in Bakta and Platon are fetched without verification. Roary already pins its installer and checks a SHA-256, and we'll extend that approach (or replace the piped installer) for the others.

Ubuntu 20.04: agreed, those six images are due for a base upgrade. They're on 20.04 because those tool versions were validated there (e.g. the prebuilt SPAdes 3.15.5 binaries crash on 22.04). Moving them to a supported base, with tool upgrades where needed, is now on our list.

Root user: this one is intentional. These are generic CLI images that run in many setups: local Docker with bind mounts, shared storage like EFS, Batch, Kubernetes. The UID that can write depends on that storage, and a UID baked into the image breaks writes whenever it doesn't match, so we leave that choice to runtime (docker run --user, the Batch user field, or a Kubernetes securityContext). A few images (Bakta, Platon, Roary, CheckM) still install into root-owned paths. We'll fix that so every image works under an arbitrary UID, and add a note to the READMEs recommending non-root, read-only inputs and minimal network access and credentials.

Mutable inputs: valid point, and we'll address it. The published images are immutable and their digests are in the changelog, so pulling by digest already gives you exactly what we tested. Rebuilds from source still depend on inputs that change over time. In upcoming releases we'll pin the base images by digest and verify the integrity of external downloads, so rebuilds are more reproducible too.

Thanks again!

2

u/TheLordB 8d ago

Maybe tell your ai to read the sub rules before posting and you might see no ai posts.