SummarizedExperiment_to_nmr_dataset_peak_table: Import SummarizedExperiment as mr_dataset_peak_table

Description Usage Arguments Value Examples

View source: R/nmr_dataset_peak_table.R

Description

Import SummarizedExperiment as mr_dataset_peak_table

Usage

1

Arguments

se

An SummarizedExperiment object

Value

nmr_dataset_peak_table An nmr_dataset_peak_table object (unmodified)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dir_to_demo_dataset <- system.file("dataset-demo", package = "AlpsNMR")
dataset <- nmr_read_samples_dir(dir_to_demo_dataset)
dataset_1D <- nmr_interpolate_1D(dataset, axis = c(min = -0.5, max = 10, by = 2.3E-4))
meta <- file.path(dir_to_demo_dataset, "dummy_metadata.xlsx")
metadata <- readxl::read_excel(meta, sheet = 1)
dataset_1D <- nmr_meta_add(dataset_1D, metadata = metadata, by = "NMRExperiment")
metadata <- list(external = dataset_1D[["metadata"]][["external"]])
peak_table <- nmr_data(dataset_1D)
nmr_peak_table <- new_nmr_dataset_peak_table(peak_table, metadata)
se <- nmr_dataset_peak_table_to_SummarizedExperiment(nmr_peak_table)
nmr_peak_table <- SummarizedExperiment_to_nmr_dataset_peak_table(se)

AlpsNMR documentation built on April 1, 2021, 6:02 p.m.