I'm getting an error relating to search results from GenBank. This error happens whether I'm looking for mitochondrial sequences, or for a specific gene (CO1). Hoping the devs can help me debug/figure out what the real issue is. I can tell that it has to do with the results table being returned after a query, and that the table is likely empty. That seems like the kind of thing that's normally dealt with using exceptions if/else statements, so I am guessing it's not so simple as that. The error only comes up if I'm passing a list of taxa, not if I query them individually.
fetchSeqs(species_list, database="genbank", out.dir="genbank", quiet=FALSE, marker="mitochondria", output = "gb-binom", force=TRUE, compress=TRUE, multithread = TRUE)
Multithreading with 47 cores
Downloading from genbank - No subsampling
Input marker is mitochondria, Downloading full mitochondrial genomes
Searching genbank with query:([ORGN]) AND mitochondrion[filter] AND genome
Input marker is mitochondria, Downloading full mitochondrial genomes
Searching genbank with query:(Aaaba fossicollis[ORGN]) AND mitochondrion[filter] AND genome
Error in data.frame(taxon = x, seqs_total = length(search_results$ids), :
object 'search_results' not found
Whereas, if I try this species in a standalone query, no error gets produced:
> fetchSeqs("Aaaba fossicollis", database="genbank", out.dir="genbank", quiet=FALSE, marker="mitochondria", output = "gb-binom", force=TRUE, compress=TRUE, multithread = TRUE)
Multithreading with 47 cores
Downloading from genbank - No subsampling
Input marker is mitochondria, Downloading full mitochondrial genomes
Searching genbank with query:(Aaaba fossicollis[ORGN]) AND mitochondrion[filter] AND genome
taxon seqs_total seqs_downloaded marker database
1 Aaaba fossicollis 0 0 mitochondria nuccore
time
1 2020-11-16 15:09:28
I know it's a lot of text, but I'm going to paste my sessioninfo below:
I've changed the error handling in the fetchSeqs function which I believe should resolve this issue. Install the package from GitHub again, and let me know if you are still encounter this issue.
I'm getting an error relating to search results from GenBank. This error happens whether I'm looking for mitochondrial sequences, or for a specific gene (CO1). Hoping the devs can help me debug/figure out what the real issue is. I can tell that it has to do with the results table being returned after a query, and that the table is likely empty. That seems like the kind of thing that's normally dealt with using exceptions if/else statements, so I am guessing it's not so simple as that. The error only comes up if I'm passing a list of taxa, not if I query them individually.
Whereas, if I try this species in a standalone query, no error gets produced:
I know it's a lot of text, but I'm going to paste my sessioninfo below: