This function extracts and formats the name of a database from a `databaseClass` object by combining the source and version information.

extract_database_name(database)

Arguments

database

A `databaseClass` object containing database information.

Value

A character string representing the name of the database, formatted as `Source_Version`. Returns `NULL` if the input is not a `databaseClass` object.

Details

The function extracts the `Source` and `Version` fields from the `database.info` slot of the `databaseClass` object and combines them using an underscore (`_`). This formatted string represents the name of the database.

Examples

if (FALSE) { # \dontrun{
# Load a sample database
my_database <- load_database("path/to/database")

# Extract the name of the database
db_name <- extract_database_name(my_database)
print(db_name)  # Output might be "HMDB_4.0"
} # }