outbreak-info / R-outbreak-info

R package to access the genomics and epidemiology data and Research Library metadata compiled and standardized on outbreak.info.
https://outbreak-info.github.io/R-outbreak-info/
MIT License
19 stars 10 forks source link

more accurate getPrevalence() warning for deletions #105

Open TKMarkCheng opened 1 year ago

TKMarkCheng commented 1 year ago

A response to #81 which raised the issue of the inaccurate and confusing error message in the GetGenomicsData() API:

In getGenomicData(query_url = "prevalence-by-location", pangolin_lineage = pangolin_lineage, :
Mutations should be specified in the format gene:mutation, like "S:E484K". The following mutations are not in the specified format: S:DEL69/70

1) Improved Grepl Regex which includes the scenario where a deletion mutation is queried. 2) Improved error message to show the preferred format for deletions. "{gene}:DEL{start codon}/{end codon}"

TKMarkCheng commented 1 year ago

Hi! Hoping this branch can be tested and merged soon to clear up the confusion that may arise with usage e.g. #81. However, wanted to have on record that insertions - like ins214EPE found in most omicron sequences, are not accessible by outbreak.info, and thus not covered. @flaneuse