report_id() runs check_id() over a column and returns its result table
with the extra class biobouncer_report, so it prints with a one-line summary of
how many values are valid, repairable, invalid, or missing. It is the
recommended entry point for inspecting and cleaning a column. Use repair_id()
inside dplyr::mutate() to substitute the fixable values. For enforcing
validity inside a framework, reach for the adapters such as id_predicate().
Arguments
- x
A
biobouncer_report, as returned byreport_id().- source_db
Source key, for example
"mondo". Seesources().- how
Checking mode:
"pattern"(offline, shape only),"cache"(offline existence against a snapshot),"remote"(live existence against the source API), or"existence"(cache when a snapshot is available forversion, otherwise remote, or pattern for a source with no resolver).- species
Optional species context, echoed in the result. A name such as
"homo_sapiens"or an NCBI taxon id such as9606. When given, an id of a different species is invalid: Ensembl is checked from its id prefix (inpatternandremotemodes), and UniProt from the entry's organism inremotemode. A species outside the source map is not checked.- version
Snapshot version. In
cachemode it selects the snapshot and defaults to the latest installed one when omitted; it selects the snapshot forexistencemode; ignored inpatternandremotemodes.- refresh
In remote checks, skip any cached response and refetch. Ignored by the offline modes.
- on_error
How a per-id remote failure is handled.
"raise"(the default) lets the failure unwind the whole call."indeterminate"leaves just that idNAwith the reason in itserrorcolumn and checks the rest of the batch, so one unreachable id does not lose the others. Ignored by the offline modes.- object
A
biobouncer_report, as returned byreport_id().- ...
Ignored.
Value
A tibble, as returned by check_id(), with the extra
class biobouncer_report. Calling summary() on it returns a one-row tibble of
counts.
Examples
report_id(c("MONDO:0005148", "mondo:5148"), "mondo")
#> # biobouncer report on mondo (pattern mode): 1 valid, 1 repairable, 0 invalid, 0 missing of 2
#> # A tibble: 2 × 9
#> input valid normalized suggestion source_db version species how error
#> <chr> <lgl> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 MONDO:00051… TRUE MONDO:000… NA mondo NA NA patt… NA
#> 2 mondo:5148 FALSE NA MONDO:000… mondo NA NA patt… NA