Coder Social home page Coder Social logo

abba_python's People

Contributors

adamltyson avatar guillaumelegoc avatar nicokiaru avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

abba_python's Issues

abba_python do not work on Mac OSX

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.

Python dependency is missing in the Getting Started section

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:

  • create an environment without python
  • activate it
  • call 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)

Export to Qupath does not work in headless mode from a script

  • ABBA Python version: 0.3.0
  • Python version: 3.7.16
  • Operating System: Windows 10

Description

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) ?

Output

[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)

DeepSlice fails on certain QuPath projects

  • ABBA Python version: 0.1.14
  • Python version: 3.7
  • Operating System: Win11

Description

Try to run DeepSlice in the omero test project.

What I Did

The results are done but are not applied. Probably an error on the Java side with no log.

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.