neuprint startup difficulties

68 views
Skip to first unread message

Andy Siliciano

unread,
Apr 28, 2020, 8:53:07 PM4/28/20
to nat-user
Hello all,

I am struggling with what I suspect is a fairly simple issue, but natverse is my introduction to R so I'm having a little trouble figuring out what's wrong.  I successfully downloaded natverse (following these instructions: http://natverse.org/install/) and am able to plot KCs, as in the example.  I successfully downloaded neuprint (following these instructions: http://natverse.org/neuprintr/), and was successfully able to log into neuPrint using my token.  neuprint_datasets(), neuprint_database(), and neuprint_ROIs() all seem correct.  The issue is when I attempt to query a specific neurons, such as:

opn.info = neuprint_search(".*mPN1.*")

I get the following error message:

Error: neuPrint error: Unexpected end of input: expected whitespace, CYPHER options, EXPLAIN, PROFILE or Query (line 1, column 1 (offset: 0))
""
^


I get the same error message with other functions like neuprint_get_paths(). Any help would be greatly appreciated.
I'm happy to post this on the GitHub if that's a more appropriate forum. Thanks again for creating such an amazing set of tool
s!

-Andy




Greg Jefferis

unread,
Apr 29, 2020, 4:20:27 AM4/29/20
to Andy Siliciano, nat-user
Dear Andy,

Thanks for your interest in the natverse and neuprintr. This is very strange as your command below is correct, so I think there must be some configuration or setup issue.

For debugging, can you do the following and tell us the output to give some clues.

Best wishes,

Greg.

# Start a clean R session

library(neuprintr)

neuprint_get_meta(5813055184)
head(neuprint_search("mPN1", fixed = T))

print(neuprint_login())
neuprintr::check_dataset()
neuprintr:::neuprint_name_field(neuprint_login())

# this should tell us if there are any funny chars in your token
# but if it prints a long string, don't share that
gsub("[A-z0-9.]", "", Sys.getenv("neuprint_token"))

Sys.getenv('neuprint_dataset')
Sys.getenv('neuprint_server')

natverse::natverse_deps()
R.version

Also please make sure there is a blank line at the end of your .Renviron


--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nat-user/d1752bb7-ab5b-4c94-9375-54ed78b35b3f%40googlegroups.com.

Andy Siliciano

unread,
May 1, 2020, 12:03:05 PM5/1/20
to nat-user
Thanks for your help!  The issue seems to be that RcppArmadillo and xml2 needed updating.  I'll post what I did below in case anyone else runs into the same issue.  I'll just include what I thought was relevant but I'm happy to post the full console readout if it would be useful.

1) ran natverse:natverse_deps():
The following natverse dependencies are out-of-date, see details below:

We recommend updating them by running:
natverse_update(update=TRUE)

package         remote        local         source   repo                        status           
--------------  ------------  ------------  -------  --------------------------  ------------     
RcppArmadillo   0.9.870.2.0   0.9.860.2.0   CRAN     https://cran.rstudio.com/   x
xml2            1.3.2         1.3.1         CRAN     https://cran.rstudio.com/   x

2) ran natverse_update(update=TRUE) and received the following error:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

3) updated Xcode in terminal: $ xcode-select --install

4) ran natverse_update(update=TRUE) again and received the following error:
ld: library not found for -lgfortran


6) ran natverse_update(update=TRUE) again and this time everything updated appropriately and neuprint works!

Greg Jefferis

unread,
May 1, 2020, 12:35:22 PM5/1/20
to Andy Siliciano, nat-user
Dear Andy,

Thanks a lot for replying with an update. It's great that you are now up and running.

For reference for others, the steps you describe are what is necessary to allow installation of packages from source in R – this will be useful in the future. However, funnily enough, I think it's very unlikely that either of these updates fixed your original problem. As rule of thumb, packages from the main CRAN repository (like xml2 and RcppArmadillo) do not normally need to be the very latest version (I don't think this is stated anywhere in our docs); changes to natverse packages on GitHub can be quite significant.

Your problem was most likely to resolved after simply restarting your R session – from your symptoms I suspect that you had a cached neuprint connection with bad settings for the default dataset or a field called "instance" or "name" where we need to do a database query to figure out what is in use on the current server. The other possibility is that I also made some small updates to the neuprintr package that may have helped. This is not showing up as a package to be updated below, but it is possible that an update appeared before you actually ran the update step.

We'll be happy to try and help if you run into any issues in future. Good luck with your analyses!

Greg.


--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.

xinping li

unread,
Aug 5, 2020, 10:36:44 PM8/5/20
to nat-user
Dear Greg,

I ran into a similar issue using neuprintr.

For instance, when I ran
> opn.info = neuprint_search(".*mPN1.*")

I got:

Error: neuPrint error: Unexpected end of input: expected whitespace, CYPHER options, EXPLAIN, PROFILE or Query (line 1, column 1 (offset: 0))
""
 ^

Moreover, when I ran
> dpn.hemi=neuprint_read_neurons(1039335355)

I got:
Error in neuprint_read_neurons(1039335355) : Error reading bodyids


I ran the debugging codes you posted in the earlier post and here are the outputs:

> neuprint_get_meta(5813055184)
Error: neuPrint error: Unexpected end of input: expected whitespace, CYPHER options, EXPLAIN, PROFILE or Query (line 1, column 1 (offset: 0))
""
 ^
> head(neuprint_search("mPN1", fixed = T))
Error: neuPrint error: Unexpected end of input: expected whitespace, CYPHER options, EXPLAIN, PROFILE or Query (line 1, column 1 (offset: 0))
""
 ^
> print(neuprint_login())
Connection to neuPrint server:
with default dataset:
   hemibrain:v1.1 
Login active since: Thu, 06 Aug 2020 01:59:16 GMT> neuprintr::check_dataset()
Error: 'check_dataset' is not an exported object from 'namespace:neuprintr'

> neuprintr:::neuprint_name_field(neuprint_login())
Error: neuPrint error: Unexpected end of input: expected whitespace, CYPHER options, EXPLAIN, PROFILE or Query (line 1, column 1 (offset: 0))
""
 ^
> gsub("[A-z0-9.]", "", Sys.getenv("neuprint_token"))
[1] ""
> Sys.getenv('neuprint_dataset')
[1] ""
> Sys.getenv('neuprint_server')
[1] ""
> natverse::natverse_deps()

The following packages are either locally installed or information about them is missing!

  fafbsegdata, nat.ants

Please install them manually from their appropriate source locations

All natverse dependencies are up-to-date

> R.version
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          4                           
minor          0.2                         
year           2020                        
month          06                          
day            22                          
svn rev        78730                       
language       R                           
version.string R version 4.0.2 (2020-06-22)
nickname       Taking Off Again   


Could you please advise how to proceed? My goal is to convert coordinates between hemibrain and flywire.
Many thanks!

Xinping

Greg Jefferis

unread,
Aug 6, 2020, 6:13:14 AM8/6/20
to xinping li, nat-user
Dear Xinping,

Thanks for reporting this. If you switch from http to https, everything should work. 

Details: 

You are right that this is related to Andy's error. I fixed the original error here:


In your case you are connecting to http not https. The neuprint.janelia.org server redirects this to https for some calls but not the custom cypher queries. 

We will try to catch this error when you login in future. We will use the canonical URL returned by the server at login rather than what the user provides.

Best,

Greg.


--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.

xinping li

unread,
Aug 6, 2020, 6:54:40 AM8/6/20
to nat-user
Dear Greg, you are right, it works now. Thank you so so much!!  
Reply all
Reply to author
Forward
0 new messages