PolyGenius
Contents

workspace$catalogs$genomeBuilds

Genome build catalog

Registry of the genome builds PolyGenius supports. Every other catalog normalizes a user-supplied build string through this registry before using it as a cache-identity parameter, a merge key or a manifest filter. Reached as workspace$catalogs$genomeBuilds.

Details

The registry is static and in-memory — two rows, hg19 ("hg19/GRCh37") and hg38 ("hg38/GRCh38"), built at construction. Nothing is downloaded, cached or written, and there is no rule file behind it.

Matching is case- and whitespace-insensitive and by substring: the supplied string is looked for inside both the key and the build column, so "GRCh37" and "hg1" both resolve to hg19 while "hg" matches both rows and aborts as ambiguous. key() and name() abort on an unmatched or ambiguous string; label() never aborts, which is why the other catalogs' view() methods use it per row.

Methods

Public methods

  • GenomeBuilds$new()
  • GenomeBuilds$view()
  • GenomeBuilds$key()
  • GenomeBuilds$name()
  • GenomeBuilds$label()
  • GenomeBuilds$print()

Method new()

Build the two-row registry of supported genome builds.

Usage

GenomeBuilds$new()

Returns

A new GenomeBuilds object.

Method view()

Return the registry table.

Usage

GenomeBuilds$view()

Returns

A data.frame with one row per supported build and two character columns: key ("hg19", "hg38") and build ("hg19/GRCh37", "hg38/GRCh38").

Method key()

Resolve a build identifier to its canonical key.

Usage

GenomeBuilds$key(build)

Arguments

build — Character scalar. Build key or name, matched case- and whitespace-insensitively as a substring of both registry columns.

Returns

Character scalar, "hg19" or "hg38". Aborts when build matches no row or more than one.

Method name()

Resolve a build identifier to its canonical name.

Usage

GenomeBuilds$name(build)

Arguments

build — Character scalar. Build key or name, matched as for key().

Returns

Character scalar, "hg19/GRCh37" or "hg38/GRCh38". Aborts when build matches no row or more than one.

Method label()

Return a display label for a build value without aborting on an unrecognized one.

Usage

GenomeBuilds$label(build, fallback = TRUE)

Arguments

build — Character scalar. Build key or name; NULL, a zero-length value and NA all count as unresolved.

fallback — Logical scalar, default TRUE. When TRUE an unresolved build is returned unchanged; when FALSE it becomes NA_character_.

Returns

Character scalar canonical build name, or the fallback above. Never aborts, even on an ambiguous string — the first match wins.

Method print()

Print the supported builds to the console.

Usage

GenomeBuilds$print(...)

Arguments

... — Unused. Present for print-method compatibility.

Returns

self, invisibly.

Examples

workspace$catalogs$genomeBuilds$view()
workspace$catalogs$genomeBuilds$key("GRCh38")
workspace$catalogs$genomeBuilds$label("hg99")

See Also

Aliases: GenomeBuilds, workspace$catalogs$genomeBuilds, workspace$catalogs$genomeBuilds$key, workspace$catalogs$genomeBuilds$label, workspace$catalogs$genomeBuilds$name, workspace$catalogs$genomeBuilds$view