{
  "openapi": "3.0.1",
  "info": {
    "title": "Sequence Alignment & Phylogenetic Tree API (MAFFT, FastTree)",
    "description": "Align DNA, RNA or protein sequences with MAFFT, MUSCLE or Clustal Omega and build a phylogenetic tree with FastTree. Send FASTA, links or NCBI and UniProt accessions; get the alignment, percent identity, mutations against a reference, a Newick tree and pictures.",
    "version": "0.1",
    "x-build-id": "mutubeHWpd0JelIzq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~sequence-alignment-tree/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-sequence-alignment-tree",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jumblemog~sequence-alignment-tree/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-sequence-alignment-tree",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jumblemog~sequence-alignment-tree/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-sequence-alignment-tree",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "fasta": {
            "title": "FASTA text",
            "type": "string",
            "description": "Paste the sequences as FASTA: each starts with a > line that names it. At least two sequences in all, of one kind: DNA, RNA or protein, recognized from the letters. Clustal, Stockholm and GenBank text work too."
          },
          "sequences": {
            "title": "Links, accessions or single sequences",
            "type": "array",
            "description": "One entry each: a link to a sequence file (FASTA, gzipped FASTA, GenBank, or a Clustal or Stockholm alignment), accessions of public records (UniProt such as P69905 or HBA_HUMAN, NCBI protein such as NP_000549.1, NCBI nucleotide such as NM_000518.5; several in one entry, separated by spaces or commas), or one sequence written as name: LETTERS. Over the API an entry can also be FASTA text. Used together with the FASTA box below. Put example here to run the built-in example.",
            "items": {
              "type": "string"
            }
          },
          "reference": {
            "title": "Reference sequence",
            "type": "string",
            "description": "Compare every sequence with this one: its name, or its position in the list (1 is the first). Each other sequence then gets its differences in the reference's numbering: substitutions (P5G), deletions (del 45-47) and insertions (ins 88^89 AG). Empty: no comparison."
          },
          "title": {
            "title": "Title",
            "type": "string",
            "description": "A title for the result and the report."
          },
          "aligner": {
            "title": "Aligner",
            "enum": [
              "auto",
              "accurate",
              "fast",
              "muscle",
              "clustalo",
              "none"
            ],
            "type": "string",
            "description": "The program that aligns. Auto suits almost every set. None keeps an alignment you send (every sequence the same length, gaps as -) and only measures it and builds the tree.",
            "default": "auto"
          },
          "type": {
            "title": "Sequence type",
            "enum": [
              "auto",
              "dna",
              "rna",
              "protein"
            ],
            "type": "string",
            "description": "Auto reads it from the letters. Set it for short peptides made only of A, C, G and T, which look like DNA.",
            "default": "auto"
          },
          "fixDirection": {
            "title": "Turn sequences on the opposite strand",
            "type": "boolean",
            "description": "For DNA and RNA aligned with MAFFT: a sequence that only fits as its reverse complement is turned around, and the result says which ones were.",
            "default": true
          },
          "trimGaps": {
            "title": "Trim gappy columns (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Take out the columns where more than this share of the sequences have a gap, before the figures and the tree. 50 is a common choice for trees. Empty: keep every column."
          },
          "tree": {
            "title": "Tree",
            "enum": [
              "auto",
              "fasttree",
              "nj",
              "none"
            ],
            "type": "string",
            "description": "How the phylogenetic tree is built. FastTree gives branch support values; neighbor joining is instant and has none.",
            "default": "auto"
          },
          "treeModel": {
            "title": "Substitution model",
            "enum": [
              "auto",
              "gtr",
              "jc",
              "lg",
              "wag",
              "jtt"
            ],
            "type": "string",
            "description": "The model FastTree uses.",
            "default": "auto"
          },
          "root": {
            "title": "Root",
            "type": "string",
            "description": "Where the tree is rooted: midpoint (halfway along the longest path between two sequences), or the name of a sequence to use as the outgroup.",
            "default": "midpoint"
          },
          "order": {
            "title": "Order of the sequences",
            "enum": [
              "input",
              "tree"
            ],
            "type": "string",
            "description": "The order of the rows in the alignment, the files and the picture.",
            "default": "input"
          },
          "labels": {
            "title": "Labels in the tree picture",
            "enum": [
              "name",
              "organism",
              "description"
            ],
            "type": "string",
            "description": "What the tree picture and the text drawing call each sequence. Organisms are read from database headers (OS=Homo sapiens, [Homo sapiens]). Data fields and files always use the names.",
            "default": "name"
          },
          "pictures": {
            "title": "Pictures",
            "type": "boolean",
            "description": "Draw the alignment (PNG) and the tree (PNG and SVG).",
            "default": true
          },
          "timeLimitSeconds": {
            "title": "Time limit per alignment (seconds)",
            "minimum": 5,
            "maximum": 1800,
            "type": "integer",
            "description": "How long the aligner and the tree builder may run for one alignment. Most sets take a second or two. Time past 30 seconds is billed per started 30 seconds.",
            "default": 120
          },
          "jobs": {
            "title": "Several alignments",
            "type": "array",
            "description": "Several alignments in one run: a list of objects, each with its own sequences (a list of entries as above, or FASTA text in fasta) and any other field: [{\"title\": \"globins\", \"sequences\": [\"P69905 P01942 P01966\"]}, {\"sequences\": [\"https://example.org/spike.fasta\"], \"reference\": 1}]. Fields not given come from above. An entry of sequences can also be an object: {\"name\": \"mine\", \"sequence\": \"ACGT...\"}."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}