Arcadia-Science / sourmashconsumr

Working with the outputs of sourmash in R
https://arcadia-science.github.io/sourmashconsumr/
Other
24 stars 3 forks source link

for `read*()` functions, check if file exists and output and error if it doesn't #49

Closed taylorreiter closed 1 year ago

taylorreiter commented 1 year ago

Otherwise, when a non-existent file is supplied:

> Sys.glob("~/github/2022-strains/SRR/SRR*lineage*csv")
character(0)

You get this entirely unhelpful error message:

Error in tidyr::separate(., .data$lineage, into = c("domain", "phylum", : 
object 'taxonomy_annotate_df' not found
taylorreiter commented 1 year ago

but...do this cleverly so that if read from URL still works, this check doesn't break that functionality

taylorreiter commented 1 year ago

Addressed in #61, including keeping read url functionality