knitr::opts_chunk$set(echo = TRUE)
library(AlphaFoldQuery)
library(ggplot2)
url <- "https://alphafold.ebi.ac.uk/files/AF-O15552-F1-predicted_aligned_error_v1.json"
PAE <- readPAE(url)
PAE

Including Plots

df_format <- as(PAE, "data.frame")

ggplot(df_format) +
    geom_tile(aes(x = residue2, y = residue1, fill = distance)) +
    coord_fixed() +
    scale_x_continuous(expand = expansion(mult = 0)) +
    scale_y_reverse(expand = expansion(mult = 0)) +
    scale_fill_continuous(type = "viridis", guide = "colourbar") +
    labs(x = "Scored Residue",
         y = "Aligned Residue",
         fill = "Expected Position Error (Ångströms)") +
    theme_bw() +
    theme(legend.position = "bottom") +
    guides(fill = guide_colourbar(title.position="top",barwidth = 12))


grimbough/AlphaFoldQuery documentation built on Dec. 20, 2021, 1:42 p.m.