Skip to contents

Pure.

Usage

alphafold_parse_model(body, accession = NA_character_)

Arguments

body

A parsed AlphaFold prediction response.

accession

The UniProt accession that was queried.

Value

A one-row tibble of accession, pdb_url, cif_url, version, mean_plddt, and source_url. NULL when there is no model.

The one-element array

The API returns a JSON array of model records, not an object, even for a single accession. Reading it as an object yields NULL for every field while looking like a successful parse. This handles either shape.

References

Varadi et al. (2024). AlphaFold Protein Structure Database in 2024: providing structure coverage for over 214 million protein sequences. Nucleic Acids Research 52(D1), D368-D375. doi:10.1093/nar/gkad1011

Service documentation: https://alphafold.ebi.ac.uk/

Examples

body <- list(list(
  pdbUrl = "https://alphafold.ebi.ac.uk/files/AF-P15056-F1-model_v6.pdb",
  latestVersion = 6, globalMetricValue = 66.38
))
alphafold_parse_model(body, "P15056")
#> # A tibble: 1 × 6
#>   accession pdb_url                        cif_url version mean_plddt source_url
#>   <chr>     <chr>                          <chr>     <dbl>      <dbl> <chr>     
#> 1 P15056    https://alphafold.ebi.ac.uk/f… NA            6       66.4 https://a…