SomaLogic / SomaScan.db

An R package providing extended biological annotations for the SomaScan Assay, a proteomics platform developed by SomaLogic Operating Co., Inc.
https://somalogic.github.io/SomaScan.db/
Other
2 stars 2 forks source link

Request for a warning message for queries involving non-human proteins #3

Open amanda-hi opened 11 months ago

amanda-hi commented 11 months ago

It would be helpful to have a signal condition (either error or warning message) that will be activated when a user requests annotations for a mouse Fc or other non-human protein that doesn't have a cleanly mapped Entrez ID, and therefore is not available in the package. Currently, if a user searches for one of these analytes, they will get no annotation entries back & an error saying the key is invalid. This could be confusing or misleading (they could think they made a mistake with their query, misunderstood how to use the package, etc.).

Example:

reprex::reprex({
      library(SomaScan.db)
      select(SomaScan.db, "10034-16", columns = c("UNIPROT", "ENTREZID"))
})

See this chapter of Advanced R for implementing signaling conditions.

amanda-hi commented 5 months ago

The SeqIds for these entries (i.e. non-human proteins) are currently not part of the SQLite db for this package. To identify and signal a message whenever these values are queried, there would need to be some form of underlying data structure in the package that maintains a list of these IDs. This could possibly be an un-exported data object (like somascan_menus but for internal use only).

Handling internal data objects when LazyData = FALSE: https://stackoverflow.com/questions/9521009/how-do-you-handle-r-data-internal-to-a-package