Giter Club home page Giter Club logo

flycircuit's Introduction

natverse

natverse GitHub Docs Travis build status Coveralls test coverage

The natverse package is a wrapper for all of the commonly used NeuroAnatomy Toolbox packages. This is convenient both for package installation and for loading/attaching these packages without many calls to library().

See http://natverse.org for more details.

Installation

The recommended approach to install the full natverse is to use a helper package natmanager, which is available on CRAN. You can therefore do:

install.packages("natmanager")
natmanager::install("natverse")

See http://natverse.org/install for more details.

Use

Once installed, you can load the natverse package:

library(natverse)
#> Loading required package: elmr
#> Loading required package: catmaid
#> Loading required package: httr
#> Warning: package 'httr' was built under R version 3.6.2
#> Loading required package: nat
#> Loading required package: rgl
#> Warning: package 'rgl' was built under R version 3.6.2
#> Registered S3 method overwritten by 'nat':
#>   method             from
#>   as.mesh3d.ashape3d rgl
#> 
#> Attaching package: 'nat'
#> The following object is masked from 'package:rgl':
#> 
#>     wire3d
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, union
#> Loading required package: nat.flybrains
#> Loading required package: nat.templatebrains
#> Loading required package: nat.nblast
# example 3D plot of some neurons
plot(kcs20, col=type)

Installation Details

Conflicts and Dependencies

The natverse package contains many packages and it is possible that there could be conflicts where functions in the natverse have the same name as another package.

natverse_conflicts()
#> ── Conflicts ─────────────────────────────────────────────────────────────── natverse_conflicts() ──
#> x nat::intersect() masks base::intersect()
#> x nat::setdiff()   masks base::setdiff()
#> x nat::union()     masks base::union()
#> x nat::wire3d()    masks rgl::wire3d()

You can always choose the correct version by prepending the specific package name e.g. nat::flip() will select the nat version rather than any other.

Updates

Once installed, you check the status of all natverse packages and their dependencies like so:

natverse_update()
#> 
#> The following packages are either locally installed or information about them is missing!
#> 
#>   blob, formattable, import, mockr, nycflights13, pingr, fafbsegdata, reticulate, nat
#> 
#> Please install them manually from their appropriate source locations
#> 
#> 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 
#> --------------  -------------  -------------  -------  --------------------------  -------
#> bit64           0.9-7.1        0.9-7          CRAN     https://cran.rstudio.com/   x      
#> data.table      1.13.0         1.12.8         CRAN     https://cran.rstudio.com/   x      
#> elmr            deb0e27df...   7a2be4537...   GitHub   natverse                    x      
#> ff              2.2-14.2       2.2-14         CRAN     https://cran.rstudio.com/   x      
#> flycircuit      1b7b48e29...   cc4594f47...   GitHub   natverse                    x      
#> git2r           0.27.1         0.26.1         CRAN     https://cran.rstudio.com/   x      
#> insectbrainr    6331b4df6...   8fef94a05...   GitHub   natverse                    x      
#> mouselightr     9c2ce1c31...   8e26b7702...   GitHub   natverse                    x      
#> nat.flybrains   28ff33213...   36c622a15...   GitHub   natverse                    x      
#> nat.jrcbrains   85ed4a791...   44c95667e...   GitHub   natverse                    x      
#> neuprintr       7403d3ce2...   8ab03b744...   GitHub   natverse                    x      
#> RCurl           1.98-1.2       1.98-1.1       CRAN     https://cran.rstudio.com/   x      
#> tibble          b4eec19dd...   3f4e5dfae...   GitHub   tidyverse                   x      
#> tidyr           1.1.0          1.0.3          CRAN     https://cran.rstudio.com/   x      
#> xfun            0.16           0.15           CRAN     https://cran.rstudio.com/   x      
#> XML             NA             3.99-0.3       CRAN     https://cran.rstudio.com/   x

You can then update like so:

natverse_update(update = TRUE)

However, if you are in a hurry and want to save time from the questions use like below:

natverse_update(update=TRUE, upgrade = 'always')

If want to upgrade the natverse package itself:

remotes::update_packages('natverse')

flycircuit's People

Contributors

alexanderbates avatar jdmanton avatar jefferis avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flycircuit's Issues

support FlyCircuit 1.2

Essental:

  • support for FlyCircuit 1.2 ids (probably keeping track of which release contained which ids)
  • remove all use of gene_name or idid as an id (these both seem to have been retired)
  • update flycircuit-ids documentation accordingly to better explain the mess

Desirable:

  • map to canonical side
  • process for NBLAST

Hopefully:

  • package SWC data in FCWB space
  • figure out annotations for new neurons (at least those that match existing annotations)
  • complete annotation in conjunction with EM data?

load_si_data fails on Windows

another case of not setting binary mode

> sc=fc_nblast("fru-M-200266")
attaching: allbyallblastcv4.5
Error in readRDS(fffile) : error reading from connection

glom=="VAsomething" in allpndps.rds is VA4?

I wrote a short script, which NBLASTed 2 Flycircuit PNs (glom=="VAsomething") against FAFB PNs of VAs glomeruli, to see which VA glomerulus they are from. You should be able to just run the script and it will print the result.

Looks like they are VA4. When plotted, they look like VA4 as well.

load_si_data object check is broken

The function definition looks like this:

load_si_data <- function(data_name, type=c('auto', 'data', 'db', 'bigmat', 'ff', 'plain'), overwrite=FALSE, ...) {
  if(!exists(data_name, where=.GlobalEnv)) {
  # ...
  # code that loads the data 
  }
}

but in fact data_name is almost always not the same as the object that is loaded. I therefore think that it would be best to drop the pretence of an existence check for the object. What do you think @ajdm?

load_fcdata can blast pre-existing objects

Currently, load_fcdata() returns NULL if the data is already loaded. This can cause objects to be blasted away by doing:

foo <- load_fcdata('foo')
# some other code
foo <- load_fcdata('foo')

Would it not be better to return the existing object instead?

fc_download_data can block fetching header

looks like this is some strange interaction with the httr::HEAD/curl. We have seen serveral cases where HEAD blocks repeatedly, but curl -I on the commandline works fine.

One option would be switch to RCurl if that does something different.

add smat score matrix

there are two of these, one combining the alpha value (ratio of first eigenvalue total IIRC) of the two dot products, one using unit vectors in both cases (the default)

fc_nblast can be very slow

primarily due to reverse scores. But for some reason it seems to me that this can be much worse than using bigmat,

I just had an example with rstudio where it took a minute to do 1 x 3677 normalised scores. My suspicion is that it was actually some unrelated problem e.g. GUI update that was interleaved. These kind of error messages are typical when changing location with an X session in progress:

Tue Mar 18 14:32:29 mac1041-14.lmb.internal rsession[355] <Error>: kCGErrorIllegalArgument: CGSGetDisplayBounds (display 3f003d)

However, there is a still a more general speed issue to be tracked down since I have seen a behaviour where attaching an ff matrix to the global environment can bring access speed benefits.

FCWBNP.surf is broken

Some of the neuropils are not properly oriented. nat.flybrains version is OK. Might be better to depend on nat.flybrains but to maintain backwards compatibility will just update local version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.