Closed cjfields closed 2 years ago
I should clarify: I see this issue sporadically with different calls to bold_seqspec()
, I see this consistently w/ the above example.
I've run into this issue you are probably not retrieving all public available for Calliphoridae, because of this warning. Try downloading the data set from the BOLD API and confirm if you're losing records From what I've gathered that warning happens when trying to read records with symbols such as "#", and I haven't been able to circumvent it when using the bold package. It happens sometimes when reading files as well, but in that case it's easy to solve
I have also run into this issue with some species such as Felis Catus, I checked the records when it happened and I am indeed missing some of them. In the case of Felis Catus, I am missing the last three records with process IDs: RDATC037-05, RONP027-14, and RSMS002-11. As far as I can tell there doesn't seem to be anything weird with those 3 records and I don't really see any "#" symbols in them either.
Per the SO question, disabling quotes helps. Here is a demo using the full response instance:
> test <- bold_seqspec('Felix catus', response = TRUE)
> tt <- paste0(rawToChar(tmp$content, multiple = TRUE), collapse = "")
> Encoding(tt) <- "UTF-8"
> temp1 <- utils::read.delim(text = tt, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
Warning message:
In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
EOF within quoted string
> temp2 <- utils::read.delim(text = tt, header = TRUE, sep = "\t", stringsAsFactors = FALSE, quote = "")
> dim(temp1)
[1] 41 80
> dim(temp2)
[1] 44 80
The second data frame (temp2
) has three more rows and no errors.
Fix now merged!
I'm seeing the following sporadically when using
bold_seqspec
:Very similar to this SO issue.
Session Info