API
NMRExampleData — Module
Example NMR datasets for NMRTools.jl, NMRAnalysis.jl and NMRScreen.jl, each downloaded the first time it is used.
Each dataset is a folder in datasets/ with a dataset.toml describing it. The registered package holds no datasets, only Datasets.toml, an index of their dataset.toml files.
NMRExampleData.examples — Function
examples()
examples(format)Return the names of the example datasets, sorted. Given a format such as :ucsf, return only the datasets with data in that format. See FORMATS.
Examples
julia> examples(:nmrpipe)
2-element Vector{String}:
"2d_hn_ubq"
"diffusion1d_asyn"NMRExampleData.exampleinfo — Function
exampleinfo(name)Return a description of the dataset name from its dataset.toml, without downloading it.
The result is a NamedTuple with the fields name (the full name), title, path, formats, description, credit, citation, licence, source, aliases and added. formats gives the path of each format in the dataset, the default first, such as (bruker = "2D_HN", nmrpipe = "2D_HN/test.ft2", ucsf = "2D_HN/hmqc.ucsf").
name ignores case, and can be an alias or the start of the name or of any part of it: "hetnoe" finds "hetnoe2d_calr". If it matches several datasets, the one added first is used, so a shortened name keeps finding the same dataset as more are added.
Examples
julia> exampleinfo("hetnoe").name
"hetnoe2d_calr"NMRExampleData.example — Function
example(name)
example(name, format)
example()Return the path of the dataset name, downloading it if needed. Pass the path to loadnmr, loadfid or an analysis.
A series returns a vector of paths in order, and data that an analysis takes in groups return nested vectors, one per group. Given a format such as :nmrpipe, return the same data in that format. Without a name, choose a dataset from a menu.
The first time you use a dataset in a session, its credit, citation and licence are shown.
Examples
julia> using NMRTools, NMRAnalysis
julia> spec = loadnmr(example("2d_hn_ubq"))
julia> fid = loadfid(example("2d_hn_ubq"))
julia> pipe = loadnmr(example("2d_hn_ubq", :nmrpipe))
julia> decay, buildup = example("ccr2d_calr")
julia> ccr2d(decay, buildup; T=0.04)NMRExampleData.exampleanalysis — Function
exampleanalysis(name)Return the folder of the NMRAnalysis analysis saved with the dataset name, downloading the dataset if needed. The folder holds the peak list, the results and the record that reopen reads. Throw an ArgumentError if the dataset has no saved analysis.
Examples
julia> using NMRAnalysis
julia> expt = reopen(exampleanalysis(name)) # ready to refit
julia> peaks = loadpeaks(exampleanalysis(name))NMRExampleData.FORMATS — Constant
FORMATSThe formats a dataset can hold, in the order exampleinfo lists them: :bruker (experiment folders), :nmrpipe, :ucsf (Sparky), :bmrb (NMR-STAR shift lists) and :screen (the experiment.toml of an NMRScreen screen).