Koeng101 / dnadesign

A Go package for designing DNA.
Other
23 stars 0 forks source link

Api #9

Closed Koeng101 closed 2 months ago

Koeng101 commented 10 months ago

API adds an OpenAPI interface to DnaDesign. This allows other programs to work with DnaDesign.

In particular, we have a focus on supporting an embedded lua environment and python interactivity.

A massive change is, now, the output of parsers is now defined directly in the OpenAPI spec, rather than in their respective parser files.

Koeng101 commented 10 months ago

I think a connect.build API might be better here, with autogenerated JSON schema using https://github.com/chrusty/protoc-gen-jsonschema

Would allow stream outputs, which I think is quite useful, and better typing. Better to get this right at the beginning, than have to change it later.

Koeng101 commented 10 months ago

I think a connect.build API might be better here, with autogenerated JSON schema using https://github.com/chrusty/protoc-gen-jsonschema

Would allow stream outputs, which I think is quite useful, and better typing. Better to get this right at the beginning, than have to change it later.

I've changed my mind on this, I think. You don't get the beautiful API docs with gRPC like you could get with OpenAPI using things like scalar. I think this is actually more important than things like streaming - streaming is nice, but it doesn't necessarily help people use the things built. OpenAPI docs would help with building.

Koeng101 commented 10 months ago

I want the following functionality to be exposed:

Parsers

  1. [X] Parse and write Fasta
  2. [X] Parse and write Genbank
  3. [X] Parse and write Fastq
  4. [X] Parse and write Slow5
  5. [X] Parse and write Pileup 6. [ ] Get and parse Uniprot

CDS

  1. [X] Fix CDS
  2. [X] Optimize CDS
  3. [X] Translate CDS

PCR

Cloning

Folding

Basic utils

Codon tables

Koeng101 commented 9 months ago

In addition, we should have a single lua example file with how to use each and every function, all of which are runnable examples. Questions of whether to include each into the final context should be included.

Not only will the examples in one place be a nice way to document how to use the interface, we can parse it to ask an LLM whether or not the example should be passed into a system that writes code to execute a user's request.

Koeng101 commented 2 months ago

I'm closing this because WASM sounds like it could work much better.