Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.25 KB

README.org

File metadata and controls

35 lines (22 loc) · 1.25 KB

This is a package intended to ease the import and manipulation of calcium and voltage imaging data in R.

The package uses the SummarizedExperiment class from Bioconductor and allows all usual manipulations such as subsetting etc.

Additionally, the package implements some useful general functions explained below:

Issues

python 3.6 dependency for readSuite2p

Since suite2p stores some of its data in a format that can only be read by numpy from python 3.6+ the readSuite2p function requires python 3.6 to perform correctly. The function relies on the reticulate package which usually ends up using the standard python 2.7 installation of the system. To ensure that python 3.6 is used, add the path of your python 3.6 installation to your .Renviron or .Rprofile files. Below is an example of a miniconda installation on macOS.

RETICULATE_PYTHON="/opt/miniconda3/bin/python"

bla <- as.data.frame(raw(calexp))
bla <- bla[,1:2]
bla$t <- 1:nrow(bla)


fits <- bla %>%
  gather(key = key, value = y, -t) %>%
  group_by(key) %>% 
  do(fit = nls(y ~ SSasymp(t, yf, y0, log_alpha), data = .)) %>% 
  tidy(fit) %>% 
  select(key, term, estimate) %>% 
  spread(term, estimate) %>% 
  mutate(alpha = exp(log_alpha))