small-fish-gui 1.9.3__tar.gz → 1.9.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/PKG-INFO +2 -1
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/pyproject.toml +2 -1
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/README.md +5 -8
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/__init__.py +1 -2
- small_fish_gui-1.9.4/src/small_fish_gui/__main__.py +62 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/__init__.py +1 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/prompts.py +26 -4
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/main.py +19 -2
- small_fish_gui-1.9.3/src/small_fish_gui/__main__.py +0 -29
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/LICENSE +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/README.md +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/.github/workflows/python-publish.yml +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/LICENSE +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/Segmentation example.jpg +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/batch/__init__.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/batch/input.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/batch/integrity.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/batch/pipeline.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/batch/prompt.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/batch/test.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/batch/update.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/batch/utils.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/batch/values.txt +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/_napari_widgets.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/animation.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/help_module.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/layout.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/napari_visualiser.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/screenshot/general_help_screenshot.png +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/screenshot/mapping_help_screenshot.png +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/screenshot/segmentation_help_screenshot.png +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/gui/testing.ipynb +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/hints.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/interface/__init__.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/interface/image.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/interface/inoutput.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/interface/testing.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/napari_detection_example.png +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/__init__.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/_colocalisation.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/_custom_errors.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/_preprocess.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/_signaltonoise.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/actions.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/detection.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/segmentation.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/spots.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/test.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/testing.ipynb +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/utils.py +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/requirements.txt +0 -0
- {small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/utils.py +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: small_fish_gui
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.4
|
|
4
4
|
Summary: Small Fish is a python application for the analysis of smFish images. It provides a ready to use graphical interface to combine famous python packages for cell analysis without any need for coding.
|
|
5
5
|
Project-URL: Homepage, https://github.com/2Echoes/small_fish
|
|
6
|
+
Project-URL: Wiki, https://github.com/2Echoes/small_fish_gui/wiki
|
|
6
7
|
Project-URL: Issues, https://github.com/2Echoes/small_fish/issues
|
|
7
8
|
Author-email: Slimani Floric <floric.slimani@live.com>
|
|
8
9
|
License-File: LICENSE
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "small_fish_gui"
|
|
7
|
-
version = "1.9.
|
|
7
|
+
version = "1.9.4"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Slimani Floric", email="floric.slimani@live.com" },
|
|
10
10
|
]
|
|
@@ -38,4 +38,5 @@ dependencies = [
|
|
|
38
38
|
|
|
39
39
|
[project.urls]
|
|
40
40
|
Homepage = "https://github.com/2Echoes/small_fish"
|
|
41
|
+
Wiki = "https://github.com/2Echoes/small_fish_gui/wiki"
|
|
41
42
|
Issues = "https://github.com/2Echoes/small_fish/issues"
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
***INSTALATTION ISSUE : Currently the package cannot be installed due to a package deletion on pypi. I will migrate the code to a free, open source gui package and update the dependecies list***
|
|
2
|
-
|
|
3
|
-
--> Requirements have been updated, pip installation is still not working but it is possible to install through git cloning
|
|
4
|
-
|
|
5
1
|
# Small Fish
|
|
6
2
|
**Small Fish** is a python application for the analysis of smFish images. It provides a ready to use graphical interface to combine famous python packages for cell analysis without any need for coding.
|
|
7
3
|
|
|
@@ -99,9 +95,10 @@ Note that for training it is recommended to first set up your GPU as training co
|
|
|
99
95
|
Optional features to include in future versions :
|
|
100
96
|
|
|
101
97
|
**Major Dev**
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
* time stack (which would include cell tracking)
|
|
99
|
+
* 3D segmentation
|
|
104
100
|
|
|
105
101
|
**Minor features**
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
* allows npz files with multiple masks in load segmentation by asking user which one to select
|
|
103
|
+
* fix parquet format or replace to another compressed format
|
|
104
|
+
* In Napari viewer, or add an extra spot layer to visualsize spots that are in foci or color spots that are in clusters in specific color.
|
|
@@ -36,6 +36,5 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
36
36
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
37
37
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
38
38
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
39
|
-
|
|
40
39
|
"""
|
|
41
|
-
__version__ = "1.9.
|
|
40
|
+
__version__ = "1.9.4"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import sys, subprocess, traceback, os, re
|
|
2
|
+
from small_fish_gui import __version__
|
|
3
|
+
|
|
4
|
+
def main():
|
|
5
|
+
import small_fish_gui.pipeline.main
|
|
6
|
+
|
|
7
|
+
def _get_version() :
|
|
8
|
+
return __version__
|
|
9
|
+
|
|
10
|
+
AVAILABLE_ARGUMENTS = {
|
|
11
|
+
('-v','--v','--version') : "Prompt the software version.",
|
|
12
|
+
('--launch', '-l') : "Launch small fish gui, equivalent to no arguments.",
|
|
13
|
+
('-h', '--help', '--h') : "Prompt this help menu."
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
def is_last_version() :
|
|
17
|
+
|
|
18
|
+
query = subprocess.run([sys.executable, '-m', 'pip', 'index', 'versions', 'small_fish_gui'], capture_output=True, text=True)
|
|
19
|
+
all_version = query.stdout.split(',')
|
|
20
|
+
latest_version = all_version[0]
|
|
21
|
+
regex = r"\d+\.\d+\.\d+"
|
|
22
|
+
latest = re.findall(regex, latest_version)
|
|
23
|
+
|
|
24
|
+
current_version = _get_version()
|
|
25
|
+
|
|
26
|
+
if len(latest) == 0 :
|
|
27
|
+
return current_version
|
|
28
|
+
else :
|
|
29
|
+
return current_version == latest[-1]
|
|
30
|
+
|
|
31
|
+
if __name__ == "__main__":
|
|
32
|
+
|
|
33
|
+
if not is_last_version() :
|
|
34
|
+
print("A new version of Small Fish is available. To update close small fish and type :\npip install --upgrade small_fish_gui")
|
|
35
|
+
|
|
36
|
+
try :
|
|
37
|
+
arguments = sys.argv
|
|
38
|
+
|
|
39
|
+
if len(arguments) > 1 :
|
|
40
|
+
if arguments[1] in ['-v','--v','--version'] :
|
|
41
|
+
print(_get_version())
|
|
42
|
+
quit()
|
|
43
|
+
elif arguments[1] in ['--launch', '-l'] :
|
|
44
|
+
pass
|
|
45
|
+
elif arguments[1] in ['-h', '--help', '--h'] :
|
|
46
|
+
for key, help in AVAILABLE_ARGUMENTS.items() :
|
|
47
|
+
print(f"{key} : {help}")
|
|
48
|
+
quit()
|
|
49
|
+
else :
|
|
50
|
+
print(f"Incorrect argument : {arguments}, to launch small fish don't pass any argument or pick amongst {AVAILABLE_ARGUMENTS.keys()}")
|
|
51
|
+
|
|
52
|
+
sys.exit(main())
|
|
53
|
+
|
|
54
|
+
except Exception as error :
|
|
55
|
+
with open("error_log.txt",'a') as error_log :
|
|
56
|
+
error_log.writelines([
|
|
57
|
+
f"version {_get_version()}",
|
|
58
|
+
f"error : {error}",
|
|
59
|
+
f"traceback :\n{traceback.format_exc()}",
|
|
60
|
+
])
|
|
61
|
+
|
|
62
|
+
print(f"error_log saved at {os.getcwd()}/error_log.txt. Please consider reporting this by opening an issue on github.")
|
|
@@ -15,6 +15,7 @@ from .prompts import ask_cancel_detection
|
|
|
15
15
|
from .prompts import ask_cancel_segmentation
|
|
16
16
|
from .prompts import ask_help
|
|
17
17
|
from .prompts import ask_detection_confirmation
|
|
18
|
+
from .prompts import prompt_restore_main_menu
|
|
18
19
|
|
|
19
20
|
#Helpers to build windows
|
|
20
21
|
from .layout import parameters_layout
|
|
@@ -222,7 +222,6 @@ def detection_parameters_promt(
|
|
|
222
222
|
else : values['dim'] = 2
|
|
223
223
|
return values
|
|
224
224
|
|
|
225
|
-
|
|
226
225
|
def ask_replace_file(filename:str) :
|
|
227
226
|
layout = [
|
|
228
227
|
[sg.Text("{0} already exists, replace ?")],
|
|
@@ -341,7 +340,6 @@ def ask_cancel_detection() :
|
|
|
341
340
|
else :
|
|
342
341
|
return True
|
|
343
342
|
|
|
344
|
-
|
|
345
343
|
def ask_confirmation(question_displayed : str) :
|
|
346
344
|
layout =[
|
|
347
345
|
[sg.Text(question_displayed, font= 'bold 10')],
|
|
@@ -355,7 +353,6 @@ def ask_confirmation(question_displayed : str) :
|
|
|
355
353
|
else :
|
|
356
354
|
return True
|
|
357
355
|
|
|
358
|
-
|
|
359
356
|
def prompt_save_segmentation() -> 'dict[Literal["folder","filename","ext"]]':
|
|
360
357
|
while True :
|
|
361
358
|
relaunch = False
|
|
@@ -406,4 +403,29 @@ def prompt_load_segmentation() -> 'dict[Literal["nucleus","cytoplasm"]]':
|
|
|
406
403
|
if not relaunch : break
|
|
407
404
|
|
|
408
405
|
|
|
409
|
-
return values
|
|
406
|
+
return values
|
|
407
|
+
|
|
408
|
+
def prompt_restore_main_menu() -> bool :
|
|
409
|
+
"""
|
|
410
|
+
Warn user that software will try to go back to main menu while saving parameters, and propose to save results and quit if stuck.
|
|
411
|
+
|
|
412
|
+
Returns True if user want to save and quit else False, to raise error close window.
|
|
413
|
+
"""
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
layout = [
|
|
417
|
+
[sg.Text("An error was caught while proceeding.\nSoftware can try to save parameters and return to main menu or save results and quit.")],
|
|
418
|
+
[sg.Button("Return to main menu", key='menu'), sg.Button("Save and quit", key='save')]
|
|
419
|
+
]
|
|
420
|
+
|
|
421
|
+
window = sg.Window('small fish', layout=layout, margins=(10,10), auto_size_text=True, resizable=True)
|
|
422
|
+
event, values = window.read(close=True)
|
|
423
|
+
|
|
424
|
+
if event is None :
|
|
425
|
+
return None
|
|
426
|
+
elif event == "save" :
|
|
427
|
+
return True
|
|
428
|
+
elif event == "menu" :
|
|
429
|
+
return False
|
|
430
|
+
else :
|
|
431
|
+
raise AssertionError("Unforseen answer")
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
This script is called when software starts; it is the main loop.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import traceback
|
|
5
6
|
import pandas as pd
|
|
6
7
|
import FreeSimpleGUI as sg
|
|
7
|
-
from ..gui import hub_prompt
|
|
8
|
+
from ..gui import hub_prompt, prompt_restore_main_menu
|
|
8
9
|
from .actions import add_detection, save_results, compute_colocalisation, delete_acquisitions, rename_acquisitions, save_segmentation, load_segmentation, segment_cells
|
|
9
10
|
from ._preprocess import clean_unused_parameters_cache
|
|
10
11
|
from ..batch import batch_promp
|
|
@@ -109,5 +110,21 @@ while True : #Break this loop to close small_fish
|
|
|
109
110
|
|
|
110
111
|
except Exception as error :
|
|
111
112
|
sg.popup(str(error))
|
|
112
|
-
|
|
113
|
+
|
|
114
|
+
save_quit = prompt_restore_main_menu()
|
|
115
|
+
|
|
116
|
+
if save_quit is None :
|
|
117
|
+
raise error
|
|
118
|
+
|
|
119
|
+
elif save_quit :
|
|
120
|
+
save_results(
|
|
121
|
+
result_df=result_df,
|
|
122
|
+
cell_result_df=cell_result_df,
|
|
123
|
+
global_coloc_df=global_coloc_df,
|
|
124
|
+
cell_coloc_df = cell_coloc_df,
|
|
125
|
+
)
|
|
126
|
+
quit()
|
|
127
|
+
else :
|
|
128
|
+
continue
|
|
129
|
+
|
|
113
130
|
quit()
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import sys, subprocess
|
|
2
|
-
import FreeSimpleGUI as sg
|
|
3
|
-
|
|
4
|
-
from small_fish_gui import __version__
|
|
5
|
-
|
|
6
|
-
def main():
|
|
7
|
-
import small_fish_gui.pipeline.main
|
|
8
|
-
|
|
9
|
-
def is_last_version() :
|
|
10
|
-
latest_version = str(subprocess.run([sys.executable, '-m', 'pip', 'install', '{}==random'.format('small_fish_gui')], capture_output=True, text=True))
|
|
11
|
-
latest_version = latest_version[latest_version.find('(from versions:')+15:]
|
|
12
|
-
latest_version = latest_version[:latest_version.find(')')]
|
|
13
|
-
latest_version = latest_version.replace(' ','').split(',')[-1]
|
|
14
|
-
|
|
15
|
-
current_version = __version__
|
|
16
|
-
|
|
17
|
-
return current_version == latest_version
|
|
18
|
-
|
|
19
|
-
if __name__ == "__main__":
|
|
20
|
-
|
|
21
|
-
if not is_last_version() :
|
|
22
|
-
print("A new version of Small Fish is available. To update close small fish and type :\npip install --upgrade small_fish_gui")
|
|
23
|
-
|
|
24
|
-
try :
|
|
25
|
-
sys.exit(main())
|
|
26
|
-
except Exception as error :
|
|
27
|
-
sg.popup("Sorry. Something went wrong...\nIf you have some time to spare could you please communicate the error you encountered (next window) on :\nhttps://github.com/2Echoes/small_fish/issues.")
|
|
28
|
-
sg.popup_error_with_traceback(error)
|
|
29
|
-
raise error
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/napari_detection_example.png
RENAMED
|
File without changes
|
|
File without changes
|
{small_fish_gui-1.9.3 → small_fish_gui-1.9.4}/src/small_fish_gui/pipeline/_colocalisation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|