Skip to content

keys returns the full set of keys for the annotation database. A database "key" is a unique value that identifies a single row of the database. By default, keys will return a vector of all primary database keys. The primary keys for SomaScan.db are the SomaLogic sequence identifiers, also called SeqIds.

If the keytype argument is specified, keys will return the keys that are available for that keytype, rather than the SeqIds (see examples).

Usage

# S4 method for SomaDb
keys(x, keytype, ...)

Arguments

x

the AnnotationDb object. But in practice this will mean an object derived from an AnnotationDb object such as a OrgDb or ChipDb object.

keytype

the keytype that matches the keys used. For the select methods, this is used to indicate the kind of ID being used with the keys argument. For the keys method this is used to indicate which kind of keys are desired from keys

...

other arguments. These include:

pattern:

the pattern to match (used by keys)

column:

the column to search on. This is used by keys and is for when the thing you want to pattern match is different from the keytype, or when you want to simply want to get keys that have a value for the thing specified by the column argument.

fuzzy:

TRUE or FALSE value. Use fuzzy matching? (this is used with pattern by the keys method)

Value

A character vector of all available database keys.

Author

Amanda Hiser

Examples

# Preview the primary database keys
keys(SomaScan.db) |> head()
#> [1] "10000-28" "10001-7"  "10003-15" "10006-25" "10008-43" "10010-10"

# View a different type of database key, e.g. gene symbols
keys(SomaScan.db, keytype = "SYMBOL") |> head()
#> [1] "A1BG"  "A2M"   "A2MP1" "NAT1"  "NAT2"  "NATP"