uniprot_to_A3: Fetch a UniProt entry and parse it into an A3 object

View source: R/utils_uniprot.R

uniprot_to_A3R Documentation

Fetch a UniProt entry and parse it into an A3 object

Description

Fetches the UniProt JSON for the given accession via the UniProt REST API, maps all sequence annotations to the A3 schema (see specs/uniprot.md), and returns a fully populated A3 object.

Usage

uniprot_to_A3(
  accession,
  base_url = "https://rest.uniprot.org/uniprotkb",
  verbosity = 1L
)

Arguments

accession

Character scalar: UniProt accession, e.g. "P10636".

base_url

Character scalar: UniProt REST API base URL.

verbosity

Integer scalar: Verbosity level.

Details

Feature types not mapped to A3 (mutagenesis, alternative sequences, sequence conflicts, etc.) are silently ignored.

Value

A3 object with sequence, annotations, and UniProt metadata.

Author(s)

EDG

Examples

# Requires internet connection and fetches data from UniProt.
## Not run: 
mapt <- uniprot_to_A3("P10636")

## End(Not run)

rtemis.a3 documentation built on April 29, 2026, 1:06 a.m.