Coder Social home page Coder Social logo

danilexn / tronos Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 155.38 MB

Tronos: TRacking of Nuclear OScillations

License: MIT License

Python 1.96% Jupyter Notebook 98.04%
biological-data-analysis classification fitting-curve image-processing patterns python segmentation spectral-analysis

tronos's People

Contributors

danilexn avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar

tronos's Issues

ggplot2 R error

Al generar los gráficos salta error, he probado a utilizar el .csv tanto con el paso de interpolación como sin él por si fuera la causa pero el error es el mismo.

Moving Average Smoothing parameters

MA_order <- 12

Dataframe reordering for facet plotting

df_MA <- data.frame(apply(df[,c("vt","convexity", "circularity", "major","minor")], 2, SMA, n=MA_order))
df_MA <- df_MA %>% mutate_all(funs((. - min(., na.rm = T))/(max(., na.rm = T) - min(., na.rm = T))))
df_MA_long <- melt(df_MA)
Time = rep(1:181, 5)

Plot generation

Time series trajectory

p1 <- ggplot(df, aes(x=frame, y=y)) +
geom_line() +
xlab("") +
ylab("Position (microns)") +
theme_bw() +
geom_vline(xintercept = c(best.case$end, best.case$begin),
color = "black", size=0.5)

Moving average values of each morphological descriptor and velocity

p2 <- ggplot(data=df_MA_long, aes(x=Time, y=1, fill=value, color=variable)) +
facet_wrap(~variable, ncol=1, scales='free') +
scale_fill_gradientn(colours=c("#15BFC3", "#FC367A", "white", "gray"),
na.value = "transparent",
breaks=c(0,0.5,1),labels=c(0,0.5,1),
limits=c(0,1)) +
theme_bw() +
ylab('') +
geom_raster() +
labs(fill = "Relative\nvalue") +
theme(axis.text.y=element_blank(),axis.ticks.y=element_blank()) +
geom_vline(xintercept = c(best.case$end, best.case$begin),
color = "black", size=0.5)

Arranging the plots in the same column for better visualization, using egg library.

ggarrange(p1,p2, ncol = 1,heights = c(2, 4))

Error: Aesthetics must be either length 1 or the same as the data (900): x
Traceback:

  1. ggarrange(p1, p2, ncol = 1, heights = c(2, 4))
  2. lapply(plots, ggplot2::ggplotGrob)
  3. FUN(X[[i]], ...)
  4. ggplot_gtable(ggplot_build(x))
  5. ggplot_build(x)
  6. ggplot_build.ggplot(x)
  7. by_layer(function(l, d) l$compute_aesthetics(d, plot))
  8. f(l = layers[[i]], d = data[[i]])
  9. l$compute_aesthetics(d, plot)
  10. f(..., self = self)
  11. check_aesthetics(evaled, n)
  12. abort(glue("Aesthetics must be either length 1 or the same as the data ({n}): ",
    . glue_collapse(names(which(!good)), ", ", last = " and ")))
  13. signal_abort(cnd)

Error ruta Fiji

Salta el mensaje de que no tengo FIJI instalado aunque lo tenga en la misma ruta de siempre, parece que si ejecuta el código correctamente (en este en concreto no detecta célula pero en otros las detecta igual que antes)

`jpincru@pop-os:~$ Tronos --source /home/jpincru/pelisdv/Sandra/TL1_sandra_AFA854_*_R3D.dv --workdir /home/jpincru/pelisdv/Sandra/results --project --track --threshold MaxEntropy --convert --minframes 120 --sizes 500 20000


/_ // __ \ / __ \ / | / // __ / /
/ / / /
/ // / / // |/ // / / /_
\
/ / / , // // // /| // // /
/ /
// // || _/// |/ _//_/

Welcome to TRONOS 0.2.0 by Daniel Leon-Perinan
[INFO] Parsing arguments...
[INFO] Z-Stacking will occur now
100%|██████████████████████████████████████████████████████| 107/107 [00:02<00:00, 37.54it/s]
[INFO] Saving projected image to .tif
[INFO] Generating and saving MaxEntropy threshold image
[TRONOS] [ERROR] Could not find FIJI installed in your Linux system
[TRONOS]->[FIJI] Passing data for file /home/jpincru/pelisdv/Sandra/results/TL1_sandra_AFA854_1_R3D_PRJ
[FIJI] Analyzing particles with default parameters
[TRONOS] [ERROR] Could not find FIJI installed in your Linux system
[FIJI]->[TRONOS] Result parsing and transformation
[TRONOS] Trajectory linking
[TRONOS] Filtering trajectories
[TRONOS] Track filter statistics
Before: 1
After: 0
[TRONOS] Trajectories were successfully saved to file /home/jpincru/pelisdv/Sandra/results/TL1_sandra_AFA854_1_R3D_PRJ_trajs.csv
[INFO] Completed processing of TL1_sandra_AFA854_1_R3D
`

Error ruta de salida pdf

Al cambiar la ruta del output para el pdf da error, solo se genera correctamente en la carpeta del notebook si se deja por defecto.

Calculate the global spectrum and plot

y.spec <- spectrum(y,log="yes",span=2,plot=FALSE,na.action=na.remove)

Axis readjustment

spx <- y.spec$freq/sampling.time

spy <- 2*y.spec$spec

p.freq <- ggplot(data.frame(spy, spx), aes(y = spy, x = spx)) +

   geom_line() +

   theme_bw() +

   ggtitle(label = "Nuclear oscillations frequencies") +

   xlab("Frequency (Hz)") +

   ylab("Spectral density")

p.period <- ggplot(data.frame(spy, spx), aes((1/spx)/60, spy)) +

   geom_line() +

   ggtitle(label = "Nuclear oscillations periods") +

   theme_bw() +

   ylab("Spectral density") + 

   scale_x_continuous(trans = "log10") +

   xlab("Period (minutes)")

p.freq

p.period

pdf(paste0(analysis.name,"home/jpincru/pelisdv/pdfs/density/_spectral_density.pdf"))

p.period

p.freq

dev.off()

Error in pdf(paste0(analysis.name, "home/jpincru/pelisdv/pdfs/density/_spectral_density.pdf")): cannot open file 'AFA855_2_R3D_PRJ_trajshome/jpincru/pelisdv/pdfs/density/_spectral_density.pdf'
Traceback:

  1. pdf(paste0(analysis.name, "home/jpincru/pelisdv/pdfs/density/_spectral_density.pdf"))

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.