{"openapi":"3.1.0","info":{"title":"PMAS API","description":"\n**PMAS — Polar-Multipole Amyloid Scoring**\n\nClosed-form four-feature amyloid hex-window scorer with a Chou-Fasman /\nHovmoller structural sidecar and a two-sequence co-aggregation\ncompatibility scorer. Calibrated on WaltzDB 2.0 (n=1415, AUC 0.8677,\nMCC 0.5970 at production threshold 1.686).\n\nThe five endpoints mirror the public CLI tools. Each accepts JSON,\nreturns JSON (or PNG bytes for `/v1/visualize`). No authentication is\nrequired. Rate limit is 60 requests/minute per IP.\n\nFor the underlying tool documentation, walkthroughs, and parameter\ntable: see the open-source release of PMAS on GitHub.\n\n**Applicability boundary (read this first):** PMAS scores hex-window\nchemistry. It does not model solvent accessibility, conformational\ndynamics, or kinetic effects. The structural-context endpoint flags\nmutations whose biology is structurally driven (e.g. alpha-syn A53T,\nIAPP S20G, htt polyQ) so the user knows when PMAS is out-of-domain.\n","version":"0.5.0"},"paths":{"/v1/health":{"get":{"tags":["meta"],"summary":"Service health and calibration headline","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/version":{"get":{"tags":["meta"],"summary":"Schema version and parameter file fingerprint","operationId":"version_v1_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"}}}}}}},"/v1/score":{"post":{"tags":["score"],"summary":"Score a single peptide / protein sequence","operationId":"score_endpoint_v1_score_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Score Endpoint V1 Score Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mutate":{"post":{"tags":["mutate"],"summary":"Compute wildtype-vs-mutant amyloid score deltas","operationId":"mutate_endpoint_v1_mutate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mutate Endpoint V1 Mutate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/structural-context":{"post":{"tags":["structural-context"],"summary":"Per-residue class composition, Z-impedance breaks, beta-anchor clusters","operationId":"structural_endpoint_v1_structural_context_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuralContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Structural Endpoint V1 Structural Context Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/coaggregate":{"post":{"tags":["coaggregate"],"summary":"Two-sequence amyloid co-aggregation compatibility","operationId":"coaggregate_endpoint_v1_coaggregate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoaggregateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Coaggregate Endpoint V1 Coaggregate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/visualize":{"post":{"tags":["visualize"],"summary":"Render a per-residue PMAS profile plot","operationId":"visualize_endpoint_v1_visualize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisualizeRequest"}}},"required":true},"responses":{"200":{"description":"Rendered plot bytes","content":{"application/json":{"schema":{}},"image/png":{},"image/svg+xml":{},"application/pdf":{}}},"400":{"description":"Invalid request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CoaggregateRequest":{"properties":{"seq_a":{"type":"string","maxLength":10000,"minLength":1,"title":"Seq A","description":"Sequence A (one-letter codes).","examples":["DAEFRHDSGYEVHHQKLVFFAEDVGSNKGAIIGLMVGGVVIA"]},"seq_b":{"type":"string","maxLength":10000,"minLength":1,"title":"Seq B","description":"Sequence B (one-letter codes).","examples":["MDVFMKGLSKAKEGVVAAAEKTKQGVAEAAGKTKEGVLYVGSKTKEGVVHGVATVAEKTKEQVTNVGGAVVTGVTAVAQKTVEGAGSIAAATGFVKKDQLGKNEEGAPQEGILEDMPVDPDNEAYEMPSEEGYQDYEPEA"]},"label_a":{"type":"string","title":"Label A","description":"Label for sequence A.","default":"seq_a"},"label_b":{"type":"string","title":"Label B","description":"Label for sequence B.","default":"seq_b"},"score_fn":{"type":"string","title":"Score Fn","description":"Score function name.","default":"amyloid_v1"},"weight_class":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Weight Class","description":"Weight on Chou-Fasman class match (default 0.50).","default":0.5},"weight_chemistry":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Weight Chemistry","description":"Weight on 4-feature chemistry similarity (default 0.40).","default":0.4},"weight_identity":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Weight Identity","description":"Weight on residue identity (default 0.10).","default":0.1},"compat_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Compat Threshold","description":"Similarity above which a hex pair is marked compatible.","default":0.75}},"type":"object","required":["seq_a","seq_b"],"title":"CoaggregateRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"version":{"type":"string","title":"Version"},"schema_version":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Schema Version"},"score_functions":{"items":{"type":"string"},"type":"array","title":"Score Functions"},"calibration":{"additionalProperties":true,"type":"object","title":"Calibration"}},"type":"object","required":["version","schema_version","score_functions","calibration"],"title":"HealthResponse"},"MutateRequest":{"properties":{"sequence":{"type":"string","maxLength":10000,"minLength":1,"title":"Sequence","description":"Wildtype amino-acid sequence.","examples":["DAEFRHDSGYEVHHQKLVFFAEDVGSNKGAIIGLMVGGVVIA"]},"mutations":{"type":"string","maxLength":2000,"minLength":2,"title":"Mutations","description":"Comma- or whitespace-separated mutation spec, e.g. 'F4A' or 'F4A,V3I'.","examples":["E22Q"]},"score_fn":{"type":"string","title":"Score Fn","description":"Score function name.","default":"amyloid_v1","examples":["amyloid_v1"]}},"type":"object","required":["sequence","mutations"],"title":"MutateRequest"},"ScoreRequest":{"properties":{"sequence":{"type":"string","maxLength":10000,"minLength":1,"title":"Sequence","description":"Single-letter amino-acid sequence (e.g. KLVFFAE).","examples":["KLVFFAE"]},"score_fn":{"type":"string","title":"Score Fn","description":"Score function name. Default: amyloid_v1.","default":"amyloid_v1","examples":["amyloid_v1"]}},"type":"object","required":["sequence"],"title":"ScoreRequest"},"StructuralContextRequest":{"properties":{"sequence":{"type":"string","maxLength":10000,"minLength":1,"title":"Sequence","description":"Amino-acid sequence to annotate.","examples":["DAEFRHDSGYEVHHQKLVFFAEDVGSNKGAIIGLMVGGVVIA"]},"mutations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mutations","description":"Optional mutation spec. If supplied, returns class-flip diff and narrative tag.","examples":["E22Q"]},"hex_delta":{"type":"number","title":"Hex Delta","description":"PMAS hex-score delta for the mutation; used to label the narrative tag.","default":0.0,"examples":[0.041]}},"type":"object","required":["sequence"],"title":"StructuralContextRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VersionResponse":{"properties":{"version":{"type":"string","title":"Version"},"schema_version":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Schema Version"},"score_functions":{"items":{"type":"string"},"type":"array","title":"Score Functions"},"parameter_table_sha256":{"type":"string","title":"Parameter Table Sha256"}},"type":"object","required":["version","schema_version","score_functions","parameter_table_sha256"],"title":"VersionResponse"},"VisualizeRequest":{"properties":{"sequence":{"type":"string","maxLength":10000,"minLength":6,"title":"Sequence","description":"Sequence to plot (must be at least HEX = 6 residues).","examples":["DAEFRHDSGYEVHHQKLVFFAEDVGSNKGAIIGLMVGGVVIA"]},"mutations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mutations","description":"Optional WT/MT overlay mutations.","examples":["E22Q"]},"components":{"type":"boolean","title":"Components","description":"Render the 5-panel component breakdown.","default":false},"anchor_shading":{"type":"boolean","title":"Anchor Shading","description":"Shade beta-anchor cluster regions on the score panel.","default":false},"z_impedance":{"type":"boolean","title":"Z Impedance","description":"Add a per-residue mechanical-impedance panel beneath the score panel.","default":false},"with_classes":{"type":"boolean","title":"With Classes","description":"Color x-tick residues by Chou-Fasman class (default true).","default":true},"score_fn":{"type":"string","title":"Score Fn","description":"Score function name.","default":"amyloid_v1"},"format":{"type":"string","title":"Format","description":"Output format: png, svg, or pdf.","default":"png"},"dpi":{"type":"integer","maximum":600.0,"minimum":50.0,"title":"Dpi","description":"Image DPI (50 to 600).","default":150}},"type":"object","required":["sequence"],"title":"VisualizeRequest"}}}}