ropensci / traits

R package for accessing species trait data from multiple databases
Other
40 stars 13 forks source link

ncbi_searcher: prefix for refseq acc_no trimmed #69

Closed mpnelsen closed 8 years ago

mpnelsen commented 8 years ago

I noticed that the prefix for refseq accession numbers seems to be cut off when conducting a search with ncbi_searcher - is it possible to retain this portion of the accession number? See the first hit below - the accession number for this refseq should instead be NG_013161. Thanks for your help!

> test<-try(ncbi_searcher(taxa="Chrysomyxa arctostaphyli",seqrange="350:5000",limit=99999,verbose=FALSE,
fuzzy=TRUE,entrez_query="(18s[TITL]"))
> test[,c("acc_no","gi_no")]
    acc_no     gi_no
1   013161 294470953
2 AY123285  21702990
3   L76488   2055333
4 AY657009  51038286
sckott commented 8 years ago

thanks for the issue, I'll have a look

mpnelsen commented 8 years ago

thanks much!

sckott commented 8 years ago

@zachary-foster i don't remember, but what's the reason for stripping off the prefix before the _ underscore here https://github.com/ropensci/traits/blob/master/R/ncbi_searcher.R#L199-L201

zachary-foster commented 8 years ago

Im not sure. I commented out the line of code that removes the prefix and tried all of the examples and they seemed to work fine. I expect it was an error on my part. I probably was testing to see if the prefix interferes with other functions, but forgot to undo the removal. I will send a PR to undo the removal.

sckott commented 8 years ago

thanks

sckott commented 8 years ago

@mpnelsen try your example again after reinstalling like devtools::install_github("ropensci/traits") and let us know if it works for you

mpnelsen commented 8 years ago

Golden - thanks much to you both.

sckott commented 8 years ago

great!