Skip to main content

What one result’s fields mean to one consumer

Description

Answers on a result read with read_parsed_levels() and hands the data back directly: levels give each level’s slots, looked up by one of the set’s keys, such as “q_value” or Sage’s “quantification_q_value”. Ambiguous or unreviewed answers signal UnresolvedField.

Value

The class generator; DataCatalog$new() returns a DataCatalog.

Public fields

levels
One Level per level of the result, with anndataR’s slots looked up by key.

Active bindings

description
What this catalogue set holds and who uses it.

Methods

Public methods


DataCatalog$new()

Bind catalogue sets to the levels of one result; apb, APB’s own fields, is always in.

Usage
DataCatalog\$new(result, ..., enforce = NULL)
Arguments
result
A ParsedLevels object.
…
The catalogue sets, such as “abundance” and “confidence”; see catalogues().
enforce
NULL, “MUST” or “SHOULD”: signal MissingRequiredField when a field a set requires at that strength is missing.

DataCatalog$fields()

Every catalogued field of the result in every composed set, one row per field, as catalogue_table() shows them.

Usage
DataCatalog\$fields()
Returns

A data frame with present and, for a field apb2 left out because it held one value, that constant.


DataCatalog$print()

Print the set and the levels.

Usage
DataCatalog\$print(...)
Arguments
…
Ignored.

DataCatalog$clone()

The objects of this class are cloneable with this method.

Usage
DataCatalog\$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.

Examples

library("apbCatalogR")

results <- tempfile()
archive <- system.file(
    "extdata", "test-bundle", "results.tar.gz",
    package = "apbCatalogR"
)
utils::untar(archive, exdir = results)
result <- read_parsed_levels(
    file.path(results, "maxquant_wide-peptidoform_ion.parquet")
)
catalog <- DataCatalog$new(result, "confidence")
dim(catalog$levels$peptidoform_ion$layers[["pep"]])
[1] 2 3
catalog$levels$peptidoform_ion$layers$name("pep")
[1] "PEP"