diff --git a/api/api/api.go b/api/api/api.go
index 916e872..487135a 100644
--- a/api/api/api.go
+++ b/api/api/api.go
@@ -3,23 +3,25 @@ package api
import (
"context"
"embed"
- _ "embed"
+ "encoding/json"
"fmt"
"html/template"
"io/fs"
"log"
"log/slog"
"net/http"
+ "net/http/httptest"
"strings"
"sync"
- "github.com/flowchartsman/swaggerui"
+ luajson "github.com/koeng101/dnadesign/api/api/json"
"github.com/koeng101/dnadesign/api/gen"
"github.com/koeng101/dnadesign/lib/bio"
"github.com/koeng101/dnadesign/lib/primers/pcr"
"github.com/koeng101/dnadesign/lib/synthesis/codon"
"github.com/koeng101/dnadesign/lib/synthesis/fix"
"github.com/koeng101/dnadesign/lib/synthesis/fragment"
+ lua "github.com/yuin/gopher-lua"
)
//go:embed codon_tables/freqB.json
@@ -36,6 +38,12 @@ var (
var templatesFS embed.FS
var templates = template.Must(template.ParseFS(templatesFS, "templates/*"))
+// App implements the dnadesign app
+type App struct {
+ Router *http.ServeMux
+ Logger *slog.Logger
+}
+
// IndexHandler handles the basic HTML page for interacting with polyAPI.
func indexHandler(w http.ResponseWriter, r *http.Request) {
err := templates.ExecuteTemplate(w, "index.html", nil)
@@ -44,17 +52,19 @@ func indexHandler(w http.ResponseWriter, r *http.Request) {
}
}
-// App implements the dnadesign app
-type App struct {
- Router *http.ServeMux
- Logger *slog.Logger
-}
+// ScalarHandler serves the Scalar API documentation with jsonSwagger
+func scalarHandler(jsonSwagger []byte) http.HandlerFunc {
+ return func(w http.ResponseWriter, r *http.Request) {
+ // Prepare the data for the template. Pass the jsonSwagger as a string.
+ data := map[string]interface{}{
+ "JsonSwagger": string(jsonSwagger), // Ensure jsonSwagger is in the correct format
+ }
-func corsMiddleware(handler http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Access-Control-Allow-Origin", "*") // Set CORS header
- handler.ServeHTTP(w, r)
- })
+ err := templates.ExecuteTemplate(w, "scalar.html", data)
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusInternalServerError)
+ }
+ }
}
// initializeApp starts here
@@ -85,8 +95,8 @@ func InitializeApp() App {
// Handle routes.
app.Router.HandleFunc("/", indexHandler)
app.Router.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(subFS))))
- app.Router.Handle("/swagger/", http.StripPrefix("/swagger", swaggerui.Handler(jsonSwagger)))
- app.Router.HandleFunc("/docs", func(w http.ResponseWriter, r *http.Request) { w.Write(jsonSwagger) })
+ app.Router.HandleFunc("/scalar/", scalarHandler(jsonSwagger))
+ app.Router.HandleFunc("/api.json", func(w http.ResponseWriter, r *http.Request) { _, _ = w.Write(jsonSwagger) })
// Lua handlers.
app.Router.HandleFunc("/api/execute_lua", appImpl.PostExecuteLua)
@@ -96,14 +106,16 @@ func InitializeApp() App {
app.Router.HandleFunc("/api/io/genbank/parse", appImpl.PostIoGenbankParse)
// CDS design handlers.
- app.Router.HandleFunc("/api/design/cds/fix", appImpl.PostDesignCdsFix)
- app.Router.HandleFunc("/api/design/cds/optimize", appImpl.PostDesignCdsOptimize)
- app.Router.HandleFunc("/api/design/cds/translate", appImpl.PostDesignCdsTranslate)
+ app.Router.HandleFunc("/api/cds/fix", appImpl.PostCdsFix)
+ app.Router.HandleFunc("/api/cds/optimize", appImpl.PostCdsOptimize)
+ app.Router.HandleFunc("/api/cds/translate", appImpl.PostCdsTranslate)
+
+ // PCR handlers.
+ app.Router.HandleFunc("/api/pcr/complex_pcr", appImpl.PostPcrComplexPcr)
+ app.Router.HandleFunc("/api/pcr/simple_pcr", appImpl.PostPcrSimplePcr)
- // Simulate handlers.
- app.Router.HandleFunc("/api/simulate/fragment", appImpl.PostSimulateFragment)
- app.Router.HandleFunc("/api/simulate/complex_pcr", appImpl.PostSimulateComplexPcr)
- app.Router.HandleFunc("/api/simulate/pcr", appImpl.PostSimulatePcr)
+ // Synthesis handlers.
+ app.Router.HandleFunc("/api/synthesis/fragment", appImpl.PostSynthesisFragment)
return app
}
@@ -126,6 +138,101 @@ func (app *App) PostExecuteLua(ctx context.Context, request gen.PostExecuteLuaRe
return gen.PostExecuteLua200JSONResponse{Output: output, Log: log}, nil
}
+//go:embed json/json.lua
+var luaJSON string
+
+func (app *App) ExecuteLua(data string, attachments []gen.Attachment) (string, string, error) {
+ L := lua.NewState()
+ defer L.Close()
+ if err := L.DoString(luaJSON); err != nil {
+ panic(err)
+ }
+
+ // Add attachments
+ luaAttachments := L.NewTable()
+ for _, attachment := range attachments {
+ luaAttachments.RawSetString(attachment.Name, lua.LString(attachment.Content))
+ }
+ L.SetGlobal("attachments", luaAttachments)
+
+ // Add IO functions
+ L.SetGlobal("fasta_parse", L.NewFunction(app.LuaIoFastaParse))
+ L.SetGlobal("genbank_parse", L.NewFunction(app.LuaIoGenbankParse))
+
+ // Add CDS design functions
+ L.SetGlobal("fix", L.NewFunction(app.LuaCdsFix))
+ L.SetGlobal("optimize", L.NewFunction(app.LuaCdsOptimize))
+ L.SetGlobal("translate", L.NewFunction(app.LuaCdsTranslate))
+
+ // Add simulate functions
+ L.SetGlobal("fragment", L.NewFunction(app.LuaSimulateFragment))
+ L.SetGlobal("complex_pcr", L.NewFunction(app.LuaSimulateComplexPcr))
+ L.SetGlobal("pcr", L.NewFunction(app.LuaSimulatePcr))
+
+ // Execute the Lua script
+ if err := L.DoString(data); err != nil {
+ return "", "", err
+ }
+
+ // Extract log and output
+ var logBuffer, outputBuffer string
+ log := L.GetGlobal("log")
+ if str, ok := log.(lua.LString); ok {
+ logBuffer = string(str)
+ }
+ output := L.GetGlobal("output")
+ if str, ok := output.(lua.LString); ok {
+ outputBuffer = string(str)
+ }
+
+ return logBuffer, outputBuffer, nil
+}
+
+// luaResponse wraps the core of the lua data -> API calls -> lua data pipeline
+func (app *App) luaResponse(L *lua.LState, url, dataString string) int {
+ req := httptest.NewRequest("POST", url, strings.NewReader(dataString))
+ resp := httptest.NewRecorder()
+ app.Router.ServeHTTP(resp, req)
+
+ if resp.Code != 200 {
+ L.RaiseError("HTTP request failed: " + resp.Body.String())
+ return 0
+ }
+
+ var data interface{}
+ if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
+ L.RaiseError(err.Error())
+ return 0
+ }
+ luaData := luajson.DecodeValue(L, data)
+ L.Push(luaData)
+ return 1
+}
+
+// luaStringArrayToGoSlice converts a Lua table at the given index in the Lua stack to a Go slice of strings.
+func luaStringArrayToGoSlice(L *lua.LState, index int) ([]string, error) {
+ var goStrings []string
+ lv := L.Get(index)
+ if lv.Type() != lua.LTTable {
+ if lv.Type() == lua.LTNil {
+ return []string{}, nil
+ }
+ return nil, fmt.Errorf("argument at index %d is not a table", index)
+ }
+ tbl := L.ToTable(index)
+
+ tbl.ForEach(func(key lua.LValue, value lua.LValue) {
+ if str, ok := value.(lua.LString); ok {
+ goStrings = append(goStrings, string(str))
+ }
+ //else {
+ // Handle non-string values if necessary
+ //}
+ })
+
+ return goStrings, nil
+}
+
/*
*****************************************************************************
@@ -151,6 +258,16 @@ func (app *App) PostIoFastaParse(ctx context.Context, request gen.PostIoFastaPar
return gen.PostIoFastaParse200JSONResponse(data), nil
}
+// LuaIoFastaParse implements fasta_parse in lua.
+func (app *App) LuaIoFastaParse(L *lua.LState) int {
+ fastaData := L.ToString(1)
+ return app.luaResponse(L, "/api/io/fasta/parse", fastaData)
+}
+
+func (app *App) PostIoFastaWrite(ctx context.Context, request gen.PostIoFastaWriteRequestObject) (gen.PostIoFastaWriteResponseObject, error) {
+ return nil, nil
+}
+
func (app *App) PostIoGenbankParse(ctx context.Context, request gen.PostIoGenbankParseRequestObject) (gen.PostIoGenbankParseResponseObject, error) {
genbankString := *request.Body
parser, err := bio.NewGenbankParser(strings.NewReader(genbankString + "\n"))
@@ -172,6 +289,24 @@ func (app *App) PostIoGenbankParse(ctx context.Context, request gen.PostIoGenban
return gen.PostIoGenbankParse200JSONResponse(data), nil
}
+// LuaIoGenbankParse implements genbank_parse in lua.
+func (app *App) LuaIoGenbankParse(L *lua.LState) int {
+ genbankData := L.ToString(1)
+ return app.luaResponse(L, "/api/io/genbank/parse", genbankData)
+}
+
+func (app *App) PostIoGenbankWrite(ctx context.Context, request gen.PostIoGenbankWriteRequestObject) (gen.PostIoGenbankWriteResponseObject, error) {
+ return nil, nil
+}
+
+func (app *App) PostIoFastqParse(ctx context.Context, request gen.PostIoFastqParseRequestObject) (gen.PostIoFastqParseResponseObject, error) {
+ return nil, nil
+}
+
+func (app *App) PostIoFastqWrite(ctx context.Context, request gen.PostIoFastqWriteRequestObject) (gen.PostIoFastqWriteResponseObject, error) {
+ return nil, nil
+}
+
/*
*****************************************************************************
@@ -186,33 +321,58 @@ func fixFunctions(sequencesToRemove []string) []func(string, chan fix.DnaSuggest
functions = append(functions, fix.RemoveRepeat(18))
functions = append(functions, fix.GcContentFixer(0.80, 0.20))
functions = append(functions, fix.RemoveSequence([]string{"GGTCTC", "GAAGAC", "CACCTGC"}, "Common TypeIIS restriction enzymes - BsaI, BbsI, PaqCI"))
+ functions = append(functions, fix.RemoveSequence(sequencesToRemove, "User requested sequence removal"))
return functions
}
-func (app *App) PostDesignCdsFix(ctx context.Context, request gen.PostDesignCdsFixRequestObject) (gen.PostDesignCdsFixResponseObject, error) {
+func (app *App) PostCdsFix(ctx context.Context, request gen.PostCdsFixRequestObject) (gen.PostCdsFixResponseObject, error) {
var ct codon.Table
organism := string(request.Body.Organism)
ct, ok := CodonTables[organism]
if !ok {
- return gen.PostDesignCdsFix400TextResponse(fmt.Sprintf("Organism not found. Got: %s, Need one of the following: %v", organism, []string{"Escherichia coli"})), nil
+ return gen.PostCdsFix400TextResponse(fmt.Sprintf("Organism not found. Got: %s, Need one of the following: %v", organism, []string{"Escherichia coli"})), nil
}
sequence, fixChanges, err := fix.Cds(request.Body.Sequence, ct, fixFunctions(request.Body.RemoveSequences))
if err != nil {
- return gen.PostDesignCdsFix500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
+ return gen.PostCdsFix500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
}
changes := make([]gen.Change, len(fixChanges))
for i, change := range fixChanges {
changes[i] = gen.Change{From: change.From, Position: change.Position, Reason: change.Reason, Step: change.Step, To: change.To}
}
- return gen.PostDesignCdsFix200JSONResponse{Sequence: sequence, Changes: changes}, nil
+ return gen.PostCdsFix200JSONResponse{Sequence: sequence, Changes: changes}, nil
+}
+
+// LuaCdsFix implements fix in lua.
+func (app *App) LuaCdsFix(L *lua.LState) int {
+ sequence := L.ToString(1)
+ organism := L.ToString(2)
+ removeSequences, err := luaStringArrayToGoSlice(L, 3)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
+ }
+
+ type fix struct {
+ Sequence string `json:"sequence"`
+ Organism string `json:"organism"`
+ RemoveSequences []string `json:"remove_sequences"`
+ }
+ req := &fix{Sequence: sequence, Organism: organism, RemoveSequences: removeSequences}
+ b, err := json.Marshal(req)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
+ }
+ return app.luaResponse(L, "/api/cds/fix", string(b))
}
-func (app *App) PostDesignCdsOptimize(ctx context.Context, request gen.PostDesignCdsOptimizeRequestObject) (gen.PostDesignCdsOptimizeResponseObject, error) {
+func (app *App) PostCdsOptimize(ctx context.Context, request gen.PostCdsOptimizeRequestObject) (gen.PostCdsOptimizeResponseObject, error) {
var ct *codon.TranslationTable
organism := string(request.Body.Organism)
ct, ok := CodonTables[organism]
if !ok {
- return gen.PostDesignCdsOptimize400TextResponse(fmt.Sprintf("Organism not found. Got: %s, Need one of the following: %v", organism, []string{"Escherichia coli"})), nil
+ return gen.PostCdsOptimize400TextResponse(fmt.Sprintf("Organism not found. Got: %s, Need one of the following: %v", organism, []string{"Escherichia coli"})), nil
}
var seed int64
if request.Body.Seed != nil {
@@ -220,45 +380,71 @@ func (app *App) PostDesignCdsOptimize(ctx context.Context, request gen.PostDesig
}
sequence, err := ct.Optimize(request.Body.Sequence, seed)
if err != nil {
- return gen.PostDesignCdsOptimize500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
+ return gen.PostCdsOptimize500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
+ }
+ return gen.PostCdsOptimize200JSONResponse(sequence), nil
+}
+
+// LuaCdsOptimize implements optimize in lua.
+func (app *App) LuaCdsOptimize(L *lua.LState) int {
+ sequence := L.ToString(1)
+ organism := L.ToString(2)
+ seed := L.ToInt(3)
+
+ type optimize struct {
+ Sequence string `json:"sequence"`
+ Organism string `json:"organism"`
+ Seed int `json:"seed"`
+ }
+ req := &optimize{Sequence: sequence, Organism: organism, Seed: seed}
+ b, err := json.Marshal(req)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
}
- return gen.PostDesignCdsOptimize200JSONResponse(sequence), nil
+ return app.luaResponse(L, "/api/cds/optimize", string(b))
}
-func (app *App) PostDesignCdsTranslate(ctx context.Context, request gen.PostDesignCdsTranslateRequestObject) (gen.PostDesignCdsTranslateResponseObject, error) {
+func (app *App) PostCdsTranslate(ctx context.Context, request gen.PostCdsTranslateRequestObject) (gen.PostCdsTranslateResponseObject, error) {
translationTableInteger := request.Body.TranslationTable
ct := codon.NewTranslationTable(translationTableInteger)
if ct == nil {
- return gen.PostDesignCdsTranslate500TextResponse(fmt.Sprintf("Translation table of %d not found.", translationTableInteger)), nil
+ return gen.PostCdsTranslate500TextResponse(fmt.Sprintf("Translation table of %d not found.", translationTableInteger)), nil
}
sequence, err := ct.Translate(request.Body.Sequence)
if err != nil {
- return gen.PostDesignCdsTranslate500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
+ return gen.PostCdsTranslate500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
+ }
+ return gen.PostCdsTranslate200JSONResponse(sequence), nil
+}
+
+// LuaCdsTranslate implements translate in lua.
+func (app *App) LuaCdsTranslate(L *lua.LState) int {
+ sequence := L.ToString(1)
+ translationTable := L.ToInt(2)
+
+ type translate struct {
+ Sequence string `json:"sequence"`
+ TranslationTable int `json:"translation_table"`
+ }
+ req := &translate{Sequence: sequence, TranslationTable: translationTable}
+ b, err := json.Marshal(req)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
}
- return gen.PostDesignCdsTranslate200JSONResponse(sequence), nil
+ return app.luaResponse(L, "/api/cds/translate", string(b))
}
/*
*****************************************************************************
-# Simulation begins here.
+# PCR functions
*****************************************************************************
*/
-func (app *App) PostSimulateFragment(ctx context.Context, request gen.PostSimulateFragmentRequestObject) (gen.PostSimulateFragmentResponseObject, error) {
- var excludeOverhangs []string
- overhangs := *request.Body.ExcludeOverhangs
- if overhangs != nil {
- excludeOverhangs = overhangs
- }
- fragments, efficiency, err := fragment.Fragment(request.Body.Sequence, request.Body.MinFragmentSize, request.Body.MaxFragmentSize, excludeOverhangs)
- if err != nil {
- return gen.PostSimulateFragment500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
- }
- return gen.PostSimulateFragment200JSONResponse{Fragments: fragments, Efficiency: float32(efficiency)}, nil
-}
-func (app *App) PostSimulateComplexPcr(ctx context.Context, request gen.PostSimulateComplexPcrRequestObject) (gen.PostSimulateComplexPcrResponseObject, error) {
+func (app *App) PostPcrComplexPcr(ctx context.Context, request gen.PostPcrComplexPcrRequestObject) (gen.PostPcrComplexPcrResponseObject, error) {
var circular bool
circularPointer := request.Body.Circular
if circularPointer != nil {
@@ -266,11 +452,36 @@ func (app *App) PostSimulateComplexPcr(ctx context.Context, request gen.PostSimu
}
amplicons, err := pcr.Simulate(request.Body.Templates, float64(request.Body.TargetTm), circular, request.Body.Primers)
if err != nil {
- return gen.PostSimulateComplexPcr500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
+ return gen.PostPcrComplexPcr500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
}
- return gen.PostSimulateComplexPcr200JSONResponse(amplicons), nil
+ return gen.PostPcrComplexPcr200JSONResponse(amplicons), nil
}
-func (app *App) PostSimulatePcr(ctx context.Context, request gen.PostSimulatePcrRequestObject) (gen.PostSimulatePcrResponseObject, error) {
+
+// LuaSimulateComplexPcr implements complex pcr in lua.
+func (app *App) LuaSimulateComplexPcr(L *lua.LState) int {
+ templates, err := luaStringArrayToGoSlice(L, 1)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
+ }
+ primers, err := luaStringArrayToGoSlice(L, 2)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
+ }
+ targetTm := L.ToNumber(3)
+ circular := L.ToBool(4)
+
+ req := &gen.PostPcrComplexPcrJSONBody{Circular: &circular, Primers: primers, TargetTm: float32(targetTm), Templates: templates}
+ b, err := json.Marshal(req)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
+ }
+ return app.luaResponse(L, "/api/pcr/complex_pcr", string(b))
+}
+
+func (app *App) PostPcrSimplePcr(ctx context.Context, request gen.PostPcrSimplePcrRequestObject) (gen.PostPcrSimplePcrResponseObject, error) {
var circular bool
circularPointer := request.Body.Circular
if circularPointer != nil {
@@ -278,16 +489,218 @@ func (app *App) PostSimulatePcr(ctx context.Context, request gen.PostSimulatePcr
}
amplicons := pcr.SimulateSimple([]string{request.Body.Template}, float64(request.Body.TargetTm), circular, []string{request.Body.ForwardPrimer, request.Body.ReversePrimer})
if len(amplicons) == 0 {
- return gen.PostSimulatePcr500TextResponse("Got no amplicons"), nil
+ return gen.PostPcrSimplePcr500TextResponse("Got no amplicons"), nil
+ }
+ return gen.PostPcrSimplePcr200JSONResponse(amplicons[0]), nil
+}
+
+// LuaSimulatePcr implements pcr in lua
+func (app *App) LuaSimulatePcr(L *lua.LState) int {
+ template := L.ToString(1)
+ forwardPrimer := L.ToString(2)
+ reversePrimer := L.ToString(3)
+ targetTm := L.ToNumber(4)
+ circular := L.ToBool(5)
+
+ req := &gen.PostPcrSimplePcrJSONBody{Circular: &circular, Template: template, TargetTm: float32(targetTm), ForwardPrimer: forwardPrimer, ReversePrimer: reversePrimer}
+ b, err := json.Marshal(req)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
}
- return gen.PostSimulatePcr200JSONResponse(amplicons[0]), nil
+ return app.luaResponse(L, "/api/pcr/simple_pcr", string(b))
+}
+
+func (app *App) PostPcrPrimersDebruijnBarcodes(ctx context.Context, request gen.PostPcrPrimersDebruijnBarcodesRequestObject) (gen.PostPcrPrimersDebruijnBarcodesResponseObject, error) {
+ return nil, nil
+}
+
+func (app *App) PostPcrPrimersMarmurDoty(ctx context.Context, request gen.PostPcrPrimersMarmurDotyRequestObject) (gen.PostPcrPrimersMarmurDotyResponseObject, error) {
+ return nil, nil
+}
+
+func (app *App) PostPcrPrimersSantaLucia(ctx context.Context, request gen.PostPcrPrimersSantaLuciaRequestObject) (gen.PostPcrPrimersSantaLuciaResponseObject, error) {
+ return nil, nil
+}
+
+func (app *App) PostPcrPrimersMeltingTemperature(ctx context.Context, request gen.PostPcrPrimersMeltingTemperatureRequestObject) (gen.PostPcrPrimersMeltingTemperatureResponseObject, error) {
+ return nil, nil
}
-func (app *App) PostSimulateGoldengate(ctx context.Context, request gen.PostSimulateGoldengateRequestObject) (gen.PostSimulateGoldengateResponseObject, error) {
+
+/*
+*****************************************************************************
+
+# Cloning functions
+
+*****************************************************************************
+*/
+
+func (app *App) PostCloningGoldengate(ctx context.Context, request gen.PostCloningGoldengateRequestObject) (gen.PostCloningGoldengateResponseObject, error) {
return nil, nil
}
-func (app *App) PostSimulateLigate(ctx context.Context, request gen.PostSimulateLigateRequestObject) (gen.PostSimulateLigateResponseObject, error) {
+func (app *App) PostCloningLigate(ctx context.Context, request gen.PostCloningLigateRequestObject) (gen.PostCloningLigateResponseObject, error) {
return nil, nil
}
-func (app *App) PostSimulateRestrictionDigest(ctx context.Context, request gen.PostSimulateRestrictionDigestRequestObject) (gen.PostSimulateRestrictionDigestResponseObject, error) {
+func (app *App) PostCloningRestrictionDigest(ctx context.Context, request gen.PostCloningRestrictionDigestRequestObject) (gen.PostCloningRestrictionDigestResponseObject, error) {
return nil, nil
}
+func (app *App) PostSynthesisFragment(ctx context.Context, request gen.PostSynthesisFragmentRequestObject) (gen.PostSynthesisFragmentResponseObject, error) {
+ var excludeOverhangs []string
+ overhangs := *request.Body.ExcludeOverhangs
+ if overhangs != nil {
+ excludeOverhangs = overhangs
+ }
+ fragments, efficiency, err := fragment.Fragment(request.Body.Sequence, request.Body.MinFragmentSize, request.Body.MaxFragmentSize, excludeOverhangs)
+ if err != nil {
+ return gen.PostSynthesisFragment500TextResponse(fmt.Sprintf("Got internal server error: %s", err)), nil
+ }
+ return gen.PostSynthesisFragment200JSONResponse{Fragments: fragments, Efficiency: float32(efficiency)}, nil
+}
+
+// LuaSimulateFragment implements fragment in lua.
+func (app *App) LuaSimulateFragment(L *lua.LState) int {
+ sequence := L.ToString(1)
+ minFragmentSize := L.ToInt(2)
+ maxFragmentSize := L.ToInt(3)
+ excludeOverhangs, err := luaStringArrayToGoSlice(L, 4)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
+ }
+
+ type fragmentStruct struct {
+ Sequence string `json:"sequence"`
+ MinFragmentSize int `json:"min_fragment_size"`
+ MaxFragmentSize int `json:"max_fragment_size"`
+ ExcludeOverhangs []string `json:"exclude_overhangs"`
+ }
+ req := &fragmentStruct{Sequence: sequence, MinFragmentSize: minFragmentSize, MaxFragmentSize: maxFragmentSize, ExcludeOverhangs: excludeOverhangs}
+ b, err := json.Marshal(req)
+ if err != nil {
+ L.RaiseError(err.Error())
+ return 0
+ }
+ return app.luaResponse(L, "/api/synthesis/fragment", string(b))
+}
+
+/*
+*****************************************************************************
+
+# Folding functions
+
+*****************************************************************************
+*/
+
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+
+/*
+*****************************************************************************
+
+# Seqhash functions
+
+*****************************************************************************
+*/
+
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+
+/*
+*****************************************************************************
+
+# CodonTable functions
+
+*****************************************************************************
+*/
+
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+
+/*
+*****************************************************************************
+
+# Alignment functions
+
+*****************************************************************************
+*/
+
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+
+/*
+*****************************************************************************
+
+# Utility functions
+
+*****************************************************************************
+*/
+
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+
+/*
+*****************************************************************************
+
+# Random functions
+
+*****************************************************************************
+*/
+
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//
+//func (app *App) x(ctx context.Context, request gen.RequestObject) (gen.ResponseObject, error) {
+// return nil, nil
+//}
+//
diff --git a/api/api/api_test.go b/api/api/api_test.go
index a825701..293b90f 100644
--- a/api/api/api_test.go
+++ b/api/api/api_test.go
@@ -94,11 +94,11 @@ ORIGIN
}
func TestFix(t *testing.T) {
- req := httptest.NewRequest("POST", "/api/design/cds/fix", strings.NewReader(`{"organism":"Escherichia coli","sequence":"ATGGGTCTCTAA","removeSequences":["GGTCTC"]}`))
+ req := httptest.NewRequest("POST", "/api/cds/fix", strings.NewReader(`{"organism":"Escherichia coli","sequence":"ATGCGTCTCTAA","removeSequences":["CGTCTC"]}`))
resp := httptest.NewRecorder()
app.Router.ServeHTTP(resp, req)
- r := `{"changes":[{"From":"CTC","Position":2,"Reason":"Common TypeIIS restriction enzymes - BsaI, BbsI, PaqCI","Step":0,"To":"CTG"}],"sequence":"ATGGGTCTGTAA"}`
+ r := `{"changes":[{"From":"CTC","Position":2,"Reason":"User requested sequence removal","Step":0,"To":"CTG"}],"sequence":"ATGCGTCTGTAA"}`
if strings.TrimSpace(resp.Body.String()) != r {
t.Errorf("Unexpected response. Expected: " + r + "\nGot: " + resp.Body.String())
}
@@ -106,7 +106,7 @@ func TestFix(t *testing.T) {
func TestOptimize(t *testing.T) {
gfp := "MASKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKRHDFFKSAMPEGYVQERTISFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYITADKQKNGIKANFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITHGMDELYK"
- req := httptest.NewRequest("POST", "/api/design/cds/optimize", strings.NewReader(fmt.Sprintf(`{"organism":"Escherichia coli","sequence":"%s"}`, gfp)))
+ req := httptest.NewRequest("POST", "/api/cds/optimize", strings.NewReader(fmt.Sprintf(`{"organism":"Escherichia coli","sequence":"%s"}`, gfp)))
resp := httptest.NewRecorder()
app.Router.ServeHTTP(resp, req)
@@ -118,7 +118,7 @@ func TestOptimize(t *testing.T) {
func TestTranslate(t *testing.T) {
gfp := "ATGGCATCCAAGGGCGAGGAGTTGTTCACCGGTGTTGTGCCGATCCTGGTGGAGCTGGACGGTGACGTGAACGGTCACAAATTTAGCGTGTCCGGTGAGGGTGAGGGTGATGCTACCTATGGCAAGCTGACCCTGAAATTCATTTGTACCACGGGTAAACTGCCGGTCCCGTGGCCGACGCTGGTGACCACCTTCAGCTATGGTGTGCAGTGTTTCAGCCGCTACCCGGACCACATGAAGCGCCACGACTTTTTCAAGAGCGCGATGCCGGAGGGTTATGTGCAAGAACGTACCATCAGCTTTAAAGATGATGGTAACTATAAGACCCGCGCGGAAGTCAAGTTTGAGGGTGACACGCTGGTGAATCGTATTGAGTTGAAGGGTATTGACTTTAAGGAGGATGGTAATATTTTGGGCCACAAACTGGAGTACAATTACAATAGCCACAATGTTTACATCACGGCAGATAAACAGAAGAACGGTATCAAGGCGAACTTCAAAATTCGTCACAACATTGAGGACGGTTCTGTTCAACTGGCGGACCATTACCAACAGAATACCCCGATCGGTGACGGCCCGGTTCTGCTGCCGGACAACCATTATTTGAGCACCCAGTCCGCCCTGAGCAAGGACCCGAATGAGAAGCGTGATCATATGGTTCTGCTGGAGTTTGTGACCGCGGCGGGCATCACCCACGGCATGGACGAGCTGTACAAG"
- req := httptest.NewRequest("POST", "/api/design/cds/translate", strings.NewReader(fmt.Sprintf(`{"translation_table":11,"sequence":"%s"}`, gfp)))
+ req := httptest.NewRequest("POST", "/api/cds/translate", strings.NewReader(fmt.Sprintf(`{"translation_table":11,"sequence":"%s"}`, gfp)))
resp := httptest.NewRecorder()
app.Router.ServeHTTP(resp, req)
@@ -141,7 +141,7 @@ func TestFragment(t *testing.T) {
if err != nil {
t.Errorf("Failed to marshal: %s", err)
}
- req := httptest.NewRequest("POST", "/api/simulate/fragment", bytes.NewBuffer(b))
+ req := httptest.NewRequest("POST", "/api/synthesis/fragment", bytes.NewBuffer(b))
resp := httptest.NewRecorder()
app.Router.ServeHTTP(resp, req)
@@ -149,7 +149,6 @@ func TestFragment(t *testing.T) {
if strings.TrimSpace(resp.Body.String()) != r {
t.Errorf("Unexpected response. Expected: " + r + "\nGot: " + resp.Body.String())
}
-
}
func TestPCR(t *testing.T) {
@@ -158,12 +157,12 @@ func TestPCR(t *testing.T) {
revPrimer := "TATATGGTCTCTTCATTTAAGAAAGCGCATTTTCCAGC"
primers := []string{fwdPrimer, revPrimer}
circular := false
- complexReq := &gen.PostSimulateComplexPcrJSONBody{Circular: &circular, Primers: primers, TargetTm: 55.0, Templates: []string{gene}}
+ complexReq := &gen.PostPcrComplexPcrJSONBody{Circular: &circular, Primers: primers, TargetTm: 55.0, Templates: []string{gene}}
b, err := json.Marshal(complexReq)
if err != nil {
t.Errorf("Failed to marshal: %s", err)
}
- req := httptest.NewRequest("POST", "/api/simulate/complex_pcr", bytes.NewBuffer(b))
+ req := httptest.NewRequest("POST", "/api/pcr/complex_pcr", bytes.NewBuffer(b))
resp := httptest.NewRecorder()
app.Router.ServeHTTP(resp, req)
r := `["TTATAGGTCTCATACTAATAATTACACCGAGATAACACATCATGGATAAACCGATACTCAAAGATTCTATGAAGCTATTTGAGGCACTTGGTACGATCAAGTCGCGCTCAATGTTTGGTGGCTTCGGACTTTTCGCTGATGAAACGATGTTTGCACTGGTTGTGAATGATCAACTTCACATACGAGCAGACCAGCAAACTTCATCTAACTTCGAGAAGCAAGGGCTAAAACCGTACGTTTATAAAAAGCGTGGTTTTCCAGTCGTTACTAAGTACTACGCGATTTCCGACGACTTGTGGGAATCCAGTGAACGCTTGATAGAAGTAGCGAAGAAGTCGTTAGAACAAGCCAATTTGGAAAAAAAGCAACAGGCAAGTAGTAAGCCCGACAGGTTGAAAGACCTGCCTAACTTACGACTAGCGACTGAACGAATGCTTAAGAAAGCTGGTATAAAATCAGTTGAACAACTTGAAGAGAAAGGTGCATTGAATGCTTACAAAGCGATACGTGACTCTCACTCCGCAAAAGTAAGTATTGAGCTACTCTGGGCTTTAGAAGGAGCGATAAACGGCACGCACTGGAGCGTCGTTCCTCAATCTCGCAGAGAAGAGCTGGAAAATGCGCTTTCTTAAATGAAGAGACCATATA"]`
@@ -171,12 +170,12 @@ func TestPCR(t *testing.T) {
t.Errorf("Unexpected response. Expected: " + r + "\nGot: " + resp.Body.String())
}
- simpleReq := &gen.PostSimulatePcrJSONBody{Circular: &circular, TargetTm: 55.0, Template: gene, ForwardPrimer: fwdPrimer, ReversePrimer: revPrimer}
+ simpleReq := &gen.PostPcrSimplePcrJSONBody{Circular: &circular, TargetTm: 55.0, Template: gene, ForwardPrimer: fwdPrimer, ReversePrimer: revPrimer}
b, err = json.Marshal(simpleReq)
if err != nil {
t.Errorf("Failed to marshal: %s", err)
}
- req = httptest.NewRequest("POST", "/api/simulate/pcr", bytes.NewBuffer(b))
+ req = httptest.NewRequest("POST", "/api/pcr/simple_pcr", bytes.NewBuffer(b))
resp = httptest.NewRecorder()
app.Router.ServeHTTP(resp, req)
r = `"TTATAGGTCTCATACTAATAATTACACCGAGATAACACATCATGGATAAACCGATACTCAAAGATTCTATGAAGCTATTTGAGGCACTTGGTACGATCAAGTCGCGCTCAATGTTTGGTGGCTTCGGACTTTTCGCTGATGAAACGATGTTTGCACTGGTTGTGAATGATCAACTTCACATACGAGCAGACCAGCAAACTTCATCTAACTTCGAGAAGCAAGGGCTAAAACCGTACGTTTATAAAAAGCGTGGTTTTCCAGTCGTTACTAAGTACTACGCGATTTCCGACGACTTGTGGGAATCCAGTGAACGCTTGATAGAAGTAGCGAAGAAGTCGTTAGAACAAGCCAATTTGGAAAAAAAGCAACAGGCAAGTAGTAAGCCCGACAGGTTGAAAGACCTGCCTAACTTACGACTAGCGACTGAACGAATGCTTAAGAAAGCTGGTATAAAATCAGTTGAACAACTTGAAGAGAAAGGTGCATTGAATGCTTACAAAGCGATACGTGACTCTCACTCCGCAAAAGTAAGTATTGAGCTACTCTGGGCTTTAGAAGGAGCGATAAACGGCACGCACTGGAGCGTCGTTCCTCAATCTCGCAGAGAAGAGCTGGAAAATGCGCTTTCTTAAATGAAGAGACCATATA"`
diff --git a/api/api/json/json.go b/api/api/json/json.go
index a1652ab..d974659 100644
--- a/api/api/json/json.go
+++ b/api/api/json/json.go
@@ -106,11 +106,11 @@ func (j jsonValue) MarshalJSON() (data []byte, err error) {
for key != lua.LNil {
if key.Type() != lua.LTNumber {
err = errInvalidKeys
- return
+ return data, err
}
if expectedKey != key {
err = errSparseArray
- return
+ return data, err
}
arr = append(arr, jsonValue{value, j.visited})
expectedKey++
@@ -122,7 +122,7 @@ func (j jsonValue) MarshalJSON() (data []byte, err error) {
for key != lua.LNil {
if key.Type() != lua.LTString {
err = errInvalidKeys
- return
+ return data, err
}
obj[key.String()] = jsonValue{value, j.visited}
key, value = converted.Next(key)
diff --git a/api/api/lua.go b/api/api/lua.go
deleted file mode 100644
index 88ddf54..0000000
--- a/api/api/lua.go
+++ /dev/null
@@ -1,249 +0,0 @@
-package api
-
-import (
- _ "embed"
- "encoding/json"
- "fmt"
- "net/http/httptest"
- "strings"
-
- luajson "github.com/koeng101/dnadesign/api/api/json"
- "github.com/koeng101/dnadesign/api/gen"
- lua "github.com/yuin/gopher-lua"
-)
-
-//go:embed json/json.lua
-var luaJson string
-
-func (app *App) ExecuteLua(data string, attachments []gen.Attachment) (string, string, error) {
- L := lua.NewState()
- defer L.Close()
- if err := L.DoString(luaJson); err != nil {
- panic(err)
- }
-
- // Add attachments
- luaAttachments := L.NewTable()
- for _, attachment := range attachments {
- luaAttachments.RawSetString(attachment.Name, lua.LString(attachment.Content))
- }
- L.SetGlobal("attachments", luaAttachments)
-
- // Add IO functions
- L.SetGlobal("fasta_parse", L.NewFunction(app.LuaIoFastaParse))
- L.SetGlobal("genbank_parse", L.NewFunction(app.LuaIoGenbankParse))
-
- // Add CDS design functions
- L.SetGlobal("fix", L.NewFunction(app.LuaDesignCdsFix))
- L.SetGlobal("optimize", L.NewFunction(app.LuaDesignCdsOptimize))
- L.SetGlobal("translate", L.NewFunction(app.LuaDesignCdsTranslate))
-
- // Add simulate functions
- L.SetGlobal("fragment", L.NewFunction(app.LuaSimulateFragment))
- L.SetGlobal("complex_pcr", L.NewFunction(app.LuaSimulateComplexPcr))
- L.SetGlobal("pcr", L.NewFunction(app.LuaSimulatePcr))
-
- // Execute the Lua script
- if err := L.DoString(data); err != nil {
- return "", "", err
- }
-
- // Extract log and output
- var logBuffer, outputBuffer string
- log := L.GetGlobal("log")
- if str, ok := log.(lua.LString); ok {
- logBuffer = string(str)
- }
- output := L.GetGlobal("output")
- if str, ok := output.(lua.LString); ok {
- outputBuffer = string(str)
- }
-
- return logBuffer, outputBuffer, nil
-}
-
-// luaResponse wraps the core of the lua data -> API calls -> lua data pipeline
-func (app *App) luaResponse(L *lua.LState, url, dataString string) int {
- req := httptest.NewRequest("POST", url, strings.NewReader(dataString))
- resp := httptest.NewRecorder()
- app.Router.ServeHTTP(resp, req)
-
- if resp.Code != 200 {
- L.RaiseError("HTTP request failed: " + resp.Body.String())
- return 0
- }
-
- var data interface{}
- if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
- L.RaiseError(err.Error())
- return 0
- }
- luaData := luajson.DecodeValue(L, data)
- L.Push(luaData)
- return 1
-}
-
-// luaStringArrayToGoSlice converts a Lua table at the given index in the Lua stack to a Go slice of strings.
-func luaStringArrayToGoSlice(L *lua.LState, index int) ([]string, error) {
- var goStrings []string
- lv := L.Get(index)
- if lv.Type() != lua.LTTable {
- if lv.Type() == lua.LTNil {
- return []string{}, nil
- }
- return nil, fmt.Errorf("argument at index %d is not a table", index)
- }
- tbl := L.ToTable(index)
-
- tbl.ForEach(func(key lua.LValue, value lua.LValue) {
- if str, ok := value.(lua.LString); ok {
- goStrings = append(goStrings, string(str))
- } else {
- // Handle non-string values if necessary
- }
- })
-
- return goStrings, nil
-}
-
-// LuaIoFastaParse implements fasta_parse in lua.
-func (app *App) LuaIoFastaParse(L *lua.LState) int {
- fastaData := L.ToString(1)
- return app.luaResponse(L, "/api/io/fasta/parse", fastaData)
-}
-
-// LuaIoGenbankParse implements genbank_parse in lua.
-func (app *App) LuaIoGenbankParse(L *lua.LState) int {
- genbankData := L.ToString(1)
- return app.luaResponse(L, "/api/io/genbank/parse", genbankData)
-}
-
-// LuaDesignCdsFix implements fix in lua.
-func (app *App) LuaDesignCdsFix(L *lua.LState) int {
- sequence := L.ToString(1)
- organism := L.ToString(2)
- removeSequences, err := luaStringArrayToGoSlice(L, 3)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
-
- type fix struct {
- Sequence string `json:"sequence"`
- Organism string `json:"organism"`
- RemoveSequences []string `json:"remove_sequences"`
- }
- req := &fix{Sequence: sequence, Organism: organism, RemoveSequences: removeSequences}
- b, err := json.Marshal(req)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
- return app.luaResponse(L, "/api/design/cds/fix", string(b))
-}
-
-// LuaDesignCdsOptimize implements optimize in lua.
-func (app *App) LuaDesignCdsOptimize(L *lua.LState) int {
- sequence := L.ToString(1)
- organism := L.ToString(2)
- seed := L.ToInt(3)
-
- type optimize struct {
- Sequence string `json:"sequence"`
- Organism string `json:"organism"`
- Seed int `json:"seed"`
- }
- req := &optimize{Sequence: sequence, Organism: organism, Seed: seed}
- b, err := json.Marshal(req)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
- return app.luaResponse(L, "/api/design/cds/optimize", string(b))
-}
-
-// LuaDesignCdsTranslate implements translate in lua.
-func (app *App) LuaDesignCdsTranslate(L *lua.LState) int {
- sequence := L.ToString(1)
- translationTable := L.ToInt(2)
-
- type translate struct {
- Sequence string `json:"sequence"`
- TranslationTable int `json:"translation_table"`
- }
- req := &translate{Sequence: sequence, TranslationTable: translationTable}
- b, err := json.Marshal(req)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
- return app.luaResponse(L, "/api/design/cds/translate", string(b))
-}
-
-// LuaSimulateFragment implements fragment in lua.
-func (app *App) LuaSimulateFragment(L *lua.LState) int {
- sequence := L.ToString(1)
- minFragmentSize := L.ToInt(2)
- maxFragmentSize := L.ToInt(3)
- excludeOverhangs, err := luaStringArrayToGoSlice(L, 4)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
-
- type fragmentStruct struct {
- Sequence string `json:"sequence"`
- MinFragmentSize int `json:"min_fragment_size"`
- MaxFragmentSize int `json:"max_fragment_size"`
- ExcludeOverhangs []string `json:"exclude_overhangs"`
- }
- req := &fragmentStruct{Sequence: sequence, MinFragmentSize: minFragmentSize, MaxFragmentSize: maxFragmentSize, ExcludeOverhangs: excludeOverhangs}
- b, err := json.Marshal(req)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
- return app.luaResponse(L, "/api/simulate/fragment", string(b))
-
-}
-
-// LuaSimulateComplexPcr implements complex pcr in lua.
-func (app *App) LuaSimulateComplexPcr(L *lua.LState) int {
- templates, err := luaStringArrayToGoSlice(L, 1)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
- primers, err := luaStringArrayToGoSlice(L, 2)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
- targetTm := L.ToNumber(3)
- circular := L.ToBool(4)
-
- req := &gen.PostSimulateComplexPcrJSONBody{Circular: &circular, Primers: primers, TargetTm: float32(targetTm), Templates: templates}
- b, err := json.Marshal(req)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
- return app.luaResponse(L, "/api/simulate/complex_pcr", string(b))
-}
-
-// LuaSimulatePcr implements pcr in lua
-func (app *App) LuaSimulatePcr(L *lua.LState) int {
- template := L.ToString(1)
- forwardPrimer := L.ToString(2)
- reversePrimer := L.ToString(3)
- targetTm := L.ToNumber(4)
- circular := L.ToBool(5)
-
- req := &gen.PostSimulatePcrJSONBody{Circular: &circular, Template: template, TargetTm: float32(targetTm), ForwardPrimer: forwardPrimer, ReversePrimer: reversePrimer}
- b, err := json.Marshal(req)
- if err != nil {
- L.RaiseError(err.Error())
- return 0
- }
- return app.luaResponse(L, "/api/simulate/pcr", string(b))
-}
diff --git a/api/api/templates/scalar.html b/api/api/templates/scalar.html
new file mode 100644
index 0000000..cf1b17e
--- /dev/null
+++ b/api/api/templates/scalar.html
@@ -0,0 +1,23 @@
+
+
+
+ API Reference
+
+
+
+
+
+
+
+
+
+
+
diff --git a/api/gen/dnadesign-server.gen.go b/api/gen/dnadesign-server.gen.go
index 9ce6d47..198df07 100644
--- a/api/gen/dnadesign-server.gen.go
+++ b/api/gen/dnadesign-server.gen.go
@@ -24,41 +24,65 @@ import (
// ServerInterface represents all server handlers.
type ServerInterface interface {
// Fix CDS
- // (POST /design/cds/fix)
- PostDesignCdsFix(w http.ResponseWriter, r *http.Request)
+ // (POST /cds/fix)
+ PostCdsFix(w http.ResponseWriter, r *http.Request)
// Optimize CDS.
- // (POST /design/cds/optimize)
- PostDesignCdsOptimize(w http.ResponseWriter, r *http.Request)
+ // (POST /cds/optimize)
+ PostCdsOptimize(w http.ResponseWriter, r *http.Request)
// Translate CDS
- // (POST /design/cds/translate)
- PostDesignCdsTranslate(w http.ResponseWriter, r *http.Request)
+ // (POST /cds/translate)
+ PostCdsTranslate(w http.ResponseWriter, r *http.Request)
+ // Simulate Golden Gate assembly
+ // (POST /cloning/goldengate)
+ PostCloningGoldengate(w http.ResponseWriter, r *http.Request)
+ // Simulate ligation
+ // (POST /cloning/ligate)
+ PostCloningLigate(w http.ResponseWriter, r *http.Request)
+ // Simulate restriction digest
+ // (POST /cloning/restriction_digest)
+ PostCloningRestrictionDigest(w http.ResponseWriter, r *http.Request)
// Run a lua script
// (POST /execute_lua)
PostExecuteLua(w http.ResponseWriter, r *http.Request)
// Parse FASTA data
// (POST /io/fasta/parse)
PostIoFastaParse(w http.ResponseWriter, r *http.Request)
+ // Write FASTA data
+ // (POST /io/fasta/write)
+ PostIoFastaWrite(w http.ResponseWriter, r *http.Request)
+ // Parse FASTQ data
+ // (POST /io/fastq/parse)
+ PostIoFastqParse(w http.ResponseWriter, r *http.Request)
+ // Write FASTQ data
+ // (POST /io/fastq/write)
+ PostIoFastqWrite(w http.ResponseWriter, r *http.Request)
// Parse Genbank data
// (POST /io/genbank/parse)
PostIoGenbankParse(w http.ResponseWriter, r *http.Request)
+ // Write Genbank data
+ // (POST /io/genbank/write)
+ PostIoGenbankWrite(w http.ResponseWriter, r *http.Request)
// Simulate PCR
- // (POST /simulate/complex_pcr)
- PostSimulateComplexPcr(w http.ResponseWriter, r *http.Request)
- // Fragment CDS
- // (POST /simulate/fragment)
- PostSimulateFragment(w http.ResponseWriter, r *http.Request)
- // Simulate Golden Gate assembly
- // (POST /simulate/goldengate)
- PostSimulateGoldengate(w http.ResponseWriter, r *http.Request)
- // Simulate ligation
- // (POST /simulate/ligate)
- PostSimulateLigate(w http.ResponseWriter, r *http.Request)
+ // (POST /pcr/complex_pcr)
+ PostPcrComplexPcr(w http.ResponseWriter, r *http.Request)
+ // Generate De Bruijn sequence-based barcodes
+ // (POST /pcr/primers/debruijn_barcodes)
+ PostPcrPrimersDebruijnBarcodes(w http.ResponseWriter, r *http.Request)
+ // Calculate Melting Temperature using Marmur Doty method
+ // (POST /pcr/primers/marmur_doty)
+ PostPcrPrimersMarmurDoty(w http.ResponseWriter, r *http.Request)
+ // Calculate Melting Temperature
+ // (POST /pcr/primers/melting_temperature)
+ PostPcrPrimersMeltingTemperature(w http.ResponseWriter, r *http.Request)
+ // Calculate Melting Temperature using Santa Lucia method
+ // (POST /pcr/primers/santa_lucia)
+ PostPcrPrimersSantaLucia(w http.ResponseWriter, r *http.Request)
// Simulate a simple PCR
- // (POST /simulate/pcr)
- PostSimulatePcr(w http.ResponseWriter, r *http.Request)
- // Simulate restriction digest
- // (POST /simulate/restriction_digest)
- PostSimulateRestrictionDigest(w http.ResponseWriter, r *http.Request)
+ // (POST /pcr/simple_pcr)
+ PostPcrSimplePcr(w http.ResponseWriter, r *http.Request)
+ // Fragment CDS
+ // (POST /synthesis/fragment)
+ PostSynthesisFragment(w http.ResponseWriter, r *http.Request)
}
// Unimplemented server implementation that returns http.StatusNotImplemented for each endpoint.
@@ -66,20 +90,38 @@ type ServerInterface interface {
type Unimplemented struct{}
// Fix CDS
-// (POST /design/cds/fix)
-func (_ Unimplemented) PostDesignCdsFix(w http.ResponseWriter, r *http.Request) {
+// (POST /cds/fix)
+func (_ Unimplemented) PostCdsFix(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
// Optimize CDS.
-// (POST /design/cds/optimize)
-func (_ Unimplemented) PostDesignCdsOptimize(w http.ResponseWriter, r *http.Request) {
+// (POST /cds/optimize)
+func (_ Unimplemented) PostCdsOptimize(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
// Translate CDS
-// (POST /design/cds/translate)
-func (_ Unimplemented) PostDesignCdsTranslate(w http.ResponseWriter, r *http.Request) {
+// (POST /cds/translate)
+func (_ Unimplemented) PostCdsTranslate(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNotImplemented)
+}
+
+// Simulate Golden Gate assembly
+// (POST /cloning/goldengate)
+func (_ Unimplemented) PostCloningGoldengate(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNotImplemented)
+}
+
+// Simulate ligation
+// (POST /cloning/ligate)
+func (_ Unimplemented) PostCloningLigate(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNotImplemented)
+}
+
+// Simulate restriction digest
+// (POST /cloning/restriction_digest)
+func (_ Unimplemented) PostCloningRestrictionDigest(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
@@ -95,45 +137,75 @@ func (_ Unimplemented) PostIoFastaParse(w http.ResponseWriter, r *http.Request)
w.WriteHeader(http.StatusNotImplemented)
}
+// Write FASTA data
+// (POST /io/fasta/write)
+func (_ Unimplemented) PostIoFastaWrite(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNotImplemented)
+}
+
+// Parse FASTQ data
+// (POST /io/fastq/parse)
+func (_ Unimplemented) PostIoFastqParse(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNotImplemented)
+}
+
+// Write FASTQ data
+// (POST /io/fastq/write)
+func (_ Unimplemented) PostIoFastqWrite(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNotImplemented)
+}
+
// Parse Genbank data
// (POST /io/genbank/parse)
func (_ Unimplemented) PostIoGenbankParse(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
+// Write Genbank data
+// (POST /io/genbank/write)
+func (_ Unimplemented) PostIoGenbankWrite(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNotImplemented)
+}
+
// Simulate PCR
-// (POST /simulate/complex_pcr)
-func (_ Unimplemented) PostSimulateComplexPcr(w http.ResponseWriter, r *http.Request) {
+// (POST /pcr/complex_pcr)
+func (_ Unimplemented) PostPcrComplexPcr(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
-// Fragment CDS
-// (POST /simulate/fragment)
-func (_ Unimplemented) PostSimulateFragment(w http.ResponseWriter, r *http.Request) {
+// Generate De Bruijn sequence-based barcodes
+// (POST /pcr/primers/debruijn_barcodes)
+func (_ Unimplemented) PostPcrPrimersDebruijnBarcodes(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
-// Simulate Golden Gate assembly
-// (POST /simulate/goldengate)
-func (_ Unimplemented) PostSimulateGoldengate(w http.ResponseWriter, r *http.Request) {
+// Calculate Melting Temperature using Marmur Doty method
+// (POST /pcr/primers/marmur_doty)
+func (_ Unimplemented) PostPcrPrimersMarmurDoty(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
-// Simulate ligation
-// (POST /simulate/ligate)
-func (_ Unimplemented) PostSimulateLigate(w http.ResponseWriter, r *http.Request) {
+// Calculate Melting Temperature
+// (POST /pcr/primers/melting_temperature)
+func (_ Unimplemented) PostPcrPrimersMeltingTemperature(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNotImplemented)
+}
+
+// Calculate Melting Temperature using Santa Lucia method
+// (POST /pcr/primers/santa_lucia)
+func (_ Unimplemented) PostPcrPrimersSantaLucia(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
// Simulate a simple PCR
-// (POST /simulate/pcr)
-func (_ Unimplemented) PostSimulatePcr(w http.ResponseWriter, r *http.Request) {
+// (POST /pcr/simple_pcr)
+func (_ Unimplemented) PostPcrSimplePcr(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
-// Simulate restriction digest
-// (POST /simulate/restriction_digest)
-func (_ Unimplemented) PostSimulateRestrictionDigest(w http.ResponseWriter, r *http.Request) {
+// Fragment CDS
+// (POST /synthesis/fragment)
+func (_ Unimplemented) PostSynthesisFragment(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
}
@@ -146,12 +218,12 @@ type ServerInterfaceWrapper struct {
type MiddlewareFunc func(http.Handler) http.Handler
-// PostDesignCdsFix operation middleware
-func (siw *ServerInterfaceWrapper) PostDesignCdsFix(w http.ResponseWriter, r *http.Request) {
+// PostCdsFix operation middleware
+func (siw *ServerInterfaceWrapper) PostCdsFix(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- siw.Handler.PostDesignCdsFix(w, r)
+ siw.Handler.PostCdsFix(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
@@ -161,12 +233,12 @@ func (siw *ServerInterfaceWrapper) PostDesignCdsFix(w http.ResponseWriter, r *ht
handler.ServeHTTP(w, r.WithContext(ctx))
}
-// PostDesignCdsOptimize operation middleware
-func (siw *ServerInterfaceWrapper) PostDesignCdsOptimize(w http.ResponseWriter, r *http.Request) {
+// PostCdsOptimize operation middleware
+func (siw *ServerInterfaceWrapper) PostCdsOptimize(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- siw.Handler.PostDesignCdsOptimize(w, r)
+ siw.Handler.PostCdsOptimize(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
@@ -176,12 +248,57 @@ func (siw *ServerInterfaceWrapper) PostDesignCdsOptimize(w http.ResponseWriter,
handler.ServeHTTP(w, r.WithContext(ctx))
}
-// PostDesignCdsTranslate operation middleware
-func (siw *ServerInterfaceWrapper) PostDesignCdsTranslate(w http.ResponseWriter, r *http.Request) {
+// PostCdsTranslate operation middleware
+func (siw *ServerInterfaceWrapper) PostCdsTranslate(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- siw.Handler.PostDesignCdsTranslate(w, r)
+ siw.Handler.PostCdsTranslate(w, r)
+ }))
+
+ for _, middleware := range siw.HandlerMiddlewares {
+ handler = middleware(handler)
+ }
+
+ handler.ServeHTTP(w, r.WithContext(ctx))
+}
+
+// PostCloningGoldengate operation middleware
+func (siw *ServerInterfaceWrapper) PostCloningGoldengate(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+
+ handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ siw.Handler.PostCloningGoldengate(w, r)
+ }))
+
+ for _, middleware := range siw.HandlerMiddlewares {
+ handler = middleware(handler)
+ }
+
+ handler.ServeHTTP(w, r.WithContext(ctx))
+}
+
+// PostCloningLigate operation middleware
+func (siw *ServerInterfaceWrapper) PostCloningLigate(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+
+ handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ siw.Handler.PostCloningLigate(w, r)
+ }))
+
+ for _, middleware := range siw.HandlerMiddlewares {
+ handler = middleware(handler)
+ }
+
+ handler.ServeHTTP(w, r.WithContext(ctx))
+}
+
+// PostCloningRestrictionDigest operation middleware
+func (siw *ServerInterfaceWrapper) PostCloningRestrictionDigest(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+
+ handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ siw.Handler.PostCloningRestrictionDigest(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
@@ -221,6 +338,51 @@ func (siw *ServerInterfaceWrapper) PostIoFastaParse(w http.ResponseWriter, r *ht
handler.ServeHTTP(w, r.WithContext(ctx))
}
+// PostIoFastaWrite operation middleware
+func (siw *ServerInterfaceWrapper) PostIoFastaWrite(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+
+ handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ siw.Handler.PostIoFastaWrite(w, r)
+ }))
+
+ for _, middleware := range siw.HandlerMiddlewares {
+ handler = middleware(handler)
+ }
+
+ handler.ServeHTTP(w, r.WithContext(ctx))
+}
+
+// PostIoFastqParse operation middleware
+func (siw *ServerInterfaceWrapper) PostIoFastqParse(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+
+ handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ siw.Handler.PostIoFastqParse(w, r)
+ }))
+
+ for _, middleware := range siw.HandlerMiddlewares {
+ handler = middleware(handler)
+ }
+
+ handler.ServeHTTP(w, r.WithContext(ctx))
+}
+
+// PostIoFastqWrite operation middleware
+func (siw *ServerInterfaceWrapper) PostIoFastqWrite(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+
+ handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ siw.Handler.PostIoFastqWrite(w, r)
+ }))
+
+ for _, middleware := range siw.HandlerMiddlewares {
+ handler = middleware(handler)
+ }
+
+ handler.ServeHTTP(w, r.WithContext(ctx))
+}
+
// PostIoGenbankParse operation middleware
func (siw *ServerInterfaceWrapper) PostIoGenbankParse(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
@@ -236,12 +398,27 @@ func (siw *ServerInterfaceWrapper) PostIoGenbankParse(w http.ResponseWriter, r *
handler.ServeHTTP(w, r.WithContext(ctx))
}
-// PostSimulateComplexPcr operation middleware
-func (siw *ServerInterfaceWrapper) PostSimulateComplexPcr(w http.ResponseWriter, r *http.Request) {
+// PostIoGenbankWrite operation middleware
+func (siw *ServerInterfaceWrapper) PostIoGenbankWrite(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+
+ handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ siw.Handler.PostIoGenbankWrite(w, r)
+ }))
+
+ for _, middleware := range siw.HandlerMiddlewares {
+ handler = middleware(handler)
+ }
+
+ handler.ServeHTTP(w, r.WithContext(ctx))
+}
+
+// PostPcrComplexPcr operation middleware
+func (siw *ServerInterfaceWrapper) PostPcrComplexPcr(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- siw.Handler.PostSimulateComplexPcr(w, r)
+ siw.Handler.PostPcrComplexPcr(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
@@ -251,12 +428,12 @@ func (siw *ServerInterfaceWrapper) PostSimulateComplexPcr(w http.ResponseWriter,
handler.ServeHTTP(w, r.WithContext(ctx))
}
-// PostSimulateFragment operation middleware
-func (siw *ServerInterfaceWrapper) PostSimulateFragment(w http.ResponseWriter, r *http.Request) {
+// PostPcrPrimersDebruijnBarcodes operation middleware
+func (siw *ServerInterfaceWrapper) PostPcrPrimersDebruijnBarcodes(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- siw.Handler.PostSimulateFragment(w, r)
+ siw.Handler.PostPcrPrimersDebruijnBarcodes(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
@@ -266,12 +443,12 @@ func (siw *ServerInterfaceWrapper) PostSimulateFragment(w http.ResponseWriter, r
handler.ServeHTTP(w, r.WithContext(ctx))
}
-// PostSimulateGoldengate operation middleware
-func (siw *ServerInterfaceWrapper) PostSimulateGoldengate(w http.ResponseWriter, r *http.Request) {
+// PostPcrPrimersMarmurDoty operation middleware
+func (siw *ServerInterfaceWrapper) PostPcrPrimersMarmurDoty(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- siw.Handler.PostSimulateGoldengate(w, r)
+ siw.Handler.PostPcrPrimersMarmurDoty(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
@@ -281,12 +458,12 @@ func (siw *ServerInterfaceWrapper) PostSimulateGoldengate(w http.ResponseWriter,
handler.ServeHTTP(w, r.WithContext(ctx))
}
-// PostSimulateLigate operation middleware
-func (siw *ServerInterfaceWrapper) PostSimulateLigate(w http.ResponseWriter, r *http.Request) {
+// PostPcrPrimersMeltingTemperature operation middleware
+func (siw *ServerInterfaceWrapper) PostPcrPrimersMeltingTemperature(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- siw.Handler.PostSimulateLigate(w, r)
+ siw.Handler.PostPcrPrimersMeltingTemperature(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
@@ -296,12 +473,12 @@ func (siw *ServerInterfaceWrapper) PostSimulateLigate(w http.ResponseWriter, r *
handler.ServeHTTP(w, r.WithContext(ctx))
}
-// PostSimulatePcr operation middleware
-func (siw *ServerInterfaceWrapper) PostSimulatePcr(w http.ResponseWriter, r *http.Request) {
+// PostPcrPrimersSantaLucia operation middleware
+func (siw *ServerInterfaceWrapper) PostPcrPrimersSantaLucia(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- siw.Handler.PostSimulatePcr(w, r)
+ siw.Handler.PostPcrPrimersSantaLucia(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
@@ -311,12 +488,27 @@ func (siw *ServerInterfaceWrapper) PostSimulatePcr(w http.ResponseWriter, r *htt
handler.ServeHTTP(w, r.WithContext(ctx))
}
-// PostSimulateRestrictionDigest operation middleware
-func (siw *ServerInterfaceWrapper) PostSimulateRestrictionDigest(w http.ResponseWriter, r *http.Request) {
+// PostPcrSimplePcr operation middleware
+func (siw *ServerInterfaceWrapper) PostPcrSimplePcr(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- siw.Handler.PostSimulateRestrictionDigest(w, r)
+ siw.Handler.PostPcrSimplePcr(w, r)
+ }))
+
+ for _, middleware := range siw.HandlerMiddlewares {
+ handler = middleware(handler)
+ }
+
+ handler.ServeHTTP(w, r.WithContext(ctx))
+}
+
+// PostSynthesisFragment operation middleware
+func (siw *ServerInterfaceWrapper) PostSynthesisFragment(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+
+ handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ siw.Handler.PostSynthesisFragment(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
@@ -440,13 +632,22 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl
}
r.Group(func(r chi.Router) {
- r.Post(options.BaseURL+"/design/cds/fix", wrapper.PostDesignCdsFix)
+ r.Post(options.BaseURL+"/cds/fix", wrapper.PostCdsFix)
+ })
+ r.Group(func(r chi.Router) {
+ r.Post(options.BaseURL+"/cds/optimize", wrapper.PostCdsOptimize)
+ })
+ r.Group(func(r chi.Router) {
+ r.Post(options.BaseURL+"/cds/translate", wrapper.PostCdsTranslate)
})
r.Group(func(r chi.Router) {
- r.Post(options.BaseURL+"/design/cds/optimize", wrapper.PostDesignCdsOptimize)
+ r.Post(options.BaseURL+"/cloning/goldengate", wrapper.PostCloningGoldengate)
})
r.Group(func(r chi.Router) {
- r.Post(options.BaseURL+"/design/cds/translate", wrapper.PostDesignCdsTranslate)
+ r.Post(options.BaseURL+"/cloning/ligate", wrapper.PostCloningLigate)
+ })
+ r.Group(func(r chi.Router) {
+ r.Post(options.BaseURL+"/cloning/restriction_digest", wrapper.PostCloningRestrictionDigest)
})
r.Group(func(r chi.Router) {
r.Post(options.BaseURL+"/execute_lua", wrapper.PostExecuteLua)
@@ -454,54 +655,69 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl
r.Group(func(r chi.Router) {
r.Post(options.BaseURL+"/io/fasta/parse", wrapper.PostIoFastaParse)
})
+ r.Group(func(r chi.Router) {
+ r.Post(options.BaseURL+"/io/fasta/write", wrapper.PostIoFastaWrite)
+ })
+ r.Group(func(r chi.Router) {
+ r.Post(options.BaseURL+"/io/fastq/parse", wrapper.PostIoFastqParse)
+ })
+ r.Group(func(r chi.Router) {
+ r.Post(options.BaseURL+"/io/fastq/write", wrapper.PostIoFastqWrite)
+ })
r.Group(func(r chi.Router) {
r.Post(options.BaseURL+"/io/genbank/parse", wrapper.PostIoGenbankParse)
})
r.Group(func(r chi.Router) {
- r.Post(options.BaseURL+"/simulate/complex_pcr", wrapper.PostSimulateComplexPcr)
+ r.Post(options.BaseURL+"/io/genbank/write", wrapper.PostIoGenbankWrite)
+ })
+ r.Group(func(r chi.Router) {
+ r.Post(options.BaseURL+"/pcr/complex_pcr", wrapper.PostPcrComplexPcr)
+ })
+ r.Group(func(r chi.Router) {
+ r.Post(options.BaseURL+"/pcr/primers/debruijn_barcodes", wrapper.PostPcrPrimersDebruijnBarcodes)
})
r.Group(func(r chi.Router) {
- r.Post(options.BaseURL+"/simulate/fragment", wrapper.PostSimulateFragment)
+ r.Post(options.BaseURL+"/pcr/primers/marmur_doty", wrapper.PostPcrPrimersMarmurDoty)
})
r.Group(func(r chi.Router) {
- r.Post(options.BaseURL+"/simulate/goldengate", wrapper.PostSimulateGoldengate)
+ r.Post(options.BaseURL+"/pcr/primers/melting_temperature", wrapper.PostPcrPrimersMeltingTemperature)
})
r.Group(func(r chi.Router) {
- r.Post(options.BaseURL+"/simulate/ligate", wrapper.PostSimulateLigate)
+ r.Post(options.BaseURL+"/pcr/primers/santa_lucia", wrapper.PostPcrPrimersSantaLucia)
})
r.Group(func(r chi.Router) {
- r.Post(options.BaseURL+"/simulate/pcr", wrapper.PostSimulatePcr)
+ r.Post(options.BaseURL+"/pcr/simple_pcr", wrapper.PostPcrSimplePcr)
})
r.Group(func(r chi.Router) {
- r.Post(options.BaseURL+"/simulate/restriction_digest", wrapper.PostSimulateRestrictionDigest)
+ r.Post(options.BaseURL+"/synthesis/fragment", wrapper.PostSynthesisFragment)
})
return r
}
-type PostDesignCdsFixRequestObject struct {
- Body *PostDesignCdsFixJSONRequestBody
+type PostCdsFixRequestObject struct {
+ Body *PostCdsFixJSONRequestBody
}
-type PostDesignCdsFixResponseObject interface {
- VisitPostDesignCdsFixResponse(w http.ResponseWriter) error
+type PostCdsFixResponseObject interface {
+ VisitPostCdsFixResponse(w http.ResponseWriter) error
}
-type PostDesignCdsFix200JSONResponse struct {
+type PostCdsFix200JSONResponse struct {
Changes []Change `json:"changes"`
Sequence string `json:"sequence"`
}
-func (response PostDesignCdsFix200JSONResponse) VisitPostDesignCdsFixResponse(w http.ResponseWriter) error {
+func (response PostCdsFix200JSONResponse) VisitPostCdsFixResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(200)
return json.NewEncoder(w).Encode(response)
}
-type PostDesignCdsFix400TextResponse string
+type PostCdsFix400TextResponse string
-func (response PostDesignCdsFix400TextResponse) VisitPostDesignCdsFixResponse(w http.ResponseWriter) error {
+func (response PostCdsFix400TextResponse) VisitPostCdsFixResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(400)
@@ -509,9 +725,9 @@ func (response PostDesignCdsFix400TextResponse) VisitPostDesignCdsFixResponse(w
return err
}
-type PostDesignCdsFix500TextResponse string
+type PostCdsFix500TextResponse string
-func (response PostDesignCdsFix500TextResponse) VisitPostDesignCdsFixResponse(w http.ResponseWriter) error {
+func (response PostCdsFix500TextResponse) VisitPostCdsFixResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(500)
@@ -519,26 +735,26 @@ func (response PostDesignCdsFix500TextResponse) VisitPostDesignCdsFixResponse(w
return err
}
-type PostDesignCdsOptimizeRequestObject struct {
- Body *PostDesignCdsOptimizeJSONRequestBody
+type PostCdsOptimizeRequestObject struct {
+ Body *PostCdsOptimizeJSONRequestBody
}
-type PostDesignCdsOptimizeResponseObject interface {
- VisitPostDesignCdsOptimizeResponse(w http.ResponseWriter) error
+type PostCdsOptimizeResponseObject interface {
+ VisitPostCdsOptimizeResponse(w http.ResponseWriter) error
}
-type PostDesignCdsOptimize200JSONResponse string
+type PostCdsOptimize200JSONResponse string
-func (response PostDesignCdsOptimize200JSONResponse) VisitPostDesignCdsOptimizeResponse(w http.ResponseWriter) error {
+func (response PostCdsOptimize200JSONResponse) VisitPostCdsOptimizeResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(200)
return json.NewEncoder(w).Encode(response)
}
-type PostDesignCdsOptimize400TextResponse string
+type PostCdsOptimize400TextResponse string
-func (response PostDesignCdsOptimize400TextResponse) VisitPostDesignCdsOptimizeResponse(w http.ResponseWriter) error {
+func (response PostCdsOptimize400TextResponse) VisitPostCdsOptimizeResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(400)
@@ -546,9 +762,9 @@ func (response PostDesignCdsOptimize400TextResponse) VisitPostDesignCdsOptimizeR
return err
}
-type PostDesignCdsOptimize500TextResponse string
+type PostCdsOptimize500TextResponse string
-func (response PostDesignCdsOptimize500TextResponse) VisitPostDesignCdsOptimizeResponse(w http.ResponseWriter) error {
+func (response PostCdsOptimize500TextResponse) VisitPostCdsOptimizeResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(500)
@@ -556,26 +772,94 @@ func (response PostDesignCdsOptimize500TextResponse) VisitPostDesignCdsOptimizeR
return err
}
-type PostDesignCdsTranslateRequestObject struct {
- Body *PostDesignCdsTranslateJSONRequestBody
+type PostCdsTranslateRequestObject struct {
+ Body *PostCdsTranslateJSONRequestBody
}
-type PostDesignCdsTranslateResponseObject interface {
- VisitPostDesignCdsTranslateResponse(w http.ResponseWriter) error
+type PostCdsTranslateResponseObject interface {
+ VisitPostCdsTranslateResponse(w http.ResponseWriter) error
}
-type PostDesignCdsTranslate200JSONResponse string
+type PostCdsTranslate200JSONResponse string
-func (response PostDesignCdsTranslate200JSONResponse) VisitPostDesignCdsTranslateResponse(w http.ResponseWriter) error {
+func (response PostCdsTranslate200JSONResponse) VisitPostCdsTranslateResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(200)
return json.NewEncoder(w).Encode(response)
}
-type PostDesignCdsTranslate500TextResponse string
+type PostCdsTranslate500TextResponse string
-func (response PostDesignCdsTranslate500TextResponse) VisitPostDesignCdsTranslateResponse(w http.ResponseWriter) error {
+func (response PostCdsTranslate500TextResponse) VisitPostCdsTranslateResponse(w http.ResponseWriter) error {
+ w.Header().Set("Content-Type", "text/plain")
+ w.WriteHeader(500)
+
+ _, err := w.Write([]byte(response))
+ return err
+}
+
+type PostCloningGoldengateRequestObject struct {
+ Body *PostCloningGoldengateJSONRequestBody
+}
+
+type PostCloningGoldengateResponseObject interface {
+ VisitPostCloningGoldengateResponse(w http.ResponseWriter) error
+}
+
+type PostCloningGoldengate200Response struct {
+}
+
+func (response PostCloningGoldengate200Response) VisitPostCloningGoldengateResponse(w http.ResponseWriter) error {
+ w.WriteHeader(200)
+ return nil
+}
+
+type PostCloningGoldengate500TextResponse string
+
+func (response PostCloningGoldengate500TextResponse) VisitPostCloningGoldengateResponse(w http.ResponseWriter) error {
+ w.Header().Set("Content-Type", "text/plain")
+ w.WriteHeader(500)
+
+ _, err := w.Write([]byte(response))
+ return err
+}
+
+type PostCloningLigateRequestObject struct {
+ Body *PostCloningLigateJSONRequestBody
+}
+
+type PostCloningLigateResponseObject interface {
+ VisitPostCloningLigateResponse(w http.ResponseWriter) error
+}
+
+type PostCloningLigate200Response struct {
+}
+
+func (response PostCloningLigate200Response) VisitPostCloningLigateResponse(w http.ResponseWriter) error {
+ w.WriteHeader(200)
+ return nil
+}
+
+type PostCloningRestrictionDigestRequestObject struct {
+ Body *PostCloningRestrictionDigestJSONRequestBody
+}
+
+type PostCloningRestrictionDigestResponseObject interface {
+ VisitPostCloningRestrictionDigestResponse(w http.ResponseWriter) error
+}
+
+type PostCloningRestrictionDigest200Response struct {
+}
+
+func (response PostCloningRestrictionDigest200Response) VisitPostCloningRestrictionDigestResponse(w http.ResponseWriter) error {
+ w.WriteHeader(200)
+ return nil
+}
+
+type PostCloningRestrictionDigest500TextResponse string
+
+func (response PostCloningRestrictionDigest500TextResponse) VisitPostCloningRestrictionDigestResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(500)
@@ -640,6 +924,55 @@ func (response PostIoFastaParse500TextResponse) VisitPostIoFastaParseResponse(w
return err
}
+type PostIoFastaWriteRequestObject struct {
+ Body *PostIoFastaWriteJSONRequestBody
+}
+
+type PostIoFastaWriteResponseObject interface {
+ VisitPostIoFastaWriteResponse(w http.ResponseWriter) error
+}
+
+type PostIoFastaWrite200Response struct {
+}
+
+func (response PostIoFastaWrite200Response) VisitPostIoFastaWriteResponse(w http.ResponseWriter) error {
+ w.WriteHeader(200)
+ return nil
+}
+
+type PostIoFastqParseRequestObject struct {
+ Body *PostIoFastqParseTextRequestBody
+}
+
+type PostIoFastqParseResponseObject interface {
+ VisitPostIoFastqParseResponse(w http.ResponseWriter) error
+}
+
+type PostIoFastqParse200JSONResponse []FastqRead
+
+func (response PostIoFastqParse200JSONResponse) VisitPostIoFastqParseResponse(w http.ResponseWriter) error {
+ w.Header().Set("Content-Type", "application/json")
+ w.WriteHeader(200)
+
+ return json.NewEncoder(w).Encode(response)
+}
+
+type PostIoFastqWriteRequestObject struct {
+ Body *PostIoFastqWriteJSONRequestBody
+}
+
+type PostIoFastqWriteResponseObject interface {
+ VisitPostIoFastqWriteResponse(w http.ResponseWriter) error
+}
+
+type PostIoFastqWrite200Response struct {
+}
+
+func (response PostIoFastqWrite200Response) VisitPostIoFastqWriteResponse(w http.ResponseWriter) error {
+ w.WriteHeader(200)
+ return nil
+}
+
type PostIoGenbankParseRequestObject struct {
Body *PostIoGenbankParseTextRequestBody
}
@@ -667,26 +1000,42 @@ func (response PostIoGenbankParse500TextResponse) VisitPostIoGenbankParseRespons
return err
}
-type PostSimulateComplexPcrRequestObject struct {
- Body *PostSimulateComplexPcrJSONRequestBody
+type PostIoGenbankWriteRequestObject struct {
+ Body *PostIoGenbankWriteJSONRequestBody
+}
+
+type PostIoGenbankWriteResponseObject interface {
+ VisitPostIoGenbankWriteResponse(w http.ResponseWriter) error
+}
+
+type PostIoGenbankWrite200Response struct {
+}
+
+func (response PostIoGenbankWrite200Response) VisitPostIoGenbankWriteResponse(w http.ResponseWriter) error {
+ w.WriteHeader(200)
+ return nil
}
-type PostSimulateComplexPcrResponseObject interface {
- VisitPostSimulateComplexPcrResponse(w http.ResponseWriter) error
+type PostPcrComplexPcrRequestObject struct {
+ Body *PostPcrComplexPcrJSONRequestBody
}
-type PostSimulateComplexPcr200JSONResponse []string
+type PostPcrComplexPcrResponseObject interface {
+ VisitPostPcrComplexPcrResponse(w http.ResponseWriter) error
+}
-func (response PostSimulateComplexPcr200JSONResponse) VisitPostSimulateComplexPcrResponse(w http.ResponseWriter) error {
+type PostPcrComplexPcr200JSONResponse []string
+
+func (response PostPcrComplexPcr200JSONResponse) VisitPostPcrComplexPcrResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(200)
return json.NewEncoder(w).Encode(response)
}
-type PostSimulateComplexPcr500TextResponse string
+type PostPcrComplexPcr500TextResponse string
-func (response PostSimulateComplexPcr500TextResponse) VisitPostSimulateComplexPcrResponse(w http.ResponseWriter) error {
+func (response PostPcrComplexPcr500TextResponse) VisitPostPcrComplexPcrResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(500)
@@ -694,98 +1043,90 @@ func (response PostSimulateComplexPcr500TextResponse) VisitPostSimulateComplexPc
return err
}
-type PostSimulateFragmentRequestObject struct {
- Body *PostSimulateFragmentJSONRequestBody
+type PostPcrPrimersDebruijnBarcodesRequestObject struct {
+ Body *PostPcrPrimersDebruijnBarcodesJSONRequestBody
}
-type PostSimulateFragmentResponseObject interface {
- VisitPostSimulateFragmentResponse(w http.ResponseWriter) error
+type PostPcrPrimersDebruijnBarcodesResponseObject interface {
+ VisitPostPcrPrimersDebruijnBarcodesResponse(w http.ResponseWriter) error
}
-type PostSimulateFragment200JSONResponse struct {
- Efficiency float32 `json:"efficiency"`
- Fragments []string `json:"fragments"`
+type PostPcrPrimersDebruijnBarcodes200Response struct {
}
-func (response PostSimulateFragment200JSONResponse) VisitPostSimulateFragmentResponse(w http.ResponseWriter) error {
- w.Header().Set("Content-Type", "application/json")
+func (response PostPcrPrimersDebruijnBarcodes200Response) VisitPostPcrPrimersDebruijnBarcodesResponse(w http.ResponseWriter) error {
w.WriteHeader(200)
+ return nil
+}
- return json.NewEncoder(w).Encode(response)
+type PostPcrPrimersMarmurDotyRequestObject struct {
+ Body *PostPcrPrimersMarmurDotyJSONRequestBody
}
-type PostSimulateFragment500TextResponse string
+type PostPcrPrimersMarmurDotyResponseObject interface {
+ VisitPostPcrPrimersMarmurDotyResponse(w http.ResponseWriter) error
+}
-func (response PostSimulateFragment500TextResponse) VisitPostSimulateFragmentResponse(w http.ResponseWriter) error {
- w.Header().Set("Content-Type", "text/plain")
- w.WriteHeader(500)
+type PostPcrPrimersMarmurDoty200Response struct {
+}
- _, err := w.Write([]byte(response))
- return err
+func (response PostPcrPrimersMarmurDoty200Response) VisitPostPcrPrimersMarmurDotyResponse(w http.ResponseWriter) error {
+ w.WriteHeader(200)
+ return nil
}
-type PostSimulateGoldengateRequestObject struct {
- Body *PostSimulateGoldengateJSONRequestBody
+type PostPcrPrimersMeltingTemperatureRequestObject struct {
+ Body *PostPcrPrimersMeltingTemperatureJSONRequestBody
}
-type PostSimulateGoldengateResponseObject interface {
- VisitPostSimulateGoldengateResponse(w http.ResponseWriter) error
+type PostPcrPrimersMeltingTemperatureResponseObject interface {
+ VisitPostPcrPrimersMeltingTemperatureResponse(w http.ResponseWriter) error
}
-type PostSimulateGoldengate200Response struct {
+type PostPcrPrimersMeltingTemperature200Response struct {
}
-func (response PostSimulateGoldengate200Response) VisitPostSimulateGoldengateResponse(w http.ResponseWriter) error {
+func (response PostPcrPrimersMeltingTemperature200Response) VisitPostPcrPrimersMeltingTemperatureResponse(w http.ResponseWriter) error {
w.WriteHeader(200)
return nil
}
-type PostSimulateGoldengate500TextResponse string
-
-func (response PostSimulateGoldengate500TextResponse) VisitPostSimulateGoldengateResponse(w http.ResponseWriter) error {
- w.Header().Set("Content-Type", "text/plain")
- w.WriteHeader(500)
-
- _, err := w.Write([]byte(response))
- return err
-}
-
-type PostSimulateLigateRequestObject struct {
- Body *PostSimulateLigateJSONRequestBody
+type PostPcrPrimersSantaLuciaRequestObject struct {
+ Body *PostPcrPrimersSantaLuciaJSONRequestBody
}
-type PostSimulateLigateResponseObject interface {
- VisitPostSimulateLigateResponse(w http.ResponseWriter) error
+type PostPcrPrimersSantaLuciaResponseObject interface {
+ VisitPostPcrPrimersSantaLuciaResponse(w http.ResponseWriter) error
}
-type PostSimulateLigate200Response struct {
+type PostPcrPrimersSantaLucia200Response struct {
}
-func (response PostSimulateLigate200Response) VisitPostSimulateLigateResponse(w http.ResponseWriter) error {
+func (response PostPcrPrimersSantaLucia200Response) VisitPostPcrPrimersSantaLuciaResponse(w http.ResponseWriter) error {
w.WriteHeader(200)
return nil
}
-type PostSimulatePcrRequestObject struct {
- Body *PostSimulatePcrJSONRequestBody
+type PostPcrSimplePcrRequestObject struct {
+ Body *PostPcrSimplePcrJSONRequestBody
}
-type PostSimulatePcrResponseObject interface {
- VisitPostSimulatePcrResponse(w http.ResponseWriter) error
+type PostPcrSimplePcrResponseObject interface {
+ VisitPostPcrSimplePcrResponse(w http.ResponseWriter) error
}
-type PostSimulatePcr200JSONResponse string
+type PostPcrSimplePcr200JSONResponse string
-func (response PostSimulatePcr200JSONResponse) VisitPostSimulatePcrResponse(w http.ResponseWriter) error {
+func (response PostPcrSimplePcr200JSONResponse) VisitPostPcrSimplePcrResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(200)
return json.NewEncoder(w).Encode(response)
}
-type PostSimulatePcr500TextResponse string
+type PostPcrSimplePcr500TextResponse string
-func (response PostSimulatePcr500TextResponse) VisitPostSimulatePcrResponse(w http.ResponseWriter) error {
+func (response PostPcrSimplePcr500TextResponse) VisitPostPcrSimplePcrResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(500)
@@ -793,25 +1134,29 @@ func (response PostSimulatePcr500TextResponse) VisitPostSimulatePcrResponse(w ht
return err
}
-type PostSimulateRestrictionDigestRequestObject struct {
- Body *PostSimulateRestrictionDigestJSONRequestBody
+type PostSynthesisFragmentRequestObject struct {
+ Body *PostSynthesisFragmentJSONRequestBody
}
-type PostSimulateRestrictionDigestResponseObject interface {
- VisitPostSimulateRestrictionDigestResponse(w http.ResponseWriter) error
+type PostSynthesisFragmentResponseObject interface {
+ VisitPostSynthesisFragmentResponse(w http.ResponseWriter) error
}
-type PostSimulateRestrictionDigest200Response struct {
+type PostSynthesisFragment200JSONResponse struct {
+ Efficiency float32 `json:"efficiency"`
+ Fragments []string `json:"fragments"`
}
-func (response PostSimulateRestrictionDigest200Response) VisitPostSimulateRestrictionDigestResponse(w http.ResponseWriter) error {
+func (response PostSynthesisFragment200JSONResponse) VisitPostSynthesisFragmentResponse(w http.ResponseWriter) error {
+ w.Header().Set("Content-Type", "application/json")
w.WriteHeader(200)
- return nil
+
+ return json.NewEncoder(w).Encode(response)
}
-type PostSimulateRestrictionDigest500TextResponse string
+type PostSynthesisFragment500TextResponse string
-func (response PostSimulateRestrictionDigest500TextResponse) VisitPostSimulateRestrictionDigestResponse(w http.ResponseWriter) error {
+func (response PostSynthesisFragment500TextResponse) VisitPostSynthesisFragmentResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(500)
@@ -822,41 +1167,65 @@ func (response PostSimulateRestrictionDigest500TextResponse) VisitPostSimulateRe
// StrictServerInterface represents all server handlers.
type StrictServerInterface interface {
// Fix CDS
- // (POST /design/cds/fix)
- PostDesignCdsFix(ctx context.Context, request PostDesignCdsFixRequestObject) (PostDesignCdsFixResponseObject, error)
+ // (POST /cds/fix)
+ PostCdsFix(ctx context.Context, request PostCdsFixRequestObject) (PostCdsFixResponseObject, error)
// Optimize CDS.
- // (POST /design/cds/optimize)
- PostDesignCdsOptimize(ctx context.Context, request PostDesignCdsOptimizeRequestObject) (PostDesignCdsOptimizeResponseObject, error)
+ // (POST /cds/optimize)
+ PostCdsOptimize(ctx context.Context, request PostCdsOptimizeRequestObject) (PostCdsOptimizeResponseObject, error)
// Translate CDS
- // (POST /design/cds/translate)
- PostDesignCdsTranslate(ctx context.Context, request PostDesignCdsTranslateRequestObject) (PostDesignCdsTranslateResponseObject, error)
+ // (POST /cds/translate)
+ PostCdsTranslate(ctx context.Context, request PostCdsTranslateRequestObject) (PostCdsTranslateResponseObject, error)
+ // Simulate Golden Gate assembly
+ // (POST /cloning/goldengate)
+ PostCloningGoldengate(ctx context.Context, request PostCloningGoldengateRequestObject) (PostCloningGoldengateResponseObject, error)
+ // Simulate ligation
+ // (POST /cloning/ligate)
+ PostCloningLigate(ctx context.Context, request PostCloningLigateRequestObject) (PostCloningLigateResponseObject, error)
+ // Simulate restriction digest
+ // (POST /cloning/restriction_digest)
+ PostCloningRestrictionDigest(ctx context.Context, request PostCloningRestrictionDigestRequestObject) (PostCloningRestrictionDigestResponseObject, error)
// Run a lua script
// (POST /execute_lua)
PostExecuteLua(ctx context.Context, request PostExecuteLuaRequestObject) (PostExecuteLuaResponseObject, error)
// Parse FASTA data
// (POST /io/fasta/parse)
PostIoFastaParse(ctx context.Context, request PostIoFastaParseRequestObject) (PostIoFastaParseResponseObject, error)
+ // Write FASTA data
+ // (POST /io/fasta/write)
+ PostIoFastaWrite(ctx context.Context, request PostIoFastaWriteRequestObject) (PostIoFastaWriteResponseObject, error)
+ // Parse FASTQ data
+ // (POST /io/fastq/parse)
+ PostIoFastqParse(ctx context.Context, request PostIoFastqParseRequestObject) (PostIoFastqParseResponseObject, error)
+ // Write FASTQ data
+ // (POST /io/fastq/write)
+ PostIoFastqWrite(ctx context.Context, request PostIoFastqWriteRequestObject) (PostIoFastqWriteResponseObject, error)
// Parse Genbank data
// (POST /io/genbank/parse)
PostIoGenbankParse(ctx context.Context, request PostIoGenbankParseRequestObject) (PostIoGenbankParseResponseObject, error)
+ // Write Genbank data
+ // (POST /io/genbank/write)
+ PostIoGenbankWrite(ctx context.Context, request PostIoGenbankWriteRequestObject) (PostIoGenbankWriteResponseObject, error)
// Simulate PCR
- // (POST /simulate/complex_pcr)
- PostSimulateComplexPcr(ctx context.Context, request PostSimulateComplexPcrRequestObject) (PostSimulateComplexPcrResponseObject, error)
- // Fragment CDS
- // (POST /simulate/fragment)
- PostSimulateFragment(ctx context.Context, request PostSimulateFragmentRequestObject) (PostSimulateFragmentResponseObject, error)
- // Simulate Golden Gate assembly
- // (POST /simulate/goldengate)
- PostSimulateGoldengate(ctx context.Context, request PostSimulateGoldengateRequestObject) (PostSimulateGoldengateResponseObject, error)
- // Simulate ligation
- // (POST /simulate/ligate)
- PostSimulateLigate(ctx context.Context, request PostSimulateLigateRequestObject) (PostSimulateLigateResponseObject, error)
+ // (POST /pcr/complex_pcr)
+ PostPcrComplexPcr(ctx context.Context, request PostPcrComplexPcrRequestObject) (PostPcrComplexPcrResponseObject, error)
+ // Generate De Bruijn sequence-based barcodes
+ // (POST /pcr/primers/debruijn_barcodes)
+ PostPcrPrimersDebruijnBarcodes(ctx context.Context, request PostPcrPrimersDebruijnBarcodesRequestObject) (PostPcrPrimersDebruijnBarcodesResponseObject, error)
+ // Calculate Melting Temperature using Marmur Doty method
+ // (POST /pcr/primers/marmur_doty)
+ PostPcrPrimersMarmurDoty(ctx context.Context, request PostPcrPrimersMarmurDotyRequestObject) (PostPcrPrimersMarmurDotyResponseObject, error)
+ // Calculate Melting Temperature
+ // (POST /pcr/primers/melting_temperature)
+ PostPcrPrimersMeltingTemperature(ctx context.Context, request PostPcrPrimersMeltingTemperatureRequestObject) (PostPcrPrimersMeltingTemperatureResponseObject, error)
+ // Calculate Melting Temperature using Santa Lucia method
+ // (POST /pcr/primers/santa_lucia)
+ PostPcrPrimersSantaLucia(ctx context.Context, request PostPcrPrimersSantaLuciaRequestObject) (PostPcrPrimersSantaLuciaResponseObject, error)
// Simulate a simple PCR
- // (POST /simulate/pcr)
- PostSimulatePcr(ctx context.Context, request PostSimulatePcrRequestObject) (PostSimulatePcrResponseObject, error)
- // Simulate restriction digest
- // (POST /simulate/restriction_digest)
- PostSimulateRestrictionDigest(ctx context.Context, request PostSimulateRestrictionDigestRequestObject) (PostSimulateRestrictionDigestResponseObject, error)
+ // (POST /pcr/simple_pcr)
+ PostPcrSimplePcr(ctx context.Context, request PostPcrSimplePcrRequestObject) (PostPcrSimplePcrResponseObject, error)
+ // Fragment CDS
+ // (POST /synthesis/fragment)
+ PostSynthesisFragment(ctx context.Context, request PostSynthesisFragmentRequestObject) (PostSynthesisFragmentResponseObject, error)
}
type StrictHandlerFunc = strictnethttp.StrictHttpHandlerFunc
@@ -888,11 +1257,11 @@ type strictHandler struct {
options StrictHTTPServerOptions
}
-// PostDesignCdsFix operation middleware
-func (sh *strictHandler) PostDesignCdsFix(w http.ResponseWriter, r *http.Request) {
- var request PostDesignCdsFixRequestObject
+// PostCdsFix operation middleware
+func (sh *strictHandler) PostCdsFix(w http.ResponseWriter, r *http.Request) {
+ var request PostCdsFixRequestObject
- var body PostDesignCdsFixJSONRequestBody
+ var body PostCdsFixJSONRequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
return
@@ -900,18 +1269,18 @@ func (sh *strictHandler) PostDesignCdsFix(w http.ResponseWriter, r *http.Request
request.Body = &body
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
- return sh.ssi.PostDesignCdsFix(ctx, request.(PostDesignCdsFixRequestObject))
+ return sh.ssi.PostCdsFix(ctx, request.(PostCdsFixRequestObject))
}
for _, middleware := range sh.middlewares {
- handler = middleware(handler, "PostDesignCdsFix")
+ handler = middleware(handler, "PostCdsFix")
}
response, err := handler(r.Context(), w, r, request)
if err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
- } else if validResponse, ok := response.(PostDesignCdsFixResponseObject); ok {
- if err := validResponse.VisitPostDesignCdsFixResponse(w); err != nil {
+ } else if validResponse, ok := response.(PostCdsFixResponseObject); ok {
+ if err := validResponse.VisitPostCdsFixResponse(w); err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
}
} else if response != nil {
@@ -919,11 +1288,11 @@ func (sh *strictHandler) PostDesignCdsFix(w http.ResponseWriter, r *http.Request
}
}
-// PostDesignCdsOptimize operation middleware
-func (sh *strictHandler) PostDesignCdsOptimize(w http.ResponseWriter, r *http.Request) {
- var request PostDesignCdsOptimizeRequestObject
+// PostCdsOptimize operation middleware
+func (sh *strictHandler) PostCdsOptimize(w http.ResponseWriter, r *http.Request) {
+ var request PostCdsOptimizeRequestObject
- var body PostDesignCdsOptimizeJSONRequestBody
+ var body PostCdsOptimizeJSONRequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
return
@@ -931,18 +1300,18 @@ func (sh *strictHandler) PostDesignCdsOptimize(w http.ResponseWriter, r *http.Re
request.Body = &body
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
- return sh.ssi.PostDesignCdsOptimize(ctx, request.(PostDesignCdsOptimizeRequestObject))
+ return sh.ssi.PostCdsOptimize(ctx, request.(PostCdsOptimizeRequestObject))
}
for _, middleware := range sh.middlewares {
- handler = middleware(handler, "PostDesignCdsOptimize")
+ handler = middleware(handler, "PostCdsOptimize")
}
response, err := handler(r.Context(), w, r, request)
if err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
- } else if validResponse, ok := response.(PostDesignCdsOptimizeResponseObject); ok {
- if err := validResponse.VisitPostDesignCdsOptimizeResponse(w); err != nil {
+ } else if validResponse, ok := response.(PostCdsOptimizeResponseObject); ok {
+ if err := validResponse.VisitPostCdsOptimizeResponse(w); err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
}
} else if response != nil {
@@ -950,11 +1319,11 @@ func (sh *strictHandler) PostDesignCdsOptimize(w http.ResponseWriter, r *http.Re
}
}
-// PostDesignCdsTranslate operation middleware
-func (sh *strictHandler) PostDesignCdsTranslate(w http.ResponseWriter, r *http.Request) {
- var request PostDesignCdsTranslateRequestObject
+// PostCdsTranslate operation middleware
+func (sh *strictHandler) PostCdsTranslate(w http.ResponseWriter, r *http.Request) {
+ var request PostCdsTranslateRequestObject
- var body PostDesignCdsTranslateJSONRequestBody
+ var body PostCdsTranslateJSONRequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
return
@@ -962,18 +1331,111 @@ func (sh *strictHandler) PostDesignCdsTranslate(w http.ResponseWriter, r *http.R
request.Body = &body
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
- return sh.ssi.PostDesignCdsTranslate(ctx, request.(PostDesignCdsTranslateRequestObject))
+ return sh.ssi.PostCdsTranslate(ctx, request.(PostCdsTranslateRequestObject))
}
for _, middleware := range sh.middlewares {
- handler = middleware(handler, "PostDesignCdsTranslate")
+ handler = middleware(handler, "PostCdsTranslate")
}
response, err := handler(r.Context(), w, r, request)
if err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
- } else if validResponse, ok := response.(PostDesignCdsTranslateResponseObject); ok {
- if err := validResponse.VisitPostDesignCdsTranslateResponse(w); err != nil {
+ } else if validResponse, ok := response.(PostCdsTranslateResponseObject); ok {
+ if err := validResponse.VisitPostCdsTranslateResponse(w); err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ }
+ } else if response != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
+ }
+}
+
+// PostCloningGoldengate operation middleware
+func (sh *strictHandler) PostCloningGoldengate(w http.ResponseWriter, r *http.Request) {
+ var request PostCloningGoldengateRequestObject
+
+ var body PostCloningGoldengateJSONRequestBody
+ if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
+ sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
+ return
+ }
+ request.Body = &body
+
+ handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
+ return sh.ssi.PostCloningGoldengate(ctx, request.(PostCloningGoldengateRequestObject))
+ }
+ for _, middleware := range sh.middlewares {
+ handler = middleware(handler, "PostCloningGoldengate")
+ }
+
+ response, err := handler(r.Context(), w, r, request)
+
+ if err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ } else if validResponse, ok := response.(PostCloningGoldengateResponseObject); ok {
+ if err := validResponse.VisitPostCloningGoldengateResponse(w); err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ }
+ } else if response != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
+ }
+}
+
+// PostCloningLigate operation middleware
+func (sh *strictHandler) PostCloningLigate(w http.ResponseWriter, r *http.Request) {
+ var request PostCloningLigateRequestObject
+
+ var body PostCloningLigateJSONRequestBody
+ if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
+ sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
+ return
+ }
+ request.Body = &body
+
+ handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
+ return sh.ssi.PostCloningLigate(ctx, request.(PostCloningLigateRequestObject))
+ }
+ for _, middleware := range sh.middlewares {
+ handler = middleware(handler, "PostCloningLigate")
+ }
+
+ response, err := handler(r.Context(), w, r, request)
+
+ if err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ } else if validResponse, ok := response.(PostCloningLigateResponseObject); ok {
+ if err := validResponse.VisitPostCloningLigateResponse(w); err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ }
+ } else if response != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
+ }
+}
+
+// PostCloningRestrictionDigest operation middleware
+func (sh *strictHandler) PostCloningRestrictionDigest(w http.ResponseWriter, r *http.Request) {
+ var request PostCloningRestrictionDigestRequestObject
+
+ var body PostCloningRestrictionDigestJSONRequestBody
+ if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
+ sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
+ return
+ }
+ request.Body = &body
+
+ handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
+ return sh.ssi.PostCloningRestrictionDigest(ctx, request.(PostCloningRestrictionDigestRequestObject))
+ }
+ for _, middleware := range sh.middlewares {
+ handler = middleware(handler, "PostCloningRestrictionDigest")
+ }
+
+ response, err := handler(r.Context(), w, r, request)
+
+ if err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ } else if validResponse, ok := response.(PostCloningRestrictionDigestResponseObject); ok {
+ if err := validResponse.VisitPostCloningRestrictionDigestResponse(w); err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
}
} else if response != nil {
@@ -1044,6 +1506,100 @@ func (sh *strictHandler) PostIoFastaParse(w http.ResponseWriter, r *http.Request
}
}
+// PostIoFastaWrite operation middleware
+func (sh *strictHandler) PostIoFastaWrite(w http.ResponseWriter, r *http.Request) {
+ var request PostIoFastaWriteRequestObject
+
+ var body PostIoFastaWriteJSONRequestBody
+ if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
+ sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
+ return
+ }
+ request.Body = &body
+
+ handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
+ return sh.ssi.PostIoFastaWrite(ctx, request.(PostIoFastaWriteRequestObject))
+ }
+ for _, middleware := range sh.middlewares {
+ handler = middleware(handler, "PostIoFastaWrite")
+ }
+
+ response, err := handler(r.Context(), w, r, request)
+
+ if err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ } else if validResponse, ok := response.(PostIoFastaWriteResponseObject); ok {
+ if err := validResponse.VisitPostIoFastaWriteResponse(w); err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ }
+ } else if response != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
+ }
+}
+
+// PostIoFastqParse operation middleware
+func (sh *strictHandler) PostIoFastqParse(w http.ResponseWriter, r *http.Request) {
+ var request PostIoFastqParseRequestObject
+
+ data, err := io.ReadAll(r.Body)
+ if err != nil {
+ sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't read body: %w", err))
+ return
+ }
+ body := PostIoFastqParseTextRequestBody(data)
+ request.Body = &body
+
+ handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
+ return sh.ssi.PostIoFastqParse(ctx, request.(PostIoFastqParseRequestObject))
+ }
+ for _, middleware := range sh.middlewares {
+ handler = middleware(handler, "PostIoFastqParse")
+ }
+
+ response, err := handler(r.Context(), w, r, request)
+
+ if err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ } else if validResponse, ok := response.(PostIoFastqParseResponseObject); ok {
+ if err := validResponse.VisitPostIoFastqParseResponse(w); err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ }
+ } else if response != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
+ }
+}
+
+// PostIoFastqWrite operation middleware
+func (sh *strictHandler) PostIoFastqWrite(w http.ResponseWriter, r *http.Request) {
+ var request PostIoFastqWriteRequestObject
+
+ var body PostIoFastqWriteJSONRequestBody
+ if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
+ sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
+ return
+ }
+ request.Body = &body
+
+ handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
+ return sh.ssi.PostIoFastqWrite(ctx, request.(PostIoFastqWriteRequestObject))
+ }
+ for _, middleware := range sh.middlewares {
+ handler = middleware(handler, "PostIoFastqWrite")
+ }
+
+ response, err := handler(r.Context(), w, r, request)
+
+ if err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ } else if validResponse, ok := response.(PostIoFastqWriteResponseObject); ok {
+ if err := validResponse.VisitPostIoFastqWriteResponse(w); err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ }
+ } else if response != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
+ }
+}
+
// PostIoGenbankParse operation middleware
func (sh *strictHandler) PostIoGenbankParse(w http.ResponseWriter, r *http.Request) {
var request PostIoGenbankParseRequestObject
@@ -1076,11 +1632,73 @@ func (sh *strictHandler) PostIoGenbankParse(w http.ResponseWriter, r *http.Reque
}
}
-// PostSimulateComplexPcr operation middleware
-func (sh *strictHandler) PostSimulateComplexPcr(w http.ResponseWriter, r *http.Request) {
- var request PostSimulateComplexPcrRequestObject
+// PostIoGenbankWrite operation middleware
+func (sh *strictHandler) PostIoGenbankWrite(w http.ResponseWriter, r *http.Request) {
+ var request PostIoGenbankWriteRequestObject
+
+ var body PostIoGenbankWriteJSONRequestBody
+ if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
+ sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
+ return
+ }
+ request.Body = &body
+
+ handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
+ return sh.ssi.PostIoGenbankWrite(ctx, request.(PostIoGenbankWriteRequestObject))
+ }
+ for _, middleware := range sh.middlewares {
+ handler = middleware(handler, "PostIoGenbankWrite")
+ }
+
+ response, err := handler(r.Context(), w, r, request)
+
+ if err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ } else if validResponse, ok := response.(PostIoGenbankWriteResponseObject); ok {
+ if err := validResponse.VisitPostIoGenbankWriteResponse(w); err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ }
+ } else if response != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
+ }
+}
+
+// PostPcrComplexPcr operation middleware
+func (sh *strictHandler) PostPcrComplexPcr(w http.ResponseWriter, r *http.Request) {
+ var request PostPcrComplexPcrRequestObject
+
+ var body PostPcrComplexPcrJSONRequestBody
+ if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
+ sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
+ return
+ }
+ request.Body = &body
+
+ handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
+ return sh.ssi.PostPcrComplexPcr(ctx, request.(PostPcrComplexPcrRequestObject))
+ }
+ for _, middleware := range sh.middlewares {
+ handler = middleware(handler, "PostPcrComplexPcr")
+ }
+
+ response, err := handler(r.Context(), w, r, request)
+
+ if err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ } else if validResponse, ok := response.(PostPcrComplexPcrResponseObject); ok {
+ if err := validResponse.VisitPostPcrComplexPcrResponse(w); err != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, err)
+ }
+ } else if response != nil {
+ sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
+ }
+}
+
+// PostPcrPrimersDebruijnBarcodes operation middleware
+func (sh *strictHandler) PostPcrPrimersDebruijnBarcodes(w http.ResponseWriter, r *http.Request) {
+ var request PostPcrPrimersDebruijnBarcodesRequestObject
- var body PostSimulateComplexPcrJSONRequestBody
+ var body PostPcrPrimersDebruijnBarcodesJSONRequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
return
@@ -1088,18 +1706,18 @@ func (sh *strictHandler) PostSimulateComplexPcr(w http.ResponseWriter, r *http.R
request.Body = &body
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
- return sh.ssi.PostSimulateComplexPcr(ctx, request.(PostSimulateComplexPcrRequestObject))
+ return sh.ssi.PostPcrPrimersDebruijnBarcodes(ctx, request.(PostPcrPrimersDebruijnBarcodesRequestObject))
}
for _, middleware := range sh.middlewares {
- handler = middleware(handler, "PostSimulateComplexPcr")
+ handler = middleware(handler, "PostPcrPrimersDebruijnBarcodes")
}
response, err := handler(r.Context(), w, r, request)
if err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
- } else if validResponse, ok := response.(PostSimulateComplexPcrResponseObject); ok {
- if err := validResponse.VisitPostSimulateComplexPcrResponse(w); err != nil {
+ } else if validResponse, ok := response.(PostPcrPrimersDebruijnBarcodesResponseObject); ok {
+ if err := validResponse.VisitPostPcrPrimersDebruijnBarcodesResponse(w); err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
}
} else if response != nil {
@@ -1107,11 +1725,11 @@ func (sh *strictHandler) PostSimulateComplexPcr(w http.ResponseWriter, r *http.R
}
}
-// PostSimulateFragment operation middleware
-func (sh *strictHandler) PostSimulateFragment(w http.ResponseWriter, r *http.Request) {
- var request PostSimulateFragmentRequestObject
+// PostPcrPrimersMarmurDoty operation middleware
+func (sh *strictHandler) PostPcrPrimersMarmurDoty(w http.ResponseWriter, r *http.Request) {
+ var request PostPcrPrimersMarmurDotyRequestObject
- var body PostSimulateFragmentJSONRequestBody
+ var body PostPcrPrimersMarmurDotyJSONRequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
return
@@ -1119,18 +1737,18 @@ func (sh *strictHandler) PostSimulateFragment(w http.ResponseWriter, r *http.Req
request.Body = &body
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
- return sh.ssi.PostSimulateFragment(ctx, request.(PostSimulateFragmentRequestObject))
+ return sh.ssi.PostPcrPrimersMarmurDoty(ctx, request.(PostPcrPrimersMarmurDotyRequestObject))
}
for _, middleware := range sh.middlewares {
- handler = middleware(handler, "PostSimulateFragment")
+ handler = middleware(handler, "PostPcrPrimersMarmurDoty")
}
response, err := handler(r.Context(), w, r, request)
if err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
- } else if validResponse, ok := response.(PostSimulateFragmentResponseObject); ok {
- if err := validResponse.VisitPostSimulateFragmentResponse(w); err != nil {
+ } else if validResponse, ok := response.(PostPcrPrimersMarmurDotyResponseObject); ok {
+ if err := validResponse.VisitPostPcrPrimersMarmurDotyResponse(w); err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
}
} else if response != nil {
@@ -1138,11 +1756,11 @@ func (sh *strictHandler) PostSimulateFragment(w http.ResponseWriter, r *http.Req
}
}
-// PostSimulateGoldengate operation middleware
-func (sh *strictHandler) PostSimulateGoldengate(w http.ResponseWriter, r *http.Request) {
- var request PostSimulateGoldengateRequestObject
+// PostPcrPrimersMeltingTemperature operation middleware
+func (sh *strictHandler) PostPcrPrimersMeltingTemperature(w http.ResponseWriter, r *http.Request) {
+ var request PostPcrPrimersMeltingTemperatureRequestObject
- var body PostSimulateGoldengateJSONRequestBody
+ var body PostPcrPrimersMeltingTemperatureJSONRequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
return
@@ -1150,18 +1768,18 @@ func (sh *strictHandler) PostSimulateGoldengate(w http.ResponseWriter, r *http.R
request.Body = &body
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
- return sh.ssi.PostSimulateGoldengate(ctx, request.(PostSimulateGoldengateRequestObject))
+ return sh.ssi.PostPcrPrimersMeltingTemperature(ctx, request.(PostPcrPrimersMeltingTemperatureRequestObject))
}
for _, middleware := range sh.middlewares {
- handler = middleware(handler, "PostSimulateGoldengate")
+ handler = middleware(handler, "PostPcrPrimersMeltingTemperature")
}
response, err := handler(r.Context(), w, r, request)
if err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
- } else if validResponse, ok := response.(PostSimulateGoldengateResponseObject); ok {
- if err := validResponse.VisitPostSimulateGoldengateResponse(w); err != nil {
+ } else if validResponse, ok := response.(PostPcrPrimersMeltingTemperatureResponseObject); ok {
+ if err := validResponse.VisitPostPcrPrimersMeltingTemperatureResponse(w); err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
}
} else if response != nil {
@@ -1169,11 +1787,11 @@ func (sh *strictHandler) PostSimulateGoldengate(w http.ResponseWriter, r *http.R
}
}
-// PostSimulateLigate operation middleware
-func (sh *strictHandler) PostSimulateLigate(w http.ResponseWriter, r *http.Request) {
- var request PostSimulateLigateRequestObject
+// PostPcrPrimersSantaLucia operation middleware
+func (sh *strictHandler) PostPcrPrimersSantaLucia(w http.ResponseWriter, r *http.Request) {
+ var request PostPcrPrimersSantaLuciaRequestObject
- var body PostSimulateLigateJSONRequestBody
+ var body PostPcrPrimersSantaLuciaJSONRequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
return
@@ -1181,18 +1799,18 @@ func (sh *strictHandler) PostSimulateLigate(w http.ResponseWriter, r *http.Reque
request.Body = &body
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
- return sh.ssi.PostSimulateLigate(ctx, request.(PostSimulateLigateRequestObject))
+ return sh.ssi.PostPcrPrimersSantaLucia(ctx, request.(PostPcrPrimersSantaLuciaRequestObject))
}
for _, middleware := range sh.middlewares {
- handler = middleware(handler, "PostSimulateLigate")
+ handler = middleware(handler, "PostPcrPrimersSantaLucia")
}
response, err := handler(r.Context(), w, r, request)
if err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
- } else if validResponse, ok := response.(PostSimulateLigateResponseObject); ok {
- if err := validResponse.VisitPostSimulateLigateResponse(w); err != nil {
+ } else if validResponse, ok := response.(PostPcrPrimersSantaLuciaResponseObject); ok {
+ if err := validResponse.VisitPostPcrPrimersSantaLuciaResponse(w); err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
}
} else if response != nil {
@@ -1200,11 +1818,11 @@ func (sh *strictHandler) PostSimulateLigate(w http.ResponseWriter, r *http.Reque
}
}
-// PostSimulatePcr operation middleware
-func (sh *strictHandler) PostSimulatePcr(w http.ResponseWriter, r *http.Request) {
- var request PostSimulatePcrRequestObject
+// PostPcrSimplePcr operation middleware
+func (sh *strictHandler) PostPcrSimplePcr(w http.ResponseWriter, r *http.Request) {
+ var request PostPcrSimplePcrRequestObject
- var body PostSimulatePcrJSONRequestBody
+ var body PostPcrSimplePcrJSONRequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
return
@@ -1212,18 +1830,18 @@ func (sh *strictHandler) PostSimulatePcr(w http.ResponseWriter, r *http.Request)
request.Body = &body
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
- return sh.ssi.PostSimulatePcr(ctx, request.(PostSimulatePcrRequestObject))
+ return sh.ssi.PostPcrSimplePcr(ctx, request.(PostPcrSimplePcrRequestObject))
}
for _, middleware := range sh.middlewares {
- handler = middleware(handler, "PostSimulatePcr")
+ handler = middleware(handler, "PostPcrSimplePcr")
}
response, err := handler(r.Context(), w, r, request)
if err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
- } else if validResponse, ok := response.(PostSimulatePcrResponseObject); ok {
- if err := validResponse.VisitPostSimulatePcrResponse(w); err != nil {
+ } else if validResponse, ok := response.(PostPcrSimplePcrResponseObject); ok {
+ if err := validResponse.VisitPostPcrSimplePcrResponse(w); err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
}
} else if response != nil {
@@ -1231,11 +1849,11 @@ func (sh *strictHandler) PostSimulatePcr(w http.ResponseWriter, r *http.Request)
}
}
-// PostSimulateRestrictionDigest operation middleware
-func (sh *strictHandler) PostSimulateRestrictionDigest(w http.ResponseWriter, r *http.Request) {
- var request PostSimulateRestrictionDigestRequestObject
+// PostSynthesisFragment operation middleware
+func (sh *strictHandler) PostSynthesisFragment(w http.ResponseWriter, r *http.Request) {
+ var request PostSynthesisFragmentRequestObject
- var body PostSimulateRestrictionDigestJSONRequestBody
+ var body PostSynthesisFragmentJSONRequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
return
@@ -1243,18 +1861,18 @@ func (sh *strictHandler) PostSimulateRestrictionDigest(w http.ResponseWriter, r
request.Body = &body
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
- return sh.ssi.PostSimulateRestrictionDigest(ctx, request.(PostSimulateRestrictionDigestRequestObject))
+ return sh.ssi.PostSynthesisFragment(ctx, request.(PostSynthesisFragmentRequestObject))
}
for _, middleware := range sh.middlewares {
- handler = middleware(handler, "PostSimulateRestrictionDigest")
+ handler = middleware(handler, "PostSynthesisFragment")
}
response, err := handler(r.Context(), w, r, request)
if err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
- } else if validResponse, ok := response.(PostSimulateRestrictionDigestResponseObject); ok {
- if err := validResponse.VisitPostSimulateRestrictionDigestResponse(w); err != nil {
+ } else if validResponse, ok := response.(PostSynthesisFragmentResponseObject); ok {
+ if err := validResponse.VisitPostSynthesisFragmentResponse(w); err != nil {
sh.options.ResponseErrorHandlerFunc(w, r, err)
}
} else if response != nil {
@@ -1265,38 +1883,45 @@ func (sh *strictHandler) PostSimulateRestrictionDigest(w http.ResponseWriter, r
// Base64 encoded, gzipped, json marshaled Swagger object
var swaggerSpec = []string{
- "H4sIAAAAAAAC/9xaW2/bOBb+K4R2HwXLndldzPgtcZoiQDo17OzTojBo8chmK5EqL6k9Rf77QqQo0RYl",
- "K81tdp9Sl4fn9n3n8JD2jyjlRckZMCWj2Y9IpjsosPnnhVI43RXAVPWpFLwEoSiYtZQzVS+oQwnRLJJK",
- "ULaNHuKI4QICCw9xJOCbpgJINPuPlYobRZ9jJ883XyBVlaJLLGHOdcj+BksIGk+dfL1CmYItiI55o8CJ",
- "h4zPd5htoWv5WvAiaHnBJVWUs5DxOFoClkdr7caVgjK86Y6fz2NjtlYUWw/N5sZsKMD37M+DBQqYLipV",
- "lxLfRHF0uZHVnwX+NjcfZXF542loHb/GUuElpFyQbp4oAaZoRkEEg5bwTQNLRxDFU+RtC0V0DVhpEcAM",
- "KyXoRqv6EyEmYzhfHHusoJBBZ+v/wELgg/e5tUxApoKWJ/C3CnKeYrf4dwFZNIv+lrSFl9RVl9w6ueEM",
- "OQ/Opc6sHnsX+8nwjHg+BlMr8DbcCa65+I4F+XQPoqqYoLdLuAchYVBmNZoQqyEOfAC2wexrHyszS5Fj",
- "vIcQcZwKsKAAhc9t/1jJPIruRmvcOnqG87ces05bdFHmUBx36Q3nOWDDL2Ak3HUyeg8LQQtYYKEozsPb",
- "t5uvzvbKRhJC9QunLLxfKixU2AGpN071eKD80unU607A2ZBOcLD+2TTFfjLroAJ5ChkKJeokwh5YtQxg",
- "SkWqcyx6ILHcv6L3VPZ1ooITmlFr+gor6BHKIdU53IW7TO8R33J1zkkfJZzILbCt2o0eFE62nTjZDT4Q",
- "ase9uE1oCISPdYGfHCZpCrI3vxt/ZhlF3HbKCTCX9EFEIKOM9h44X+HwnQsi+04jPaaetBzEmostZlQW",
- "PYt0S8O+cbWzQ0HfQdx3/rbICMhAVECO7w9LtyWUZsm16Dtp8Z4zXhweNyFU510YmxN2E0tMD87YY1ir",
- "yIPUy3zjuednk3sH9FG6fIY6KGqMQyXwycPYjYnvq5QKmu4oRinPaTUr2k8llooLKoPTYgtAt6S02nEh",
- "ewZ6JrlQVBc9B4wW7Kiht2ul3nwEElwSbrjvrkCBxdcwyFTlI05wF43b0DrZuNSYcZ4cxdkFojJBWWav",
- "A9aL6OqPC0RA0i1DF4sbjyqzaDqZTt6ZUiuB4ZJGs+jXyXQyrRzAamcSndi9SUpkktG9AYVL07aOptno",
- "mu5BopQXBWeoFHyTQyERZWh+tTJ/SwElFqbNoowLVDkmD0ztQFI5iYwXdvmGRLPqwqKujO05kdd0H9ns",
- "gVSXnBxOLpe4LPO6hSdf6guUregui/x+NNQJGk5btPk9uInykdeA8UOdN2Z7tXtqPIS7USRLzqT17pfp",
- "9AkpSs2ldnzTrC/BzxW7Mx8meJd2pOIYsnrRd6p2KKdSIZ4hp+khjv7RyYiCvUrKHNOTXJz62bH5bwkC",
- "UVZqhUAIbobRfz6f+humoOoDSIK4B+FsmIm3KLA42LCroE1D38oqfymR0edKyK9YXipa0D+hv2yXf3xA",
- "KwCCCGRY50oixdF0uBo/Oa1vWZISoOdi8rR6e4nqOgv53Q6Qw4qgxq3/O9o65lTcnZwjrxKYybyebB17",
- "B2h518g/Fy+H31Zqc5SztcIbe+TXVRTN3r2Lz70tdhUMXuJfg4Yugy0HURvwK3Olcaa30cEeUq1gnWs8",
- "TJH3VvBW42ejBm5evccfk95LeeioNPkZ0bSs3MtPATkP38y5VqUe4WgtFxtFY87ylTY3mkznqN77+qxb",
- "aoYwyjVGdZ5b4lU0s8SjPMmwVDgpsZBn2tMNN+/fCyM5xL7RYT0V5XEPmt6jfYes3dSa8Ai6vljdXSBh",
- "tsk3QM+4UXtBsHkhdehR3oJXPwKNg69+Kv5fA/D4hXs8hPW+NwfR+dEHo6SFrk6HxL657tdlKoahXNU7",
- "5nbDIhXPdhoMP7iWghYgHvvlERZbUGtVHI0V/5o2kkwXGzvwKijKKrBHWTgdRhodrb++Ey9x3Ix2tcvV",
- "+RKVghOdqnpAeQuiOkKhxXzpUdQx85Somf/l2FmWNl+lPRdHYZ/mmsCa11+vPZKPBd6vXQRrWd8pG17+",
- "Op3GgatYQdnApl/Cm37q/ta1FHL55YcmyDKaUmDp4SjU6eT33wOV67x7SuW2OmLf+piB66JSiHiGGh0I",
- "M4IwynKO32L6cqQ/Gfn7KmrLcwJse/aK6GrqQyv/bFXV/Dxi6DCuf0ThkfuxiI+l7XHObcDoQ9WksJRQ",
- "bPLDX6lxhvwbgXtOx2N+S5+I97hx2XXrwOE1CinrJumCE06cyYD9wudcskbPRa83EGX2xyBrO2j0fL9i",
- "fgsyJPITE9KI38I4yY6XHZ9eejw6W2p/sSkII0mryXrkOCSgspua5y9CtyBHDkbLdt+V3fbWvTzMqp/r",
- "2N0j+S0h9TBCxCU7BKzJRqWvWvkRaZFHs2inVClnSUIYts+6kw3lCS5p9BD7MrMkyXmK8x2Xavbb9Lep",
- "lfn88N8AAAD//+A7BjN2KgAA",
+ "H4sIAAAAAAAC/+xa23LbONJ+FRT//5JrKTO7WzO6s+U46ypnolje2outlAoimhISEqBxcKxJ+d23APAk",
+ "EqRg+TSztVeOgu5Gd39fg43DjyjhecEZMCWj2Y9IJlvIsf3nqVI42ebAlPlVCF6AUBTsWMKZKgfUroBo",
+ "FkklKNtED3HEcA6egYc4EnCrqQASzf7tpOLa0Je4kufrr5AoY+gMS5hz7Zt/jSV4J08q+XKEMgUbEL3p",
+ "rYFK3Df5fIvZBvozXwiee2decEkV5cw3eRxdA5Z7Y43iUkHhV7rhh/NYT1saip2HVrme1hfge/b7zgEF",
+ "TOfG1JnEl1Ecna2l+bPAt3P7U+Znly0LjeMXWCp8DQkXpJ8nSoApmlIQ3qAl3GpgSQBRWoZaar6IjD+3",
+ "14A93lyOe/OpMCnEmZXFhFD3c7Fno6fVc+CzxhlVOz/KwQFftgOu1Rrr3tABKy08dMVKCbrWCkZDowry",
+ "0RixEHjnjZmATAQtOsxvDGQ8wdXg/wtIo1n0f5NmzZmUC87kqpIbJ0flwaEk2tF97+J2MlqTtHz0plbg",
+ "jX8RvODiOxbk0x0Is1h4vb2GOxASRmXCqbEco/8HYGvMvg0VZOooso/3GCIVpzwsyEHhQ+ofjcyjKt1a",
+ "jRtHD5T7VYtZ3a9TXmSQ73+g1pxngC2/gBH/gpvSO1gImsMCC0Vx5lffrL9Vcy9dJD5Uv3LK/PpSYaH8",
+ "Dki9rkyHA9UunV69bgUcDKmDg/PPpSluJ7MMypMn30S+RHUiHIBVSw+mVCQ6w2IAEsf9c3pH5dBKlHNC",
+ "U+qmPscKBoQySHQGN/5VZrC7abg652SIEpXIFbCN2gb3SB21jpP94D2h9tyLm4T6QPhYFnjnY5IkIAfz",
+ "u263a0HEbRo8D3PJEEQEUsro4AfnG+y+c0Hk0NdIh9STlqNYc7HBjMp8YJBuqN83rrauAzm+xxCQgjBA",
+ "hq8P15WKL82SazH0pcX3nPF897gOwXzv/Nh02E0cMVtwxi2GNYZakLYyX3ve8rPOfQX0XrraDK2gKDH2",
+ "lcCnFsZVh/zepFTQZEsxSnhGTZvsfhVYKi6o9DbKDQD9ktJqy4Uc2MswyYWiOh/4wGjB9hb0ZqzQ649A",
+ "vEOi2tf0RyDH4psfZKqygC94FU2l0DhZu1RPU3myF2cfCDMFZanbCTkvovPfThEBSTcMnS4uW1SZRdOT",
+ "6ck7W2oFMFzQaBb9fDI9mRoHsNraRE8SIicpvbdocGnXq702Nrqg9yBRwvOcM1QIvs4gl4gyND9f2r+F",
+ "gAILu76ilAtkPJI7prYgqTyJ7PRu+JJEM7NJU3MiL+h95BIGUp1xsutspXFRZOWqPflabhddEfeJ016C",
+ "xoq/prEDmN9B1UQ+svMP7+NanXWrXLuT+6C2hmTBmXTe/TSdPiFFid3Ch6+T5Zb/uWKvpvdzuk84YtiF",
+ "nF30naotyqhUiKeosvQQR3/tZUTBvZoUGaadXHT97M35TwkCUVZohUAIbvvPvz2f+UumwJQ+kiDuQFRz",
+ "2CY3z7HYubBN0HYN30iTv4TI6IsRskXKC0Vz+jsMV+r1bx/QEoAgAinWmZJIcTQdKsBPlb23rEIJMLD9",
+ "eFqJvURBHUT5ZguoQomg2q3/OqZWzDF0PRnkqxKYyaxsXCvCepl4U0s+FxXHD03K6ShnK4XX7ltelkw0",
+ "e/cuPnRe2jcwujt/DeZVGWxoh5qAX5ketTPDy1nGGWWbyYZnBNjmMEec/IdG/LmIAvXB79iKVR4Pt1al",
+ "R/ULD+GU2M+2Cxh9MLnEUkK+znamBSM6USW+8g0AXtJcW3x9/rUBd7B1QM9oMOBX9Ilgh53tVYeafeDC",
+ "YHJukj4y/qzZBLjN3HimBBhLiV1nCN2Ay9bBrF03audO662rxf8NP64mTg00phFMS9jetAJaECFSJduP",
+ "KtxDohWsMo3HYXzvBK80fjbgcH19Gb4DaF15+nYBNmMBzZmTe/kNTsb954xcq0IHOFrKxdZQyDZlqe35",
+ "TKozVOq+Pg+vNUMYZRqjMs8N+QzNHPEon6RYKjwpsJAHFt5Lbi8yF1ZyjH3BYT0V5bAlvHX76lnFu6m1",
+ "4RF0cbq8OUXCqr3FKmLdKL0g2N73VOhR3gXvu6AqDLx/WcmX/miOZzxoKXeRpzQDZKJTwJCsiyrbdbJl",
+ "wwrL1m041W//jFR3F/uPI/rnhugDJPx8OK3BJLx9NRIO5iKYgp+PoOBorso7qDASljfVfzYa7l+wh1Ox",
+ "1HvzVbfyIwDGINKX9l6F9gdzH7a5LDPwOPIfyluRiIm7Jb9fFYkYT9siEXMnu0jEszW747fjhaA5iMe+",
+ "9MFiA2ql8r2jor9Pa0mm87U7t1SQF2Zr8NgTgr0DptpG42/biZfopoNd7Vf2/PqPdCixmF+3iGk42DCz",
+ "TOaEwFpo+pWt1lgknLiMjfJ04TTPS8WzSu+5SLvGjAFZyePuo8owVln3MUXrQH2TrIT/GWeO71ebpKXV",
+ "sDmnzD/ku443dqRerzzb/uGnp3uOe2y0HP/y5DODDTCDLRBUToyahO/T6UMpic4BnVnIa9G/rLFsLMiD",
+ "ZMuxyLVYEe5eQ4bQ7KNVOTcar3AkPnSfcnS+5zhLtDuOziFTlG2QWdJMvFoAwhKlGceqk/JaC30slW5a",
+ "Slqa/3GJQSYzKAe15eRw+p2xVcuDYBicasuN/8FR52E86xIzhVeZTigOzfbSqFxZjefKco43DCTV+Zyz",
+ "BJgSuPNUqlnpnOOH5STOVIDUMbeXPhd8E8ZDcb0QQ2JE/hEjsqyZIo+oXIsusvAeqlxJTU8Y1D4urejr",
+ "dY+pe+a8clANvByyr5zHRI5oJwNeeVeSPS97Pr10L3mwofuDtYwYOcoN9o71c6ZJ2n4BP8jMZSVf3y09",
+ "2xXMfZJpAitePqJ/ZKNo2qsqhJUsX5PUDPx5Oo09naNpAoeVfvIrHbUC9mfyufzylwmQpjShwJLdXqjT",
+ "k19/9dRocxN1/JavsRG3Zw+5iOjfiCHMCMLVV/31XzKVfnTu/+siMkVlGWIsmKEfkRZZNIu2ShVyNpkQ",
+ "ht2TxpM15RNc0OghbsvMJpOMJzjbcqlmv0x/mTqZLw//CQAA///JCz1BwjcAAA==",
}
// GetSwagger returns the content of the embedded swagger specification file
diff --git a/api/gen/dnadesign-types.gen.go b/api/gen/dnadesign-types.gen.go
index eb6c8ac..497fc76 100644
--- a/api/gen/dnadesign-types.gen.go
+++ b/api/gen/dnadesign-types.gen.go
@@ -47,6 +47,14 @@ type FastaRecord struct {
Sequence string `json:"sequence"`
}
+// FastqRead defines model for FastqRead.
+type FastqRead struct {
+ Identifier string `json:"Identifier"`
+ Optionals *map[string]string `json:"Optionals,omitempty"`
+ Quality string `json:"Quality"`
+ Sequence string `json:"Sequence"`
+}
+
// Feature defines model for Feature.
type Feature struct {
Attributes map[string][]string `json:"attributes"`
@@ -125,26 +133,41 @@ type Reference struct {
Title string `json:"title"`
}
-// PostDesignCdsFixJSONBody defines parameters for PostDesignCdsFix.
-type PostDesignCdsFixJSONBody struct {
+// PostCdsFixJSONBody defines parameters for PostCdsFix.
+type PostCdsFixJSONBody struct {
Organism Organism `json:"organism"`
RemoveSequences []string `json:"removeSequences"`
Sequence string `json:"sequence"`
}
-// PostDesignCdsOptimizeJSONBody defines parameters for PostDesignCdsOptimize.
-type PostDesignCdsOptimizeJSONBody struct {
+// PostCdsOptimizeJSONBody defines parameters for PostCdsOptimize.
+type PostCdsOptimizeJSONBody struct {
Organism Organism `json:"organism"`
Seed *int `json:"seed,omitempty"`
Sequence string `json:"sequence"`
}
-// PostDesignCdsTranslateJSONBody defines parameters for PostDesignCdsTranslate.
-type PostDesignCdsTranslateJSONBody struct {
+// PostCdsTranslateJSONBody defines parameters for PostCdsTranslate.
+type PostCdsTranslateJSONBody struct {
Sequence string `json:"sequence"`
TranslationTable int `json:"translation_table"`
}
+// PostCloningGoldengateJSONBody defines parameters for PostCloningGoldengate.
+type PostCloningGoldengateJSONBody struct {
+ Enzyme *Enzyme `json:"enzyme,omitempty"`
+ Sequences *[]string `json:"sequences,omitempty"`
+}
+
+// PostCloningLigateJSONBody defines parameters for PostCloningLigate.
+type PostCloningLigateJSONBody = []Fragment
+
+// PostCloningRestrictionDigestJSONBody defines parameters for PostCloningRestrictionDigest.
+type PostCloningRestrictionDigestJSONBody struct {
+ Enzyme *Enzyme `json:"enzyme,omitempty"`
+ Sequence *string `json:"sequence,omitempty"`
+}
+
// PostExecuteLuaJSONBody defines parameters for PostExecuteLua.
type PostExecuteLuaJSONBody struct {
Attachments *[]Attachment `json:"attachments,omitempty"`
@@ -154,36 +177,60 @@ type PostExecuteLuaJSONBody struct {
// PostIoFastaParseTextBody defines parameters for PostIoFastaParse.
type PostIoFastaParseTextBody = string
+// PostIoFastaWriteJSONBody defines parameters for PostIoFastaWrite.
+type PostIoFastaWriteJSONBody = []FastaRecord
+
+// PostIoFastqParseTextBody defines parameters for PostIoFastqParse.
+type PostIoFastqParseTextBody = string
+
+// PostIoFastqWriteJSONBody defines parameters for PostIoFastqWrite.
+type PostIoFastqWriteJSONBody = []FastqRead
+
// PostIoGenbankParseTextBody defines parameters for PostIoGenbankParse.
type PostIoGenbankParseTextBody = string
-// PostSimulateComplexPcrJSONBody defines parameters for PostSimulateComplexPcr.
-type PostSimulateComplexPcrJSONBody struct {
+// PostIoGenbankWriteJSONBody defines parameters for PostIoGenbankWrite.
+type PostIoGenbankWriteJSONBody = []GenbankRecord
+
+// PostPcrComplexPcrJSONBody defines parameters for PostPcrComplexPcr.
+type PostPcrComplexPcrJSONBody struct {
Circular *bool `json:"circular,omitempty"`
Primers []string `json:"primers"`
TargetTm float32 `json:"target_tm"`
Templates []string `json:"templates"`
}
-// PostSimulateFragmentJSONBody defines parameters for PostSimulateFragment.
-type PostSimulateFragmentJSONBody struct {
- ExcludeOverhangs *[]string `json:"exclude_overhangs,omitempty"`
- MaxFragmentSize int `json:"max_fragment_size"`
- MinFragmentSize int `json:"min_fragment_size"`
- Sequence string `json:"sequence"`
+// PostPcrPrimersDebruijnBarcodesJSONBody defines parameters for PostPcrPrimersDebruijnBarcodes.
+type PostPcrPrimersDebruijnBarcodesJSONBody struct {
+ BannedSequences *[]string `json:"banned_sequences,omitempty"`
+ BarcodeLength int `json:"barcode_length"`
+ GcRange struct {
+ MaxGc *float32 `json:"max_gc,omitempty"`
+ MinGc *float32 `json:"min_gc,omitempty"`
+ } `json:"gc_range"`
+ MaxSubSequence int `json:"max_sub_sequence"`
}
-// PostSimulateGoldengateJSONBody defines parameters for PostSimulateGoldengate.
-type PostSimulateGoldengateJSONBody struct {
- Enzyme *Enzyme `json:"enzyme,omitempty"`
- Sequences *[]string `json:"sequences,omitempty"`
+// PostPcrPrimersMarmurDotyJSONBody defines parameters for PostPcrPrimersMarmurDoty.
+type PostPcrPrimersMarmurDotyJSONBody struct {
+ Sequence string `json:"sequence"`
}
-// PostSimulateLigateJSONBody defines parameters for PostSimulateLigate.
-type PostSimulateLigateJSONBody = []Fragment
+// PostPcrPrimersMeltingTemperatureJSONBody defines parameters for PostPcrPrimersMeltingTemperature.
+type PostPcrPrimersMeltingTemperatureJSONBody struct {
+ Sequence string `json:"sequence"`
+}
+
+// PostPcrPrimersSantaLuciaJSONBody defines parameters for PostPcrPrimersSantaLucia.
+type PostPcrPrimersSantaLuciaJSONBody struct {
+ MagnesiumConcentration float32 `json:"magnesiumConcentration"`
+ PrimerConcentration float32 `json:"primerConcentration"`
+ SaltConcentration float32 `json:"saltConcentration"`
+ Sequence string `json:"sequence"`
+}
-// PostSimulatePcrJSONBody defines parameters for PostSimulatePcr.
-type PostSimulatePcrJSONBody struct {
+// PostPcrSimplePcrJSONBody defines parameters for PostPcrSimplePcr.
+type PostPcrSimplePcrJSONBody struct {
Circular *bool `json:"circular,omitempty"`
ForwardPrimer string `json:"forward_primer"`
ReversePrimer string `json:"reverse_primer"`
@@ -191,20 +238,31 @@ type PostSimulatePcrJSONBody struct {
Template string `json:"template"`
}
-// PostSimulateRestrictionDigestJSONBody defines parameters for PostSimulateRestrictionDigest.
-type PostSimulateRestrictionDigestJSONBody struct {
- Enzyme *Enzyme `json:"enzyme,omitempty"`
- Sequence *string `json:"sequence,omitempty"`
+// PostSynthesisFragmentJSONBody defines parameters for PostSynthesisFragment.
+type PostSynthesisFragmentJSONBody struct {
+ ExcludeOverhangs *[]string `json:"exclude_overhangs,omitempty"`
+ MaxFragmentSize int `json:"max_fragment_size"`
+ MinFragmentSize int `json:"min_fragment_size"`
+ Sequence string `json:"sequence"`
}
-// PostDesignCdsFixJSONRequestBody defines body for PostDesignCdsFix for application/json ContentType.
-type PostDesignCdsFixJSONRequestBody PostDesignCdsFixJSONBody
+// PostCdsFixJSONRequestBody defines body for PostCdsFix for application/json ContentType.
+type PostCdsFixJSONRequestBody PostCdsFixJSONBody
+
+// PostCdsOptimizeJSONRequestBody defines body for PostCdsOptimize for application/json ContentType.
+type PostCdsOptimizeJSONRequestBody PostCdsOptimizeJSONBody
+
+// PostCdsTranslateJSONRequestBody defines body for PostCdsTranslate for application/json ContentType.
+type PostCdsTranslateJSONRequestBody PostCdsTranslateJSONBody
-// PostDesignCdsOptimizeJSONRequestBody defines body for PostDesignCdsOptimize for application/json ContentType.
-type PostDesignCdsOptimizeJSONRequestBody PostDesignCdsOptimizeJSONBody
+// PostCloningGoldengateJSONRequestBody defines body for PostCloningGoldengate for application/json ContentType.
+type PostCloningGoldengateJSONRequestBody PostCloningGoldengateJSONBody
-// PostDesignCdsTranslateJSONRequestBody defines body for PostDesignCdsTranslate for application/json ContentType.
-type PostDesignCdsTranslateJSONRequestBody PostDesignCdsTranslateJSONBody
+// PostCloningLigateJSONRequestBody defines body for PostCloningLigate for application/json ContentType.
+type PostCloningLigateJSONRequestBody = PostCloningLigateJSONBody
+
+// PostCloningRestrictionDigestJSONRequestBody defines body for PostCloningRestrictionDigest for application/json ContentType.
+type PostCloningRestrictionDigestJSONRequestBody PostCloningRestrictionDigestJSONBody
// PostExecuteLuaJSONRequestBody defines body for PostExecuteLua for application/json ContentType.
type PostExecuteLuaJSONRequestBody PostExecuteLuaJSONBody
@@ -212,23 +270,38 @@ type PostExecuteLuaJSONRequestBody PostExecuteLuaJSONBody
// PostIoFastaParseTextRequestBody defines body for PostIoFastaParse for text/plain ContentType.
type PostIoFastaParseTextRequestBody = PostIoFastaParseTextBody
+// PostIoFastaWriteJSONRequestBody defines body for PostIoFastaWrite for application/json ContentType.
+type PostIoFastaWriteJSONRequestBody = PostIoFastaWriteJSONBody
+
+// PostIoFastqParseTextRequestBody defines body for PostIoFastqParse for text/plain ContentType.
+type PostIoFastqParseTextRequestBody = PostIoFastqParseTextBody
+
+// PostIoFastqWriteJSONRequestBody defines body for PostIoFastqWrite for application/json ContentType.
+type PostIoFastqWriteJSONRequestBody = PostIoFastqWriteJSONBody
+
// PostIoGenbankParseTextRequestBody defines body for PostIoGenbankParse for text/plain ContentType.
type PostIoGenbankParseTextRequestBody = PostIoGenbankParseTextBody
-// PostSimulateComplexPcrJSONRequestBody defines body for PostSimulateComplexPcr for application/json ContentType.
-type PostSimulateComplexPcrJSONRequestBody PostSimulateComplexPcrJSONBody
+// PostIoGenbankWriteJSONRequestBody defines body for PostIoGenbankWrite for application/json ContentType.
+type PostIoGenbankWriteJSONRequestBody = PostIoGenbankWriteJSONBody
+
+// PostPcrComplexPcrJSONRequestBody defines body for PostPcrComplexPcr for application/json ContentType.
+type PostPcrComplexPcrJSONRequestBody PostPcrComplexPcrJSONBody
+
+// PostPcrPrimersDebruijnBarcodesJSONRequestBody defines body for PostPcrPrimersDebruijnBarcodes for application/json ContentType.
+type PostPcrPrimersDebruijnBarcodesJSONRequestBody PostPcrPrimersDebruijnBarcodesJSONBody
-// PostSimulateFragmentJSONRequestBody defines body for PostSimulateFragment for application/json ContentType.
-type PostSimulateFragmentJSONRequestBody PostSimulateFragmentJSONBody
+// PostPcrPrimersMarmurDotyJSONRequestBody defines body for PostPcrPrimersMarmurDoty for application/json ContentType.
+type PostPcrPrimersMarmurDotyJSONRequestBody PostPcrPrimersMarmurDotyJSONBody
-// PostSimulateGoldengateJSONRequestBody defines body for PostSimulateGoldengate for application/json ContentType.
-type PostSimulateGoldengateJSONRequestBody PostSimulateGoldengateJSONBody
+// PostPcrPrimersMeltingTemperatureJSONRequestBody defines body for PostPcrPrimersMeltingTemperature for application/json ContentType.
+type PostPcrPrimersMeltingTemperatureJSONRequestBody PostPcrPrimersMeltingTemperatureJSONBody
-// PostSimulateLigateJSONRequestBody defines body for PostSimulateLigate for application/json ContentType.
-type PostSimulateLigateJSONRequestBody = PostSimulateLigateJSONBody
+// PostPcrPrimersSantaLuciaJSONRequestBody defines body for PostPcrPrimersSantaLucia for application/json ContentType.
+type PostPcrPrimersSantaLuciaJSONRequestBody PostPcrPrimersSantaLuciaJSONBody
-// PostSimulatePcrJSONRequestBody defines body for PostSimulatePcr for application/json ContentType.
-type PostSimulatePcrJSONRequestBody PostSimulatePcrJSONBody
+// PostPcrSimplePcrJSONRequestBody defines body for PostPcrSimplePcr for application/json ContentType.
+type PostPcrSimplePcrJSONRequestBody PostPcrSimplePcrJSONBody
-// PostSimulateRestrictionDigestJSONRequestBody defines body for PostSimulateRestrictionDigest for application/json ContentType.
-type PostSimulateRestrictionDigestJSONRequestBody PostSimulateRestrictionDigestJSONBody
+// PostSynthesisFragmentJSONRequestBody defines body for PostSynthesisFragment for application/json ContentType.
+type PostSynthesisFragmentJSONRequestBody PostSynthesisFragmentJSONBody
diff --git a/api/go.mod b/api/go.mod
index 7ae74e6..0e513d9 100644
--- a/api/go.mod
+++ b/api/go.mod
@@ -3,7 +3,6 @@ module github.com/koeng101/dnadesign/api
go 1.21.5
require (
- github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b
github.com/getkin/kin-openapi v0.122.0
github.com/go-chi/chi/v5 v5.0.10
github.com/koeng101/dnadesign/lib v0.0.0-20231216182748-f354ee0f2714
diff --git a/api/go.sum b/api/go.sum
index 3651ca0..b903719 100644
--- a/api/go.sum
+++ b/api/go.sum
@@ -2,8 +2,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b h1:oy54yVy300Db264NfQCJubZHpJOl+SoT6udALQdFbSI=
-github.com/flowchartsman/swaggerui v0.0.0-20221017034628-909ed4f3701b/go.mod h1:/RJwPD5L4xWgCbqQ1L5cB12ndgfKKT54n9cZFf+8pus=
github.com/getkin/kin-openapi v0.122.0 h1:WB9Jbl0Hp/T79/JF9xlSW5Kl9uYdk/AWD0yAd9HOM10=
github.com/getkin/kin-openapi v0.122.0/go.mod h1:PCWw/lfBrJY4HcdqE3jj+QFkaFK8ABoqo7PvqVhXXqw=
github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
diff --git a/api/spec.yaml b/api/spec.yaml
index ea99cf7..1ad2513 100644
--- a/api/spec.yaml
+++ b/api/spec.yaml
@@ -27,6 +27,108 @@ components:
required:
- identifier
- sequence
+ FastqRead:
+ type: object
+ properties:
+ Identifier:
+ type: string
+ Optionals:
+ type: object
+ additionalProperties:
+ type: string
+ Sequence:
+ type: string
+ Quality:
+ type: string
+ required:
+ - Identifier
+ - Sequence
+ - Quality
+ Slow5Header:
+ type: object
+ properties:
+ HeaderValues:
+ type: array
+ items:
+ $ref: '#/components/schemas/HeaderValue'
+ HeaderValue:
+ type: object
+ properties:
+ ReadGroupID:
+ type: integer
+ Slow5Version:
+ type: string
+ Attributes:
+ type: object
+ additionalProperties:
+ type: string
+ EndReasonHeaderMap:
+ type: object
+ additionalProperties:
+ type: integer
+ Slow5Read:
+ type: object
+ properties:
+ ReadID:
+ type: string
+ ReadGroupID:
+ type: integer
+ Digitisation:
+ type: number
+ Offset:
+ type: number
+ Range:
+ type: number
+ SamplingRate:
+ type: number
+ LenRawSignal:
+ type: integer
+ RawSignal:
+ type: array
+ items:
+ type: integer
+ ChannelNumber:
+ type: string
+ MedianBefore:
+ type: number
+ ReadNumber:
+ type: integer
+ StartMux:
+ type: integer
+ StartTime:
+ type: integer
+ EndReason:
+ type: string
+ EndReasonMap:
+ type: object
+ additionalProperties:
+ type: integer
+ PileupLine:
+ type: object
+ properties:
+ Sequence:
+ type: string
+ Position:
+ type: integer
+ ReferenceBase:
+ type: string
+ ReadCount:
+ type: integer
+ ReadResults:
+ type: array
+ items:
+ type: string
+ Quality:
+ type: string
+ required:
+ - Sequence
+ - Position
+ - ReferenceBase
+ - ReadCount
+ - ReadResults
+ - Quality
+
+
GenbankRecord:
type: object
required:
@@ -251,6 +353,51 @@ components:
- From
- To
- Reason
+ Codon:
+ type: object
+ properties:
+ Triplet:
+ type: string
+ Weight:
+ type: integer
+ required:
+ - Triplet
+ - Weight
+
+ AminoAcid:
+ type: object
+ properties:
+ Letter:
+ type: string
+ Codons:
+ type: array
+ items:
+ $ref: '#/components/schemas/Codon'
+ required:
+ - Letter
+ - Codons
+
+ CodonTable:
+ type: object
+ properties:
+ StartCodons:
+ type: array
+ items:
+ type: string
+ StopCodons:
+ type: array
+ items:
+ type: string
+ AminoAcids:
+ type: array
+ items:
+ $ref: '#/components/schemas/AminoAcid'
+ required:
+ - StartCodons
+ - StopCodons
+ - AminoAcids
+
+
paths:
/execute_lua:
post:
@@ -317,6 +464,21 @@ paths:
text/plain:
schema:
type: string
+ /io/fasta/write:
+ post:
+ tags:
+ - io
+ summary: Write FASTA data
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/FastaRecord'
+ responses:
+ '200':
+ description: FASTA file written successfully
/io/genbank/parse:
post:
tags:
@@ -342,7 +504,227 @@ paths:
text/plain:
schema:
type: string
- /design/cds/fix:
+ /io/genbank/write:
+ post:
+ tags:
+ - io
+ summary: Write Genbank data
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/GenbankRecord'
+ responses:
+ '200':
+ description: Genbank file written successfully
+ /io/fastq/parse:
+ post:
+ tags:
+ - io
+ summary: Parse FASTQ data
+ requestBody:
+ content:
+ text/plain:
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Parsed FASTQ records
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/FastqRead'
+
+ /io/fastq/write:
+ post:
+ tags:
+ - io
+ summary: Write FASTQ data
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/FastqRead'
+ responses:
+ '200':
+ description: FASTQ file written successfully
+ /io/pileup/parse:
+ post:
+ summary: Parse Pileup Data
+ tags:
+ - io
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: string
+ required:
+ - data
+ responses:
+ '200':
+ description: Array of Pileup Lines
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/PileupLine'
+ /io/pileup/write:
+ post:
+ summary: Write Pileup Data
+ tags:
+ - io
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ lines:
+ type: array
+ items:
+ $ref: '#/components/schemas/PileupLine'
+ responses:
+ '200':
+ description: Pileup data string
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: string
+
+ /io/slow5/parse:
+ post:
+ summary: Parse slow5 Data
+ tags:
+ - io
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: string
+ required:
+ - data
+ responses:
+ '200':
+ description: Parsed slow5 data
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ header:
+ $ref: '#/components/schemas/Slow5Header'
+ reads:
+ type: array
+ items:
+ $ref: '#/components/schemas/Slow5Read'
+ /io/slow5/write:
+ post:
+ summary: Write slow5 Data
+ tags:
+ - io
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ header:
+ $ref: '#/components/schemas/Slow5Header'
+ reads:
+ type: array
+ items:
+ $ref: '#/components/schemas/Slow5Read'
+ responses:
+ '200':
+ description: slow5 data written successfully
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: string
+ /io/slow5/svb_compress:
+ post:
+ summary: Compress Raw Signal with SVB
+ tags:
+ - io
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ rawSignal:
+ type: array
+ items:
+ type: integer
+ responses:
+ '200':
+ description: Compressed raw signal
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ mask:
+ type: string
+ data:
+ type: string
+ /io/slow5/svb_decompress:
+ post:
+ summary: Decompress Raw Signal with SVB
+ tags:
+ - io
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ lenRawSignal:
+ type: integer
+ mask:
+ type: string
+ data:
+ type: string
+ responses:
+ '200':
+ description: Decompressed raw signal
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ rawSignal:
+ type: array
+ items:
+ type: integer
+
+
+ /cds/fix:
post:
tags:
- cds
@@ -395,7 +777,7 @@ paths:
text/plain:
schema:
type: string
- /design/cds/optimize:
+ /cds/optimize:
post:
tags:
- cds
@@ -435,7 +817,7 @@ paths:
text/plain:
schema:
type: string
- /design/cds/translate:
+ /cds/translate:
post:
tags:
- cds
@@ -465,58 +847,113 @@ paths:
text/plain:
schema:
type: string
- /simulate/fragment:
+
+
+
+ /pcr/primers/debruijn_barcodes:
post:
tags:
- - simulate
- summary: Fragment CDS
+ - pcr
+ summary: Generate De Bruijn sequence-based barcodes
requestBody:
content:
application/json:
schema:
type: object
properties:
- sequence:
- type: string
- min_fragment_size:
+ barcode_length:
type: integer
- default: 200
- max_fragment_size:
+ max_sub_sequence:
type: integer
- default: 300
- exclude_overhangs:
+ banned_sequences:
type: array
items:
type: string
- required: [sequence, min_fragment_size, max_fragment_size]
+ gc_range:
+ type: object
+ properties:
+ max_gc:
+ type: number
+ min_gc:
+ type: number
+ required:
+ - barcode_length
+ - max_sub_sequence
+ - gc_range
responses:
'200':
- description: Array of fragments and a float
- content:
- application/json:
- schema:
- type: object
- properties:
- fragments:
- type: array
- items:
- type: string
- efficiency:
- type: number
- default: 0.99
- required:
- - fragments
- - efficiency
- '500':
- description: Internal server error
- content:
- text/plain:
- schema:
- type: string
- /simulate/complex_pcr:
+ description: Array of generated barcode sequences
+
+ /pcr/primers/marmur_doty:
+ post:
+ tags:
+ - pcr
+ summary: Calculate Melting Temperature using Marmur Doty method
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ required:
+ - sequence
+ responses:
+ '200':
+ description: Calculated melting temperature as float
+
+ /pcr/primers/santa_lucia:
+ post:
+ tags:
+ - pcr
+ summary: Calculate Melting Temperature using Santa Lucia method
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ primerConcentration:
+ type: number
+ saltConcentration:
+ type: number
+ magnesiumConcentration:
+ type: number
+ required:
+ - sequence
+ - primerConcentration
+ - saltConcentration
+ - magnesiumConcentration
+ responses:
+ '200':
+ description: Calculated melting temperature, dH, dS as floats
+
+ /pcr/primers/melting_temperature:
+ post:
+ tags:
+ - pcr
+ summary: Calculate Melting Temperature
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ required:
+ - sequence
+ responses:
+ '200':
+ description: Calculated melting temperature as float
+
+ /pcr/complex_pcr:
post:
tags:
- - simulate
+ - pcr
summary: Simulate PCR
requestBody:
content:
@@ -553,10 +990,11 @@ paths:
text/plain:
schema:
type: string
- /simulate/pcr:
+
+ /pcr/simple_pcr:
post:
tags:
- - simulate
+ - pcr
summary: Simulate a simple PCR
requestBody:
content:
@@ -589,10 +1027,51 @@ paths:
text/plain:
schema:
type: string
- /simulate/ligate:
+
+ /pcr/primers/design_primers:
+ post:
+ summary: Design PCR Primers
+ tags:
+ - pcr
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ targetTm:
+ type: number
+ forward_overhang:
+ type: string
+ default: ""
+ reverse_overhang:
+ type: string
+ default: ""
+ required:
+ - sequence
+ - targetTm
+ responses:
+ '200':
+ description: Forward and reverse primers
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ forward_primer:
+ type: string
+ reverse_primer:
+ type: string
+
+
+
+ /cloning/ligate:
post:
tags:
- - simulate
+ - cloning
summary: Simulate ligation
requestBody:
content:
@@ -604,10 +1083,10 @@ paths:
responses:
'200':
description: Ligated product strings
- /simulate/restriction_digest:
+ /cloning/restriction_digest:
post:
tags:
- - simulate
+ - cloning
summary: Simulate restriction digest
requestBody:
content:
@@ -628,11 +1107,11 @@ paths:
text/plain:
schema:
type: string
- /simulate/goldengate:
+ /cloning/goldengate:
post:
tags:
- - simulate
- summary: Simulate Golden Gate assembly
+ - cloning
+ summary: Simulate GoldenGate assembly
requestBody:
content:
application/json:
@@ -647,7 +1126,55 @@ paths:
$ref: '#/components/schemas/Enzyme'
responses:
'200':
- description: Golden Gate assembly product strings
+ description: GoldenGate assembly product strings
+ '500':
+ description: Internal server error
+ content:
+ text/plain:
+ schema:
+ type: string
+ /cloning/fragment:
+ post:
+ tags:
+ - cloning
+ summary: Fragment DNA for GoldenGate
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ min_fragment_size:
+ type: integer
+ default: 200
+ max_fragment_size:
+ type: integer
+ default: 300
+ exclude_overhangs:
+ type: array
+ items:
+ type: string
+ required: [sequence, min_fragment_size, max_fragment_size]
+ responses:
+ '200':
+ description: Array of fragments and a float
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ fragments:
+ type: array
+ items:
+ type: string
+ efficiency:
+ type: number
+ default: 0.99
+ required:
+ - fragments
+ - efficiency
'500':
description: Internal server error
content:
@@ -655,3 +1182,635 @@ paths:
schema:
type: string
+
+
+
+ /folding/zuker:
+ post:
+ summary: Zuker Folding
+ tags:
+ - folding
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ temperature:
+ type: number
+ default: 37
+ required:
+ - sequence
+ responses:
+ '200':
+ description: Folding results
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ dot_bracket:
+ type: string
+ score:
+ type: number
+
+ /folding/linearfold/vienna_rna_fold:
+ post:
+ summary: Vienna RNA Fold
+ tags:
+ - folding
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ temperature:
+ type: number
+ default: 37
+ required:
+ - sequence
+ responses:
+ '200':
+ description: Folding results
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ dot_bracket:
+ type: string
+ score:
+ type: number
+ /folding/linearfold/contra_fold_v2:
+ post:
+ summary: Contra Fold V2
+ tags:
+ - folding
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ required:
+ - sequence
+ responses:
+ '200':
+ description: Folding results
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ dot_bracket:
+ type: string
+ score:
+ type: number
+
+
+
+ /seqhash:
+ post:
+ summary: Sequence Hashing
+ tags:
+ - seqhash
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ sequenceType:
+ type: string
+ enum: [DNA, PROTEIN, RNA]
+ circular:
+ type: boolean
+ doubleStranded:
+ type: boolean
+ required:
+ - sequence
+ - sequenceType
+ - circular
+ - doubleStranded
+ responses:
+ '200':
+ description: Sequence hash
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ hash:
+ type: string
+
+ /seqhash_fragment:
+ post:
+ summary: Sequence Hashing for Fragment
+ tags:
+ - seqhash
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ forwardOverhangLength:
+ type: integer
+ format: int8
+ reverseOverhangLength:
+ type: integer
+ format: int8
+ required:
+ - sequence
+ - forwardOverhangLength
+ - reverseOverhangLength
+ responses:
+ '200':
+ description: Fragment sequence hash
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ hash:
+ type: string
+
+
+
+ /codon_tables/new:
+ post:
+ summary: Create New Codon Table
+ tags:
+ - codon_tables
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ tableNumber:
+ type: integer
+ minimum: 1
+ maximum: 33
+ required:
+ - tableNumber
+ responses:
+ '200':
+ description: New Codon Table
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CodonTable'
+
+ /codon_tables/from_genbank:
+ post:
+ summary: Create Weighted Codon Table from Genbank Record
+ tags:
+ - codon_tables
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ genbankRecord:
+ $ref: '#/components/schemas/GenbankRecord'
+ codonTable:
+ $ref: '#/components/schemas/CodonTable'
+ required:
+ - genbankRecord
+ - codonTable
+ responses:
+ '200':
+ description: New Weighted Codon Table
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CodonTable'
+
+ /codon_tables/compromise_tables:
+ post:
+ summary: Create Compromise Codon Table
+ tags:
+ - codon_tables
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ codonTable1:
+ $ref: '#/components/schemas/CodonTable'
+ codonTable2:
+ $ref: '#/components/schemas/CodonTable'
+ required:
+ - codonTable1
+ - codonTable2
+ responses:
+ '200':
+ description: New Compromise Codon Table
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CodonTable'
+ /codon_tables/add_tables:
+ post:
+ summary: Add Two Codon Tables
+ tags:
+ - codon_tables
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ codonTable1:
+ $ref: '#/components/schemas/CodonTable'
+ codonTable2:
+ $ref: '#/components/schemas/CodonTable'
+ required:
+ - codonTable1
+ - codonTable2
+ responses:
+ '200':
+ description: New Codon Table from Addition
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CodonTable'
+ /codon_tables/default_organisms:
+ get:
+ summary: Get Default Organism Names
+ tags:
+ - codon_tables
+ responses:
+ '200':
+ description: List of default organism names
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: string
+ /codon_tables/get_organism_table:
+ post:
+ summary: Get Codon Table for an Organism
+ tags:
+ - codon_tables
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ organism:
+ type: string
+ required:
+ - organism
+ responses:
+ '200':
+ description: Codon table for the specified organism
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CodonTable'
+
+
+
+ /align/needleman_wunsch:
+ post:
+ summary: Perform Needleman-Wunsch Alignment
+ tags:
+ - align
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence_a:
+ type: string
+ sequence_b:
+ type: string
+ required:
+ - sequence_a
+ - sequence_b
+ responses:
+ '200':
+ description: Alignment results with score
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ score:
+ type: number
+ alignment_a:
+ type: string
+ alignment_b:
+ type: string
+ /align/smith_waterman:
+ post:
+ summary: Perform Smith-Waterman Alignment
+ tags:
+ - align
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence_a:
+ type: string
+ sequence_b:
+ type: string
+ required:
+ - sequence_a
+ - sequence_b
+ responses:
+ '200':
+ description: Alignment results with score
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ score:
+ type: number
+ alignment_a:
+ type: string
+ alignment_b:
+ type: string
+ /align/mash:
+ post:
+ summary: Calculate Mash Distance
+ tags:
+ - align
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence_a:
+ type: string
+ sequence_b:
+ type: string
+ kmer_size:
+ type: integer
+ sketch_size:
+ type: integer
+ required:
+ - sequence_a
+ - sequence_b
+ - kmer_size
+ - sketch_size
+ responses:
+ '200':
+ description: Mash distance result
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ distance:
+ type: number
+ /align/mash_many:
+ post:
+ summary: Calculate Mash Distance Against Many Sequences
+ tags:
+ - align
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ comparison_sequences:
+ type: array
+ items:
+ type: string
+ kmer_size:
+ type: integer
+ sketch_size:
+ type: integer
+ required:
+ - sequence
+ - comparison_sequences
+ - kmer_size
+ - sketch_size
+ responses:
+ '200':
+ description: List of Mash distances
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: number
+
+
+
+
+ /utils/reverse_complement:
+ post:
+ summary: Reverse Complement of DNA Sequence
+ tags:
+ - utils
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ required:
+ - sequence
+ responses:
+ '200':
+ description: Reverse complement sequence
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+
+ /utils/rna_reverse_complement:
+ post:
+ summary: Reverse Complement of RNA Sequence
+ tags:
+ - utils
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ required:
+ - sequence
+ responses:
+ '200':
+ description: Reverse complement RNA sequence
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+
+ /utils/is_palindromic:
+ post:
+ summary: Check if Sequence is Palindromic
+ tags:
+ - utils
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+ required:
+ - sequence
+ responses:
+ '200':
+ description: Palindromic status
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ isPalindromic:
+ type: boolean
+
+
+
+ /random/random_dna:
+ post:
+ summary: Generate Random DNA Sequence
+ tags:
+ - random
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ length:
+ type: integer
+ seed:
+ type: integer
+ nullable: true
+ required:
+ - length
+ responses:
+ '200':
+ description: Random DNA sequence
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+
+ /random/random_rna:
+ post:
+ summary: Generate Random RNA Sequence
+ tags:
+ - random
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ length:
+ type: integer
+ seed:
+ type: integer
+ nullable: true
+ required:
+ - length
+ responses:
+ '200':
+ description: Random RNA sequence
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+
+ /random/random_protein:
+ post:
+ summary: Generate Random Protein Sequence
+ tags:
+ - random
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ length:
+ type: integer
+ seed:
+ type: integer
+ nullable: true
+ required:
+ - length
+ responses:
+ '200':
+ description: Random Protein sequence
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sequence:
+ type: string
+
+
+