Benchling Nucleotide Alignments API

A Nucleotide Alignment is a Benchling object representing an alignment of multiple DNA and/or RNA sequences.

Documentation

Specifications

Other Resources

OpenAPI Specification

benchling-nucleotide-alignments-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Benchling AA Sequences Nucleotide Alignments API
  version: 2.0.0
  description: 'AA Sequences are the working units of cells that make everything run (they help make structures, catalyze reactions and allow for signaling - a kind of internal cell communication). On Benchling, these are comprised of a string of amino acids and collections of other attributes, such as annotations.

    '
servers:
- url: /api/v2
security:
- oAuth: []
- basicApiKeyAuth: []
tags:
- description: A Nucleotide Alignment is a Benchling object representing an alignment of multiple DNA and/or RNA sequences.
  name: Nucleotide Alignments
paths:
  /nucleotide-alignments:
    get:
      description: List Nucleotide Alignments
      operationId: listNucleotideAlignments
      parameters:
      - description: 'Number of results to return. Defaults to 50, maximum of 100.

          '
        in: query
        name: pageSize
        schema:
          default: 50
          maximum: 100
          minimum: 0
          nullable: false
          type: integer
      - description: Token for pagination
        in: query
        name: nextToken
        schema:
          type: string
      - in: query
        name: sort
        schema:
          default: modifiedAt:desc
          description: 'Method by which to order search results. Valid sorts are name, modifiedAt, and createdAt. Optionally add :asc or :desc to specify ascending or descending order. Default is modifiedAt.

            '
          enum:
          - createdAt
          - createdAt:asc
          - createdAt:desc
          - modifiedAt
          - modifiedAt:asc
          - modifiedAt:desc
          - name
          - name:asc
          - name:desc
          nullable: false
          type: string
      - description: 'Datetime, in RFC 3339 format. Supports the > and < operators. Time zone defaults to UTC. Restricts results to those created in the specified range. e.g. > 2017-04-30. Date ranges can be specified with the following nomenclature > YYYY-MM-DD AND <YYYY-MM-DD.

          '
        examples:
          and-range:
            summary: Filter for all models created within a certain range using the AND operator.
            value: '> 2022-03-01 AND < 2022-04-01'
          full-rfc-3339-format:
            summary: Filter for created models using the full RFC 3339 format
            value: '> 2020-12-31T21:07:14-05:00'
          greater-than-example:
            summary: Filter for all models created after a certain date
            value: '> 2022-03-01'
        in: query
        name: createdAt
        schema:
          type: string
      - description: 'Datetime, in RFC 3339 format. Supports the > and < operators. Time zone defaults to UTC. Restricts results to those modified in the specified range. e.g. > 2017-04-30. Date ranges can be specified with the following nomenclature > YYYY-MM-DD AND <YYYY-MM-DD.

          '
        examples:
          and-range:
            summary: Filter for all models modified within a certain range using the AND operator.
            value: '> 2022-03-01 AND < 2022-04-01'
          full-rfc-3339-format:
            summary: Filter for modified models using the full RFC 3339 format
            value: '> 2020-12-31T21:07:14-05:00'
          greater-than-example:
            summary: Filter for all models modified after a certain date
            value: '> 2022-03-01'
        in: query
        name: modifiedAt
        schema:
          type: string
      - description: Name of a Nucleotide Alignment. Restricts results to those with the specified name.
        in: query
        name: name
        schema:
          type: string
      - description: Name substring of a Nucleotide Alignment. Restricts results to those with names that include the provided substring.
        in: query
        name: nameIncludes
        schema:
          type: string
      - description: 'Comma-separated list of ids. Matches all of the provided IDs, or returns a 400 error that includes a list of which IDs are invalid.

          '
        in: query
        name: ids
        schema:
          example: seqanl_VfVOART1,seqanl_RFhDGaaC
          type: string
      - description: 'Comma-separated list of names. Maximum of 100. Restricts results to those that match any of the specified names, case insensitive.  Warning - this filter can be non-performant due to case insensitivity.

          '
        in: query
        name: names.anyOf
        schema:
          example: MyName1,MyName2
          type: string
      - description: 'Comma-separated list of names. Maximum of 100. Restricts results to those that match any of the specified names, case sensitive.

          '
        in: query
        name: names.anyOf.caseSensitive
        schema:
          example: MyName1,MyName2
          type: string
      - description: 'Comma-separated list of sequence ids that own one or more Nucleotide Alignments (i.e. ids of sequences used as the template in a Template Alignment or created as the consensus sequence from a Consensus Alignment). Matches all of the provided IDs, or returns a 400 error that includes a list of which IDs are invalid.

          '
        in: query
        name: sequenceIds
        schema:
          example: seq_VfVOART1,seq_RFhDGaaC
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NucleotideAlignmentsPaginatedList'
          description: OK
          headers:
            Result-Count:
              description: The total number of items that match the given query
              schema:
                type: integer
            x-rate-limit-limit:
              description: The number of allowed requests in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-remaining:
              description: The number of requests remaining in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-reset:
              description: The number of seconds remaining in the current rate-limit period
              schema:
                type: integer
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
      summary: List Nucleotide Alignments
      tags:
      - Nucleotide Alignments
  /nucleotide-alignments/{alignment_id}:
    delete:
      description: Delete a Nucleotide Alignment
      operationId: deleteNucleotideAlignment
      parameters:
      - in: path
        name: alignment_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyObject'
          description: OK
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
      summary: Delete a Nucleotide Alignment
      tags:
      - Nucleotide Alignments
    get:
      description: Get a Nucleotide Alignment
      operationId: getNucleotideAlignment
      parameters:
      - in: path
        name: alignment_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NucleotideAlignment'
          description: OK
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
      summary: Get a Nucleotide Alignment
      tags:
      - Nucleotide Alignments
  /nucleotide-alignments:create-consensus-alignment:
    post:
      description: Create a consensus Nucleotide Alignment
      operationId: createConsensusNucleotideAlignment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NucleotideConsensusAlignmentCreate'
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncTaskLink'
          description: 'This endpoint launches a [long-running task](#/Tasks/getTask) and returns the Task ID of the launched task.

            When successful, the task returns the [Nucleotide Alignment](#/Nucleotide%20Alignments/getNucleotideAlignment) resource that was created.

            '
      summary: Create a consensus Nucleotide Alignment
      tags:
      - Nucleotide Alignments
  /nucleotide-alignments:create-template-alignment:
    post:
      description: Create a template Nucleotide Alignment
      operationId: createTemplateNucleotideAlignment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NucleotideTemplateAlignmentCreate'
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncTaskLink'
          description: 'This endpoint launches a [long-running task](#/Tasks/getTask) and returns the Task ID of the launched task.

            When successful, the task returns the [Nucleotide Alignment](#/Nucleotide%20Alignments/getNucleotideAlignment) resource that was created.

            '
      summary: Create a template Nucleotide Alignment
      tags:
      - Nucleotide Alignments
components:
  schemas:
    BadRequestError:
      properties:
        error:
          allOf:
          - $ref: '#/components/schemas/BaseError'
          - properties:
              type:
                enum:
                - invalid_request_error
                type: string
      type: object
    NucleotideTemplateAlignmentCreate:
      additionalProperties: false
      allOf:
      - $ref: '#/components/schemas/NucleotideAlignmentBase'
      - properties:
          templateSequenceId:
            example: seq_rXqq0IHU
            type: string
        required:
        - templateSequenceId
        type: object
    EmptyObject:
      type: object
    NucleotideAlignmentsPaginatedList:
      allOf:
      - $ref: '#/components/schemas/Pagination'
      - properties:
          alignments:
            items:
              $ref: '#/components/schemas/NucleotideAlignmentSummary'
            type: array
      type: object
    AlignedNucleotideSequence:
      properties:
        bases:
          example: GTAGCAAAGANTAGTAGCCAGCTGTGATAAATGTCAGCTAAAAGGGGAAGCCATG
          type: string
        dnaSequenceId:
          deprecated: true
          example: seq_MYmsnS1u
          nullable: true
          type: string
        name:
          example: Gene001
          type: string
        pairwiseIdentity:
          description: 'Fraction of bases between trimStart and trimEnd that match the template bases. Only present for Template Alignments; Will be empty for Consensus Alignments.

            '
          example: 0.505
          format: float
          type: number
        sequenceId:
          example: seq_MYmsnS1u
          nullable: true
          type: string
        trimEnd:
          example: 60
          type: integer
        trimStart:
          example: 0
          type: integer
      type: object
    NotFoundError:
      properties:
        error:
          allOf:
          - $ref: '#/components/schemas/BaseError'
          - properties:
              invalidId:
                type: string
              type:
                enum:
                - invalid_request_error
                type: string
      type: object
    AsyncTaskLink:
      properties:
        taskId:
          type: string
      type: object
    BaseError:
      properties:
        message:
          type: string
        type:
          type: string
        userMessage:
          type: string
      type: object
    NucleotideAlignmentFile:
      properties:
        data:
          format: byte
          type: string
        name:
          type: string
      type: object
    Pagination:
      properties:
        nextToken:
          type: string
    NucleotideAlignmentSummary:
      properties:
        apiURL:
          description: The canonical url of the Alignment in the API.
          example: https://benchling.com/api/v2/alignments/seqanl_6ZVdX98t
          format: uri
          type: string
        createdAt:
          description: DateTime the Alignment was created
          format: date-time
          type: string
        id:
          example: seqanl_6ZVdX98t
          type: string
        modifiedAt:
          description: DateTime the Alignment was last modified
          format: date-time
          type: string
        name:
          type: string
        referenceSequenceId:
          description: The ID of the template or consensus Sequence associated with the Alignment
          example: seq_MYmsnS1u
          type: string
        webURL:
          description: The Benchling web UI url to view the Alignment
          format: uri
          type: string
      type: object
    NucleotideAlignment:
      allOf:
      - $ref: '#/components/schemas/NucleotideAlignmentSummary'
      - properties:
          alignedSequences:
            items:
              $ref: '#/components/schemas/AlignedNucleotideSequence'
            type: array
        type: object
      type: object
    NucleotideAlignmentBase:
      properties:
        algorithm:
          enum:
          - mafft
          - clustalo
          type: string
        clustaloOptions:
          description: Options to pass to the ClustalO algorithm, only applicable for ClustalO.
          properties:
            maxGuidetreeIterations:
              default: -1
              description: Max guide tree iterations within combined iterations. Use -1 for no max (all iterations will include guide tree iterations).
              maximum: 5
              minimum: -1
              type: integer
            maxHmmIterations:
              default: -1
              description: Max HMM iterations within combined iterations. Use -1 for no max (all iterations will include HMM iterations).
              maximum: 5
              minimum: -1
              type: integer
            mbedGuideTree:
              default: true
              description: Whether mBed-like clustering guide tree should be used (faster to use it).
              type: boolean
            mbedIteration:
              default: true
              description: Whether mBed-like clustering iteration should be used (faster to use it).
              type: boolean
            numCombinedIterations:
              default: 0
              description: Number of (combined guide-tree/HMM) iterations.
              maximum: 5
              minimum: 0
              type: integer
          type: object
        files:
          items:
            oneOf:
            - properties:
                sequenceId:
                  example: seq_3cxbVcCf
                  type: string
              type: object
            - $ref: '#/components/schemas/NucleotideAlignmentFile'
          type: array
        mafftOptions:
          description: Options to pass to the MAFFT algorithm, only applicable for MAFFT.
          properties:
            adjustDirection:
              default: fast
              description: "Adjust direction:\n * `fast`: Enabled, quickly.\n * `accurate`: Enabled, accurately (slow).\n * `disabled`: Disabled, fastest.\n"
              enum:
              - fast
              - accurate
              - disabled
              type: string
            gapExtensionPenalty:
              default: 0.0
              description: Gap extension penalty.
              type: number
            gapOpenPenalty:
              default: 1.53
              description: Gap open penalty.
              type: number
            maxIterations:
              default: 0
              description: Max refinement iterations. Not applicable for auto strategy, as it will be selected automatically.
              type: integer
            retree:
              default: 2
              description: Tree rebuilding. Only used for 6-mer strategy.
              type: integer
            strategy:
              default: auto
              description: "MAFFT Strategy:\n * `auto`: Pick a strategy automatically based on the count and size of inputs.\n * `sixmer`: Use 6-mer distance for constructing the guide tree.\n * `localpair`: Compute local pairwise alignments using Smith-Waterman for constructing the guide tree and iterative refinement.\n * `globalpair`: Compute global pairwise alignments using Needleman-Wunsch for constructing the guide tree and iterative refinement.\n"
              enum:
              - auto
              - sixmer
              - localpair
              - globalpair
              type: string
          type: object
        name:
          example: my new alignment
          maxLength: 255
          type: string
      required:
      - algorithm
      - files
      type: object
    NucleotideConsensusAlignmentCreate:
      additionalProperties: false
      allOf:
      - $ref: '#/components/schemas/NucleotideAlignmentBase'
      - properties:
          newSequence:
            properties:
              folderId:
                example: lib_qQFY3WQH
                type: string
            type: object
          sequenceId:
            type: string
  securitySchemes:
    basicApiKeyAuth:
      description: Use issued API key for standard access to the API
      scheme: basic
      type: http
    basicClientIdSecretAuth:
      description: Auth used as part of client credentials OAuth flow prior to receiving a bearer token.
      scheme: basic
      type: http
    oAuth:
      description: OAuth2 Client Credentials flow intended for service access
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /api/v2/token
      type: oauth2
externalDocs:
  description: Additional API Documentation
  url: https://docs.benchling.com