| Title: | Interface to the Biological Magnetic Resonance Data Bank ('BMRB') |
|---|---|
| Description: | A comprehensive interface to the Biological Magnetic Resonance Data Bank ('BMRB') <https://bmrb.io>, mirroring all functionality of the 'PyBMRB' 'Python' package (v3.0). Provides four modules: (1) 'ChemicalShift' for fetching per-entry chemical shift data from the 'BMRB' 'REST' 'API' or local 'NMR-STAR' files; (2) 'ChemicalShiftStatistics' for database-wide statistical queries; (3) Spectra for simulating '1H-15N' 'HSQC', '1H-13C' 'HSQC', '1H-1H' 'TOCSY', and generic 2D 'NMR' spectra as interactive plots; and (4) Histogram for chemical shift distribution visualizations with optional filtering by pH, temperature, and ambiguity code. All interactive plots are rendered via 'plotly'. Uses the 'BMRB' REST API v2 <https://api.bmrb.io/v2/>. |
| Authors: | Kumaran Baskaran [aut, cre] (ORCID: <https://orcid.org/0000-0002-0418-0286>) |
| Maintainer: | Kumaran Baskaran <baskaran@uchc.edu> |
| License: | GPL-3 |
| Version: | 3.0.0 |
| Built: | 2026-10-14 18:55:48 UTC |
| Source: | https://github.com/cran/RBMRB |
Get the citation for a BMRB entry
bmrb_citation(bmrb_id, format = "bibtex")bmrb_citation(bmrb_id, format = "bibtex")
bmrb_id |
A single BMRB entry ID. |
format |
Output format: |
A character string containing the citation.
## Not run: cat(bmrb_citation(15060, format = "text")) ## End(Not run)## Not run: cat(bmrb_citation(15060, format = "text")) ## End(Not run)
Fetches a BMRB entry using both the zlib-compressed and plain JSON
endpoints and reports what is found at each step. Run this when
cs_from_bmrb returns no data.
bmrb_debug_entry(bmrb_id)bmrb_debug_entry(bmrb_id)
bmrb_id |
A single BMRB entry ID (integer or character). |
Invisibly, the parsed entry JSON list, or NULL on failure.
## Not run: bmrb_debug_entry(15060) ## End(Not run)## Not run: bmrb_debug_entry(15060) ## End(Not run)
Fetch raw metadata for a BMRB entry
bmrb_fetch_entry(bmrb_ids)bmrb_fetch_entry(bmrb_ids)
bmrb_ids |
A single BMRB entry ID or a character/integer vector. |
A named list of raw entry metadata (API JSON as R list).
## Not run: meta <- bmrb_fetch_entry(15060) names(meta[["15060"]]) ## End(Not run)## Not run: meta <- bmrb_fetch_entry(15060) names(meta[["15060"]]) ## End(Not run)
Get BMRB IDs associated with a PDB entry
bmrb_from_pdb(pdb_id)bmrb_from_pdb(pdb_id)
pdb_id |
A PDB ID string (e.g. |
A data.frame with columns bmrb_id, match_type,
and comment.
## Not run: bmrb_from_pdb("2JM0") ## End(Not run)## Not run: bmrb_from_pdb("2JM0") ## End(Not run)
Returns all public entry IDs in the specified BMRB database.
bmrb_list_entries(database = "macromolecules")bmrb_list_entries(database = "macromolecules")
database |
One of |
A character vector of BMRB entry IDs.
## Not run: ids <- bmrb_list_entries() length(ids) ## End(Not run)## Not run: ids <- bmrb_list_entries() length(ids) ## End(Not run)
Get PDB IDs associated with a BMRB entry
bmrb_pdb_ids(bmrb_id)bmrb_pdb_ids(bmrb_id)
bmrb_id |
A single BMRB entry ID. |
A data.frame with columns pdb_id, match_type,
and comment.
## Not run: bmrb_pdb_ids(15000) ## End(Not run)## Not run: bmrb_pdb_ids(15000) ## End(Not run)
Searches BMRB by title, author name, organism, amino-acid sequence, InChI string, or other terms.
bmrb_search(term, database = "combined")bmrb_search(term, database = "combined")
term |
A search string. |
database |
One of |
A data.frame with columns value, label,
sub_date, authors, and link.
## Not run: bmrb_search("ubiquitin human") bmrb_search("GB3", database = "macromolecules") ## End(Not run)## Not run: bmrb_search("ubiquitin human") bmrb_search("GB3", database = "macromolecules") ## End(Not run)
Returns current server information including entry counts and database last-update timestamps from the BMRB REST API.
bmrb_status()bmrb_status()
A list with server status information.
## Not run: bmrb_status() ## End(Not run)## Not run: bmrb_status() ## End(Not run)
Performs three checks: BMRB API status, entry fetch and parse for entry
15060, and the chemical shift search endpoint. Useful for verifying
that the BMRB API is reachable from your network. Progress is reported
with message(), so it can be silenced with
suppressMessages().
bmrb_test()bmrb_test()
A named logical vector with elements api_status,
entry_fetch, and search_query (invisibly).
## Not run: bmrb_test() ## End(Not run)## Not run: bmrb_test() ## End(Not run)
Uploads a local NMR-STAR file to the BMRB server. The entry is stored for 7 days. The returned token can be used as a BMRB ID in all other package functions.
bmrb_upload_entry(file_path)bmrb_upload_entry(file_path)
file_path |
Path to a local NMR-STAR |
A character string token usable as a BMRB ID (invisibly).
## Not run: token <- bmrb_upload_entry("my_protein.str") n15hsqc(bmrb_ids = token) ## End(Not run)## Not run: token <- bmrb_upload_entry("my_protein.str") n15hsqc(bmrb_ids = token) ## End(Not run)
Equivalent to 'pybmrb.Spectra.c13hsqc()'. See [n15hsqc()] for parameter descriptions.
c13hsqc( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, legend = NULL, draw_trace = FALSE, peak_list = NULL, output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )c13hsqc( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, legend = NULL, draw_trace = FALSE, peak_list = NULL, output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )
bmrb_ids |
BMRB entry ID(s) – integer, character, or vector. |
input_file_names |
Path(s) to local NMR-STAR '.str' files. |
auth_tag |
Use 'Auth_seq_ID' for sequence numbering. |
legend |
'NULL' (default), '"residue"', or '"dataset"'. |
draw_trace |
Draw lines connecting same-residue peaks across datasets. |
peak_list |
Path to a 2-column CSV file of unassigned peaks ('H_ppm', 'N_ppm') to overlay. |
output_format |
'"html"' (default), '"png"', '"jpg"', '"pdf"', '"svg"', or '"webp"'. |
output_file |
File path to save the visualization (optional). |
output_image_width, output_image_height
|
Image dimensions in pixels. |
show_visualization |
Open in browser / display inline. Default 'TRUE'. |
Invisibly, a list with the simulated peak list.
## Not run: c13hsqc(bmrb_ids = 15060, legend = "residue") ## End(Not run)## Not run: c13hsqc(bmrb_ids = 15060, legend = "residue") ## End(Not run)
Shows the CS distribution of 'atom' in 'residue' before and after filtering by known chemical shifts of other atoms in the same residue. Mirrors 'pybmrb.Histogram.conditional_hist()'.
conditional_cs_hist( residue, atom, filtering_rules, ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, h_tolerance = 0.1, c_tolerance = 2, n_tolerance = 2, standard_amino_acids = TRUE, histnorm = NULL, plot_type = "histogram", output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )conditional_cs_hist( residue, atom, filtering_rules, ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, h_tolerance = 0.1, c_tolerance = 2, n_tolerance = 2, standard_amino_acids = TRUE, histnorm = NULL, plot_type = "histogram", output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )
residue |
Residue name. |
atom |
Atom whose distribution to plot. |
filtering_rules |
Named list of atom = value pairs used to filter, e.g. 'list(CA = 64.5, H = 7.8)'. |
ph_min, ph_max, t_min, t_max
|
Condition filters. |
h_tolerance |
Tolerance (ppm) for H filters. Default 0.1. |
c_tolerance |
Tolerance (ppm) for C filters. Default 2.0. |
n_tolerance |
Tolerance (ppm) for N filters. Default 2.0. |
standard_amino_acids |
Restrict to standard amino acids. Default TRUE. |
histnorm |
Normalisation (see [cs_hist()]). |
plot_type |
"histogram" (default), "box", or "violin". |
output_format, output_file, output_image_width, output_image_height, show_visualization
|
See [cs_hist()]. |
Invisibly, a list with 'all_values', 'filtered_values', 'labels'.
## Not run: conditional_cs_hist("SER", "N", filtering_rules = list(CA = 55.5, HA = 4.3)) ## End(Not run)## Not run: conditional_cs_hist("SER", "N", filtering_rules = list(CA = 55.5, HA = 4.3)) ## End(Not run)
Equivalent to 'pybmrb.Spectra.create_2d_peaklist()'.
create_2d_peaklist( atom_x, atom_y, bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, draw_trace = FALSE, include_preceding = FALSE, include_next = FALSE )create_2d_peaklist( atom_x, atom_y, bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, draw_trace = FALSE, include_preceding = FALSE, include_next = FALSE )
atom_x |
Atom name for the X axis. |
atom_y |
Atom name for the Y axis. |
bmrb_ids |
BMRB entry ID(s) – integer, character, or vector. |
input_file_names |
Path(s) to local NMR-STAR '.str' files. |
auth_tag |
Use 'Auth_seq_ID' for sequence numbering. |
draw_trace |
Draw lines connecting same-residue peaks across datasets. |
include_preceding |
Include preceding (i-1) residue Y-axis peaks. |
include_next |
Include following (i+1) residue Y-axis peaks. |
Same structure as [create_n15hsqc_peaklist()].
Equivalent to 'pybmrb.Spectra.create_c13hsqc_peaklist()'.
create_c13hsqc_peaklist( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, draw_trace = FALSE )create_c13hsqc_peaklist( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, draw_trace = FALSE )
bmrb_ids |
BMRB entry ID(s) – integer, character, or vector. |
input_file_names |
Path(s) to local NMR-STAR '.str' files. |
auth_tag |
Use 'Auth_seq_ID' for sequence numbering. |
draw_trace |
Draw lines connecting same-residue peaks across datasets. |
Same structure as [create_n15hsqc_peaklist()].
Extracts backbone amide (and optionally sidechain NH) chemical shifts from BMRB entries / NMR-STAR files and returns the 2D peak coordinates. Equivalent to 'pybmrb.Spectra.create_n15hsqc_peaklist()'.
create_n15hsqc_peaklist( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, draw_trace = FALSE, include_sidechain = TRUE )create_n15hsqc_peaklist( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, draw_trace = FALSE, include_sidechain = TRUE )
bmrb_ids |
BMRB entry ID(s) – integer, character, or vector. |
input_file_names |
Path(s) to local NMR-STAR '.str' files. |
auth_tag |
Use 'Auth_seq_ID' for sequence numbering. |
draw_trace |
Draw lines connecting same-residue peaks across datasets. |
include_sidechain |
Include sidechain NH2 peaks (ASN/GLN/ARG/TRP/HIS). |
A list with elements: 'x' (H ppm), 'y' (N ppm), 'dataset', 'residue', 'info', 'seq_id', 'cs_track' (if 'draw_trace = TRUE').
Pairs all protons within each residue (full spin-system). Both diagonal and off-diagonal peaks are included. Equivalent to 'pybmrb.Spectra.create_tocsy_peaklist()'.
create_tocsy_peaklist( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, draw_trace = FALSE )create_tocsy_peaklist( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, draw_trace = FALSE )
bmrb_ids |
BMRB entry ID(s) – integer, character, or vector. |
input_file_names |
Path(s) to local NMR-STAR '.str' files. |
auth_tag |
Use 'Auth_seq_ID' for sequence numbering. |
draw_trace |
Draw lines connecting same-residue peaks across datasets. |
Same structure as [create_n15hsqc_peaklist()].
Fetches assigned chemical shift data for one or more BMRB entries. Uses the same zlib-compressed JSON endpoint as PyBMRB / pynmrstar. Mirrors 'pybmrb.ChemicalShift.from_bmrb()'.
cs_from_bmrb(bmrb_ids, auth_tag = FALSE)cs_from_bmrb(bmrb_ids, auth_tag = FALSE)
bmrb_ids |
A single BMRB entry ID or a vector of IDs. |
auth_tag |
Logical. Use 'Auth_seq_ID' for sequence numbering. Default FALSE. |
A nested named list: 'list(dataset_id = list(chain = list(seq_id = list(atom = cs_value), seq_ids = integer_vector)))'.
## Not run: cs <- cs_from_bmrb(15060) cs_peek(cs) cs_from_bmrb(c(17076, 17077)) ## End(Not run)## Not run: cs <- cs_from_bmrb(15060) cs_peek(cs) cs_from_bmrb(c(17076, 17077)) ## End(Not run)
Mirrors 'pybmrb.ChemicalShift.from_file()'.
cs_from_file(file_paths, auth_tag = FALSE, data_set_ids = NULL)cs_from_file(file_paths, auth_tag = FALSE, data_set_ids = NULL)
file_paths |
Character vector of NMR-STAR file paths. |
auth_tag |
Logical. Use 'Auth_seq_ID'. Default FALSE. |
data_set_ids |
Optional character vector of dataset labels. |
Same nested-list structure as [cs_from_bmrb()].
## Not run: cs <- cs_from_file("my_protein.str") ## End(Not run)## Not run: cs <- cs_from_file("my_protein.str") ## End(Not run)
Fetches database-wide chemical shift data and renders an interactive distribution plot. Mirrors 'pybmrb.Histogram.hist()'.
cs_hist( residue = NULL, atom = NULL, list_of_atoms = NULL, filtered = TRUE, sd_limit = 10, ambiguity = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, standard_amino_acids = TRUE, histnorm = NULL, plot_type = "histogram", output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )cs_hist( residue = NULL, atom = NULL, list_of_atoms = NULL, filtered = TRUE, sd_limit = 10, ambiguity = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, standard_amino_acids = TRUE, histnorm = NULL, plot_type = "histogram", output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )
residue |
Residue name (IUPAC 3-letter). Use "*" for any. |
atom |
Atom name (e.g. "CA", "HB*", "*"). |
list_of_atoms |
Optional character vector of "RES-ATOM" pairs (e.g. 'c("ALA-CB","CYS-N")'). Overrides residue/atom when supplied. |
filtered |
Remove outliers. Default TRUE. |
sd_limit |
SD factor for outlier removal. Default 10. |
ambiguity |
Ambiguity code filter ("*" = no filter). |
ph_min, ph_max
|
pH range filter. |
t_min, t_max
|
Temperature range filter (Kelvin). |
standard_amino_acids |
Restrict to standard amino acids. Default TRUE. |
histnorm |
NULL (count), "percent", "probability", or "probability density". |
plot_type |
"histogram" (default), "box", or "violin". |
output_format |
"html" (default), "png", "jpg", "pdf", "svg", "webp". |
output_file |
File path to save the plot (optional). |
output_image_width, output_image_height
|
Image size in pixels. |
show_visualization |
Display the figure. Default TRUE. |
Invisibly, a list with elements 'values' and 'labels'.
## Not run: cs_hist("ALA", "CA") cs_hist(list_of_atoms = c("ALA-CB","GLY-CA","SER-CB")) cs_hist("ALA", "CA", histnorm = "probability density", plot_type = "violin") ## End(Not run)## Not run: cs_hist("ALA", "CA") cs_hist(list_of_atoms = c("ALA-CB","GLY-CA","SER-CB")) cs_hist("ALA", "CA", histnorm = "probability density", plot_type = "violin") ## End(Not run)
Mirrors 'pybmrb.Histogram.hist2d()'.
cs_hist2d( residue, atom1, atom2, filtered = TRUE, sd_limit = 10, ambiguity1 = "*", ambiguity2 = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, histnorm = NULL, plot_type = "heatmap", output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )cs_hist2d( residue, atom1, atom2, filtered = TRUE, sd_limit = 10, ambiguity1 = "*", ambiguity2 = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, histnorm = NULL, plot_type = "heatmap", output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )
residue |
Residue name. |
atom1 |
First atom (X axis). |
atom2 |
Second atom (Y axis). |
filtered, sd_limit
|
See [cs_hist()]. |
ambiguity1, ambiguity2
|
Per-atom ambiguity filters. |
ph_min, ph_max, t_min, t_max
|
Condition filters. |
histnorm |
Normalisation (see [cs_hist()]). |
plot_type |
"heatmap" (default) or "contour". |
output_format, output_file, output_image_width, output_image_height, show_visualization
|
See [cs_hist()]. |
Invisibly, a list with elements 'atom1' and 'atom2'.
## Not run: cs_hist2d("CYS", "CB", "N") cs_hist2d("ALA", "CA", "CB", plot_type = "contour") ## End(Not run)## Not run: cs_hist2d("CYS", "CB", "N") cs_hist2d("ALA", "CA", "CB", plot_type = "contour") ## End(Not run)
Reports the first few residues of each chain with message(), so the
output can be silenced with suppressMessages().
cs_peek(cs_data, n_res = 5L)cs_peek(cs_data, n_res = 5L)
cs_data |
Output of [cs_from_bmrb()] or [cs_from_file()]. |
n_res |
Number of residues to show per chain. |
cs_data, invisibly.
## Not run: cs <- cs_from_bmrb(15060); cs_peek(cs)## Not run: cs <- cs_from_bmrb(15060); cs_peek(cs)
Compute summary statistics for a set of chemical shifts
cs_stats(x)cs_stats(x)
x |
Numeric vector of chemical shift values. |
A named numeric vector: n, mean, sd, median, min, max.
cs_stats(c(55.1, 55.3, 56.0, 54.8))cs_stats(c(55.1, 55.3, 56.0, 54.8))
Builds a tidy summary of datasets, chains, and atom coverage. The summary is returned rather than printed, so it prints automatically at the console and can also be assigned and reused.
cs_summary(cs_data)cs_summary(cs_data)
cs_data |
Nested list from [cs_from_bmrb()] or [cs_from_file()]. |
A data.frame with one row per dataset and chain.
## Not run: cs <- cs_from_bmrb(15060); cs_summary(cs)## Not run: cs <- cs_from_bmrb(15060); cs_summary(cs)
Get a flat data.frame of chemical shifts for one or more BMRB entries
cs_table(bmrb_ids, auth_tag = FALSE)cs_table(bmrb_ids, auth_tag = FALSE)
bmrb_ids |
A single BMRB entry ID or a vector of IDs. |
auth_tag |
Logical. Use 'Auth_seq_ID' for sequence numbering. Default FALSE. |
A data.frame suitable for use with ggplot2 or dplyr.
## Not run: df <- cs_table(c(15060, 17076))## Not run: df <- cs_table(c(15060, 17076))
Convert a nested CS list to a tidy data.frame
cs_to_df(cs_data)cs_to_df(cs_data)
cs_data |
Nested list from [cs_from_bmrb()] or [cs_from_file()]. |
A data.frame with columns Dataset, Chain, Seq_ID, Atom_ID, Val.
## Not run: cs <- cs_from_bmrb(15060); df <- cs_to_df(cs)## Not run: cs <- cs_from_bmrb(15060); df <- cs_to_df(cs)
Converts the output of any 'create_*_peaklist()' function to a file or a data.frame. Equivalent to 'pybmrb.Spectra.export_peak_list()'.
export_peak_list( peak_list, output_file_name = NULL, output_format = "csv", include_side_chain = TRUE )export_peak_list( peak_list, output_file_name = NULL, output_format = "csv", include_side_chain = TRUE )
peak_list |
List returned by any 'create_*_peaklist()' function. |
output_file_name |
Path to write the output file. 'NULL' returns only the data.frame without writing to disk. |
output_format |
'"csv"' (default) or '"sparky"'. |
include_side_chain |
Include sidechain peaks. Default 'TRUE'. |
Invisibly, a data.frame with the exported peak list.
## Not run: pl <- create_n15hsqc_peaklist(bmrb_ids = 15060) export_peak_list(pl, "peaks.csv", output_format = "csv") export_peak_list(pl, "peaks.sparky", output_format = "sparky") ## End(Not run)## Not run: pl <- create_n15hsqc_peaklist(bmrb_ids = 15060) export_peak_list(pl, "peaks.csv", output_format = "csv") export_peak_list(pl, "peaks.sparky", output_format = "sparky") ## End(Not run)
Remove outliers from a numeric vector
filter_cs_outliers(x, sd_limit = 10)filter_cs_outliers(x, sd_limit = 10)
x |
Numeric vector. |
sd_limit |
Number of standard deviations beyond which to remove. |
Numeric vector with outliers removed.
filter_cs_outliers(c(52, 55, 56, 54, 300), sd_limit = 2)filter_cs_outliers(c(52, 55, 56, 54, 300), sd_limit = 2)
Generates a 2D spectrum for any two atom types. Supports sequence-walk tracing, preceding/next-residue peaks, and all the same overlay options as the other spectrum functions. Equivalent to 'pybmrb.Spectra.generic_2d()'.
generic_2d( atom_x, atom_y, bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, legend = NULL, draw_trace = FALSE, peak_list = NULL, include_preceding = FALSE, include_next = FALSE, seq_walk = FALSE, full_walk = FALSE, output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )generic_2d( atom_x, atom_y, bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, legend = NULL, draw_trace = FALSE, peak_list = NULL, include_preceding = FALSE, include_next = FALSE, seq_walk = FALSE, full_walk = FALSE, output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )
atom_x |
Atom name for the X axis (IUPAC, e.g. '"N"', '"CA"'). |
atom_y |
Atom name for the Y axis. |
bmrb_ids |
BMRB entry ID(s) – integer, character, or vector. |
input_file_names |
Path(s) to local NMR-STAR '.str' files. |
auth_tag |
Use 'Auth_seq_ID' for sequence numbering. |
legend |
'NULL' (default), '"residue"', or '"dataset"'. |
draw_trace |
Draw lines connecting same-residue peaks across datasets. |
peak_list |
Path to a 2-column CSV file of unassigned peaks ('H_ppm', 'N_ppm') to overlay. |
include_preceding |
Include chemical shifts from the preceding (i-1) residue on the Y axis. Default 'FALSE'. |
include_next |
Include chemical shifts from the following (i+1) residue on the Y axis. Default 'FALSE'. |
seq_walk |
Draw a trace connecting sequential i->i+/-1 pairs for continuous sequence segments. Default 'FALSE'. |
full_walk |
Like 'seq_walk' but ignores missing residues. Default 'FALSE'. |
output_format |
'"html"' (default), '"png"', '"jpg"', '"pdf"', '"svg"', or '"webp"'. |
output_file |
File path to save the visualization (optional). |
output_image_width, output_image_height
|
Image dimensions in pixels. |
show_visualization |
Open in browser / display inline. Default 'TRUE'. |
Invisibly, the peak list.
## Not run: generic_2d("N", "CA", bmrb_ids = 15000, legend = "residue") generic_2d("N", "CA", bmrb_ids = 15000, include_next = TRUE, seq_walk = TRUE) ## End(Not run)## Not run: generic_2d("N", "CA", bmrb_ids = 15000, legend = "residue") generic_2d("N", "CA", bmrb_ids = 15000, include_next = TRUE, seq_walk = TRUE) ## End(Not run)
Mirrors 'pybmrb.ChemicalShiftStatistics.get_2d_chemical_shifts()'.
get_2d_cs_data( residue, atom1, atom2, filtered = TRUE, sd_limit = 10, ambiguity1 = "*", ambiguity2 = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL )get_2d_cs_data( residue, atom1, atom2, filtered = TRUE, sd_limit = 10, ambiguity1 = "*", ambiguity2 = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL )
residue |
Residue name (IUPAC 3-letter). |
atom1 |
First atom (X axis). |
atom2 |
Second atom (Y axis). |
filtered, sd_limit
|
See [get_cs_data()]. |
ambiguity1, ambiguity2
|
Per-atom ambiguity filters. |
ph_min, ph_max, t_min, t_max
|
Condition filters. |
Named list with 'atom1' and 'atom2' numeric vectors.
## Not run: paired <- get_2d_cs_data("ALA", "CA", "CB")## Not run: paired <- get_2d_cs_data("ALA", "CA", "CB")
Downloads chemical shifts for the given residue and atom combination from the BMRB database. Mirrors 'pybmrb.ChemicalShiftStatistics.get_data()'.
get_cs_data( residue = "*", atom = "*", filtered = TRUE, sd_limit = 10, ambiguity = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, standard_amino_acids = TRUE, database = "macromolecules" )get_cs_data( residue = "*", atom = "*", filtered = TRUE, sd_limit = 10, ambiguity = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, standard_amino_acids = TRUE, database = "macromolecules" )
residue |
Residue in IUPAC 3-letter format (e.g. "ALA"). "*" = any. |
atom |
Atom name (e.g. "CA", "HB*"). "*" = any. |
filtered |
Remove outliers beyond sd_limit * SD. Default TRUE. |
sd_limit |
SD factor for outlier removal. Default 10. |
ambiguity |
Ambiguity code filter ("*" = no filter; 1 = unambiguous). |
ph_min, ph_max
|
pH range filter (optional). |
t_min, t_max
|
Temperature range in Kelvin (optional). |
standard_amino_acids |
Restrict to standard amino acids. Default TRUE. |
database |
"macromolecules" (default) or "metabolomics". |
A data.frame with columns Val, Comp_ID, Atom_ID, Ambiguity_code, Entry_ID, Comp_index_ID, pH, Temperature_K and others.
## Not run: df <- get_cs_data("ALA", "CA") df <- get_cs_data("*", "HB*") ## End(Not run)## Not run: df <- get_cs_data("ALA", "CA") df <- get_cs_data("*", "HB*") ## End(Not run)
Mirrors 'pybmrb.ChemicalShiftStatistics.get_data_from_bmrb()'.
get_cs_from_bmrb_db( residue = "*", atom = "*", list_of_atoms = NULL, ambiguity = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, standard_amino_acids = TRUE, database = "macromolecules" )get_cs_from_bmrb_db( residue = "*", atom = "*", list_of_atoms = NULL, ambiguity = "*", ph_min = NULL, ph_max = NULL, t_min = NULL, t_max = NULL, standard_amino_acids = TRUE, database = "macromolecules" )
residue |
Residue in IUPAC 3-letter format (e.g. "ALA"). "*" = any. |
atom |
Atom name (e.g. "CA", "HB*"). "*" = any. |
list_of_atoms |
Optional "RES-ATOM" vector, e.g. 'c("ALA-CB","GLY-CA")'. |
ambiguity |
Ambiguity code filter ("*" = no filter; 1 = unambiguous). |
ph_min, ph_max
|
pH range filter (optional). |
t_min, t_max
|
Temperature range in Kelvin (optional). |
standard_amino_acids |
Restrict to standard amino acids. Default TRUE. |
database |
"macromolecules" (default) or "metabolomics". |
A data.frame of raw chemical shift records.
## Not run: df <- get_cs_from_bmrb_db("ALA", "CB") df2 <- get_cs_from_bmrb_db(list_of_atoms = c("ALA-CB","GLY-CA")) ## End(Not run)## Not run: df <- get_cs_from_bmrb_db("ALA", "CB") df2 <- get_cs_from_bmrb_db(list_of_atoms = c("ALA-CB","GLY-CA")) ## End(Not run)
Plots an interactive 1H-15N HSQC spectrum for one or more BMRB entries and/or NMR-STAR files. Overlay multiple datasets as scatter plots; optionally draw trace lines connecting peaks from the same residue position across datasets. Equivalent to 'pybmrb.Spectra.n15hsqc()'.
n15hsqc( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, legend = NULL, draw_trace = FALSE, include_sidechain = TRUE, peak_list = NULL, output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )n15hsqc( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, legend = NULL, draw_trace = FALSE, include_sidechain = TRUE, peak_list = NULL, output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )
bmrb_ids |
BMRB entry ID(s) – integer, character, or vector. |
input_file_names |
Path(s) to local NMR-STAR '.str' files. |
auth_tag |
Use 'Auth_seq_ID' for sequence numbering. |
legend |
'NULL' (default), '"residue"', or '"dataset"'. |
draw_trace |
Draw lines connecting same-residue peaks across datasets. |
include_sidechain |
Include sidechain NH2 peaks (ASN/GLN/ARG/TRP/HIS). |
peak_list |
Path to a 2-column CSV file of unassigned peaks ('H_ppm', 'N_ppm') to overlay. |
output_format |
'"html"' (default), '"png"', '"jpg"', '"pdf"', '"svg"', or '"webp"'. |
output_file |
File path to save the visualization (optional). |
output_image_width, output_image_height
|
Image dimensions in pixels. |
show_visualization |
Open in browser / display inline. Default 'TRUE'. |
Invisibly, a list with elements 'x' (H ppm), 'y' (N ppm), 'dataset', 'residue', 'info', and (when 'draw_trace = TRUE') 'cs_track'.
## Not run: # Single entry n15hsqc(bmrb_ids = 15060, legend = "residue") # Compare two entries with trace lines n15hsqc(bmrb_ids = c(17076, 17077), legend = "dataset", draw_trace = TRUE) # Overlay user's own NMR-STAR file with BMRB entry n15hsqc(bmrb_ids = 15060, input_file_names = "MyData.str", legend = "dataset") ## End(Not run)## Not run: # Single entry n15hsqc(bmrb_ids = 15060, legend = "residue") # Compare two entries with trace lines n15hsqc(bmrb_ids = c(17076, 17077), legend = "dataset", draw_trace = TRUE) # Overlay user's own NMR-STAR file with BMRB entry n15hsqc(bmrb_ids = 15060, input_file_names = "MyData.str", legend = "dataset") ## End(Not run)
Returns the version of the installed RBMRB package as a string.
RBMRB_version()RBMRB_version()
A character string with the package version.
RBMRB_version()RBMRB_version()
List the 20 standard amino acid codes
standard_amino_acids()standard_amino_acids()
Character vector of 3-letter amino acid codes.
standard_amino_acids()standard_amino_acids()
List standard nucleic acid residue codes
standard_nucleic_acids()standard_nucleic_acids()
Character vector of RNA and DNA residue codes.
standard_nucleic_acids()standard_nucleic_acids()
Equivalent to 'pybmrb.Spectra.tocsy()'. See [n15hsqc()] for shared parameter descriptions.
tocsy( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, legend = NULL, draw_trace = FALSE, peak_list = NULL, output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )tocsy( bmrb_ids = NULL, input_file_names = NULL, auth_tag = FALSE, legend = NULL, draw_trace = FALSE, peak_list = NULL, output_format = "html", output_file = NULL, output_image_width = 800, output_image_height = 600, show_visualization = TRUE )
bmrb_ids |
BMRB entry ID(s) – integer, character, or vector. |
input_file_names |
Path(s) to local NMR-STAR '.str' files. |
auth_tag |
Use 'Auth_seq_ID' for sequence numbering. |
legend |
'NULL' (default), '"residue"', or '"dataset"'. |
draw_trace |
Draw lines connecting same-residue peaks across datasets. |
peak_list |
Path to a 2-column CSV file of unassigned peaks ('H_ppm', 'N_ppm') to overlay. |
output_format |
'"html"' (default), '"png"', '"jpg"', '"pdf"', '"svg"', or '"webp"'. |
output_file |
File path to save the visualization (optional). |
output_image_width, output_image_height
|
Image dimensions in pixels. |
show_visualization |
Open in browser / display inline. Default 'TRUE'. |
Invisibly, a list with the simulated peak list.
## Not run: tocsy(bmrb_ids = 15060, legend = "residue") tocsy(bmrb_ids = c(17074, 17076, 17077), legend = "dataset", draw_trace = TRUE) ## End(Not run)## Not run: tocsy(bmrb_ids = 15060, legend = "residue") tocsy(bmrb_ids = c(17074, 17076, 17077), legend = "dataset", draw_trace = TRUE) ## End(Not run)