as_summarized_experiment: Convert between nacho objects and Bioconductor containers

View source: R/interop.R

as_summarized_experimentR Documentation

Convert between nacho objects and Bioconductor containers

Description

as_summarized_experiment() gives a SummarizedExperiment with the raw and normalised counts as assays counts and normalised, nacho_samples() as colData, nacho_probes() as rowData, and the settings, thresholds, RCC type and provenance in metadata()$nacho.

Usage

as_summarized_experiment(x)

as_nacho(x, id_colname = "IDFILE")

Arguments

x

A nacho object for as_summarized_experiment(); a SummarizedExperiment or a NanoStringRccSet for as_nacho().

id_colname

Name of the sample id column to create when x does not come from NACHO. When metadata(x)$nacho$settings exists, its id_colname wins and this argument is ignored.

Details

as_nacho() goes the other way, from a SummarizedExperiment or from a NanoStringRccSet read by NanoStringNCTools::readNanoStringRccSet(). The dates of a NanoStringRccSet are written as YYYYMMDD, as in RCC files. Its probe names lose a trailing numeric suffix such as ⁠|0⁠, as in load_rcc(), so both give the same probe names for the same RCC files. It computes the quality-control metrics and the normalisation from the raw counts; settings and thresholds come from metadata()$nacho when present, and are the defaults otherwise. They are checked like the arguments of normalise(). The result always carries the current object schema. A nacho object is checked and returned as is, and a NACHO 2 object gets a hint to use upgrade_nacho().

Value

A SummarizedExperiment, or a nacho object.

Examples


se <- as_summarized_experiment(GSE74821)
as_nacho(se)


NACHO documentation built on Nov. 2, 2026, 5:09 p.m.