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

Possible to suppress "Is this a location of interest? (Y/N)" prompts? #102

Open nrminor opened 1 year ago

nrminor commented 1 year ago

I'd like to run the outbreak.info getPrevalence() function as part of a high-throughput workflow on an HPC cluster. For context, that part of the workflow is meant to download prevalence data for each United States Health and Human Services region and use those data to run some statistics. In order to do so, I need a way to suppress the user prompts I get when I try to download each state. The prompts look like this:

Is this a location of interest? (Y/N):

Or at the very least, I need some way to automate the Y response. So far, I've tried using the force() and sink() functions to no avail.

Do you have any suggestions for how to automate or suppress these prompts? Thanks!

malkuzweny commented 1 year ago

Hello,

If you've correctly spelled the exact names of the states that you want to grab data from, then you should not be getting the prompt. Can you check if that's the case?

nrminor commented 1 year ago

I don't believe any of the spellings are incorrect. These are the character strings I'm looping through to gather prevalence data:

> region_states
[1] "Illinois"  "Indiana"   "Michigan"  "Minnesota" "Ohio"      "Wisconsin"

Interestingly, I'm only getting prompted for Indiana and Ohio.

malkuzweny commented 1 year ago

Thanks. There are U.S. counties named Indiana and Ohio (in addition to the states themselves), which is why you're only being prompted for those. Let me work on this and get back to you with a solution.

nrminor commented 1 year ago

Got it. That makes sense. Thanks so much for your work and quick replies!

nrminor commented 1 year ago

Hello. Just checking in to see if you have any new suggestions on this issue. Thanks!