RBMRB provides a comprehensive R interface to the Biological Magnetic Resonance Data Bank (BMRB), mirroring all functionality of the PyBMRB 3.0 Python package.
Four main modules are available:
| Module | Key functions |
|---|---|
| ChemicalShift | cs_from_bmrb(), cs_from_file() |
| ChemicalShiftStatistics | get_cs_data(), get_2d_cs_data() |
| Spectra | n15hsqc(), c13hsqc(),
tocsy(), generic_2d() |
| Histogram | cs_hist(), cs_hist2d(),
conditional_cs_hist() |
All spectrum functions return interactive Plotly plots that open in your browser.
# 1H-15N HSQC coloured by residue type
n15hsqc(bmrb_ids = 15060, legend = "residue")
# Overlay two entries with shift-tracking lines
n15hsqc(bmrb_ids = c(17076, 17077),
legend = "dataset",
draw_trace = TRUE)
# 1H-13C HSQC
c13hsqc(bmrb_ids = 15060, legend = "residue")
# 1H-1H TOCSY
tocsy(bmrb_ids = 15060)
# Generic 2D: N vs CA with sequence walk
generic_2d("N", "CA", bmrb_ids = 15060, seq_walk = TRUE)# 1D histogram for ALA CA
cs_hist("ALA", "CA")
# Compare multiple residue-atom pairs
cs_hist(list_of_atoms = c("ALA-CA", "GLY-CA", "SER-CA"))
# 2D correlation heatmap
cs_hist2d("ALA", "CA", "CB")
# Conditional distribution: N shifts of SER given CA ~ 55.5 ppm
conditional_cs_hist("SER", "N",
filtering_rules = list(CA = 55.5),
c_tolerance = 2.0)# All CA shifts for alanine (returns data.frame)
df <- get_cs_data("ALA", "CA")
summary(df$Val)
# Filter by pH and temperature
df_filtered <- get_cs_data("ALA", "CA",
ph_min = 6.5, ph_max = 7.5,
t_min = 293, t_max = 303)
# Paired CA-CB shifts (for scatter plots)
paired <- get_2d_cs_data("ALA", "CA", "CB")
plot(paired$atom1, paired$atom2,
xlab = "CA (ppm)", ylab = "CB (ppm)")