sherrillmix / taxonomizr

Parse NCBI taxonomy and accessions to find taxonomic assignments
GNU General Public License v2.0
70 stars 11 forks source link

Error from read.names.sql #14

Closed kgun12 closed 5 years ago

kgun12 commented 5 years ago

I'm building a new accessionTaxa.sql db with protein accessions and get the following error:

library(taxonomizr)

getNamesAndNodes() trying URL 'ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz' Content type 'unknown' length 49900153 bytes (47.6 MB)

[1] "./names.dmp" "./nodes.dmp"

getAccession2taxid(types='prot') This can be a big (several gigabytes) download. Please be patient and use a fast connection. trying URL 'ftp://ftp.ncbi.nih.gov/pub/taxonomy/accession2taxid//prot.accession2taxid.gz' Content type 'unknown' length 5572900471 bytes (5314.7 MB)

[1] "./prot.accession2taxid.gz"

read.names.sql('names.dmp','accessionTaxa.sql') read.nodes.sql('nodes.dmp','accessionTaxa.sql') Error: unexpected symbol in "read.names.sql('names.dmp','accessionTaxa.sql') read.nodes.sql"

Any help appreciated...

sherrillmix commented 5 years ago

Looks like R is complaining that you have two lines concatenated together. Make sure that:

read.names.sql('names.dmp','accessionTaxa.sql') read.nodes.sql('nodes.dmp','accessionTaxa.sql')

is on two distinct lines:

read.names.sql('names.dmp','accessionTaxa.sql')
read.nodes.sql('nodes.dmp','accessionTaxa.sql')
kgun12 commented 5 years ago

/facepalm... I missed that entirely!!

Thanks for the useful tool!

Looks like R is complaining that you have two lines concatenated together. Make sure that:

read.names.sql('names.dmp','accessionTaxa.sql') read.nodes.sql('nodes.dmp','accessionTaxa.sql')

is on two distinct lines:

read.names.sql('names.dmp','accessionTaxa.sql')
read.nodes.sql('nodes.dmp','accessionTaxa.sql')
sherrillmix commented 5 years ago

No problem. Glad it's working for you.