Associate columns to fields so they are recognized and appropriately treated by refdb functions.
refdb_set_fields( x, source = NA, id = NA, organism = NA, taxonomy = NA, sequence = NA, marker = NA, latitude = NA, longitude = NA, reference = NA, config_yaml = NULL )
x | a reference database (tibble). |
---|---|
source | name of the column which contains the data source. |
id | name of the column which contains the record IDs. |
organism | name of the column which contains the names of the organisms. |
taxonomy | a vector of column names. |
sequence | name of the column which contains the sequences. |
marker | name of the column which contains marker names. |
latitude | name of the column which contains latitudes (WGS 84) |
longitude | name of the column which contains longitudes (WGS 84). |
reference | a vector of column names. |
config_yaml | a file path to a YAML file |
The function returns x
with updated attributes.
TODO taxonomy reordering
NA to ignore, NULL to delete
fields set using config_yaml always overwrite those set by arguments