% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_pdb.R
\name{pdb_annotations}
\alias{pdb_annotations}
\title{Fetch PDB structural annotations for a UniProt accession}
\usage{
pdb_annotations(
  accession,
  pdb_id = NULL,
  pdbe_graph_url = "https://www.ebi.ac.uk/pdbe/graph-api",
  pdbe_api_url = "https://www.ebi.ac.uk/pdbe/api",
  verbosity = 1L
)
}
\arguments{
\item{accession}{Character scalar: UniProt accession, e.g. \code{"P10636"}.}

\item{pdb_id}{Optional character scalar: Four-character PDB ID (e.g. \code{"2mz7"}). If
\code{NULL}, the top-ranked structure from PDBe is used.}

\item{pdbe_graph_url}{Character scalar: PDBe Graph API base URL.}

\item{pdbe_api_url}{Character scalar: PDBe REST API base URL.}

\item{verbosity}{Integer scalar: Verbosity level.}
}
\value{
Named list with two elements:
\describe{
\item{\code{region}}{Named list of \code{A3Region} objects for secondary structure
(types: \code{"helix"}, \code{"betaStrand"}, \code{"turn"}).}
\item{\code{site}}{Named list of \code{A3Site} objects for ligand binding sites
(type: \code{"bindingSite"}).}
}
}
\description{
Queries the PDBe APIs for secondary structure and ligand binding sites from
experimental PDB structures, converts residue numbers to UniProt canonical
coordinates via SIFTS, and returns named lists of \code{A3Region} and \code{A3Site}
objects ready for use with \code{create_A3()}.
}
\details{
Structure ranking and SIFTS residue mappings come from the PDBe Graph API
\code{best_structures} endpoint. Secondary structure and binding sites are fetched
from the PDBe REST API.

When \code{pdb_id} is \code{NULL} the top-ranked structure (by PDBe coverage score) is
used automatically.
}
\examples{
# Requires internet connection and fetches data from PDBe.
\dontrun{
  ann  <- pdb_annotations("P10636")
  mapt <- create_A3(
    sequence = uniprot_sequence("P10636"),
    region   = ann[["region"]],
    site     = ann[["site"]]
  )
}
}
\author{
EDG
}
