biop / abba_python Goto Github PK
View Code? Open in Web Editor NEWABBA, controlled from python
License: Other
ABBA, controlled from python
License: Other
For some reasons, using python > 3.7 makes abba fails on
from abba_python import abba
I do not know why.
Why ?
Because abba_python specify DeepSlice as a required dependency
DeepSlice requires tensorflow 1.15
Tensorflow 1.15 requires python 3.7
There's no build for python 3.7 on mac (M1)
-> DeepSlice should be optional.
Hi,
Thank you for developing Abba, it's a very nice tool.
I have a concern about the getting started section.
The instructions are as follows:
pip install abba-python
On my system, this results in installing all abba-python dependencies in system's pip.
I assume this is not the intended behavior and it may result in very unexpected problems.
I would suggest adding python and using a YML file that can be passed to conda, such as:
# Run conda env create -f <path to this file> to create the environment
# Run conda env update -f <path to this file> to update the environment
name: abba-env
channels:
- conda-forge
dependencies:
- openjdk=8
- python=3.10
- pip
- ipykernel
- ipywidgets
- maven
- pip:
- abba-python
(i had to install maven)
Related to NicoKiaru/ABBA-Python#18
Adds supports to DeepSlice rat model - probably needs to be implemented on the Java side first, and also by updating to Json instead of XML.
This would simplify the installation process.
I want to export registration to the Qupath project programmatically from python.
To do this, I launch an ABBA instance in headless mode, I load a state file and run the export registration command :
aligner = abba.Abba('Adult Mouse Brain - Allen Brain Atlas V3p1', headless=True)
aligner.state_load(os.path.join(inputdir, inputfile))
aligner.select_all_slices()
aligner.export_registration_to_qupath(erase_previous_file=True)
The following line is printed :
Exporting slice img_001.ome.tiff registration to QuPath
But there is nothing written in the Qupath project.
There is an error raised during the loading of the state file (see below), but this error did not prevent me from doing things with abba_python previously (eg. converting coordinates).
Doing the same thing not in headless mode (eg. aligner = abba.Abba('Adult Mouse Brain - Allen Brain Atlas V3p1')
), the output is more talkative, those lines are also printed :
Multipositioner : Save slice ROI to quPath project path\to\qproj\data\1\ABBA-RoiSet-Adult Mouse Brain - Allen Brain Atlas V3p1.zip
Multipositioner : Save transformation to quPath project path\to\qproj\data\1\ABBA-Transform-Adult Mouse Brain - Allen Brain Atlas V3p1.json
And the files are indeed exported.
So it seems the multipositionner does not really exist in headless mode and Qupath export relies on it (but converting coordinates does not so that is why the latter works) ?
[java.lang.Enum.toString] [ERROR] Multipositioner : null
[ERROR] Command errored: ABBA - Load State
java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.JFrame.<init>(JFrame.java:189)
at ch.epfl.biop.atlas.aligner.MultiSlicePositioner.lambda$new$2(MultiSlicePositioner.java:134)
at ch.epfl.biop.atlas.aligner.MultiSlicePositioner.lambda$new$4(MultiSlicePositioner.java:144)
at ch.epfl.biop.atlas.aligner.MultiSlicePositioner.loadState(MultiSlicePositioner.java:1181)
at ch.epfl.biop.atlas.aligner.command.ABBAStateLoadCommand.run(ABBAStateLoadCommand.java:27)
at org.scijava.command.CommandModule.run(CommandModule.java:196)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[java.lang.Enum.toString] [ERROR] Command errored: ABBA - Load State
java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.JFrame.<init>(JFrame.java:189)
at ch.epfl.biop.atlas.aligner.MultiSlicePositioner.lambda$new$2(MultiSlicePositioner.java:134)
at ch.epfl.biop.atlas.aligner.MultiSlicePositioner.lambda$new$4(MultiSlicePositioner.java:144)
at ch.epfl.biop.atlas.aligner.MultiSlicePositioner.loadState(MultiSlicePositioner.java:1181)
at ch.epfl.biop.atlas.aligner.command.ABBAStateLoadCommand.run(ABBAStateLoadCommand.java:27)
at org.scijava.command.CommandModule.run(CommandModule.java:196)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Try to run DeepSlice in the omero test project.
The results are done but are not applied. Probably an error on the Java side with no log.
Use conda constructor to make stand alone installer for:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.