small-fish-gui 1.9.3__py3-none-any.whl → 1.10.0__py3-none-any.whl

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/README.md CHANGED
@@ -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
 
@@ -27,7 +23,7 @@ If you don't have a python installation yet I would recommend the [miniconda dis
27
23
  It is higly recommanded to create a specific [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) or [virtual](https://docs.python.org/3.6/library/venv.html) environnement to install small fish.
28
24
 
29
25
  ```bash
30
- conda create -n small_fish python=3.8
26
+ conda create -n small_fish python=3.9
31
27
  conda activate small_fish
32
28
  ```
33
29
  Then download the small_fish package :
@@ -99,9 +95,11 @@ 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
- - time stack (which would include cell tracking)
103
- - 3D segmentation
98
+ * time stack (which would include cell tracking)
99
+ * 3D segmentation
104
100
 
105
101
  **Minor features**
106
- - allows npz files with multiple masks in load segmentation by asking user which one to select
107
- - fix parquet format or replace to another compressed format
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.
105
+ * Foci merge tool in Napari
@@ -36,6 +36,9 @@ 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.3"
40
+ __version__ = "1.10.0"
41
+ __wiki__ = "https://github.com/2Echoes/small_fish_gui/wiki"
42
+
43
+ import os
44
+ os.environ["QT_QPA_PLATFORM"] = "xcb"
@@ -1,29 +1,52 @@
1
- import sys, subprocess
2
- import FreeSimpleGUI as sg
3
-
1
+ import sys, subprocess, re
4
2
  from small_fish_gui import __version__
5
3
 
4
+ AVAILABLE_ARGUMENTS = {
5
+ ('-v','--v','--version') : "Prompt the software version.",
6
+ ('--launch', '-l') : "Launch small fish gui, equivalent to no arguments.",
7
+ ('-h', '--help', '--h') : "Prompt this help menu."
8
+ }
9
+
10
+
6
11
  def main():
7
12
  import small_fish_gui.pipeline.main
8
13
 
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__
14
+ def _get_version() :
15
+ return __version__
16
16
 
17
- return current_version == latest_version
17
+ def is_last_version() :
18
+
19
+ query = subprocess.run([sys.executable, '-m', 'pip', 'index', 'versions', 'small_fish_gui'], capture_output=True, text=True)
20
+ all_version = query.stdout.split(',')
21
+ latest_version = all_version[0]
22
+ regex = r"\d+\.\d+\.\d+"
23
+ latest = re.findall(regex, latest_version)
24
+
25
+ current_version = _get_version()
26
+
27
+ if len(latest) == 0 :
28
+ return current_version
29
+ else :
30
+ return current_version == latest[-1]
18
31
 
19
32
  if __name__ == "__main__":
20
33
 
21
34
  if not is_last_version() :
22
35
  print("A new version of Small Fish is available. To update close small fish and type :\npip install --upgrade small_fish_gui")
23
36
 
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
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())
@@ -212,7 +212,7 @@ def batch_promp(
212
212
  #Hiding options for non batch mode
213
213
  window= window.finalize()
214
214
  napari_correction_elmt.update(disabled=True)
215
- get_elmt_from_key(tab_dict['Input'], key= 'image path').update(disabled=True)
215
+ get_elmt_from_key(tab_dict['Input'], key= 'image_path').update(disabled=True)
216
216
  for key in seg_keys_to_hide : get_elmt_from_key(tab_dict['Segmentation'], key=key).update(disabled=True)
217
217
  for key in detection_keys_to_hide : get_elmt_from_key(tab_dict['Detection'], key=key).update(disabled=True)
218
218
 
@@ -51,8 +51,8 @@ def update_detection_tab(
51
51
  deconvolution_kernel_z = get_elmt_from_key(tab_elmt, key= 'deconvolution_kernel_z')
52
52
 
53
53
  #Clustering
54
- cluster_size = get_elmt_from_key(tab_elmt, key= 'cluster size')
55
- min_number_of_spot = get_elmt_from_key(tab_elmt, key= 'min number of spots')
54
+ cluster_size = get_elmt_from_key(tab_elmt, key= 'cluster_size')
55
+ min_number_of_spot = get_elmt_from_key(tab_elmt, key= 'min_number_of_spots')
56
56
 
57
57
  #segmentation and multichannel
58
58
  nucleus_channel_signal = get_elmt_from_key(tab_elmt, key= 'nucleus channel signal')
@@ -2,7 +2,7 @@ List of keys for batch 'values' dict instance :
2
2
 
3
3
  Batch_folder
4
4
  0
5
- image path
5
+ image_path
6
6
  3D stack
7
7
  multichannel
8
8
  Dense regions deconvolution
@@ -5,7 +5,6 @@ This subpackge contains code related to graphical interface
5
5
  from .prompts import _error_popup
6
6
  from .prompts import _warning_popup
7
7
  from .prompts import prompt
8
- from .prompts import prompt_with_help
9
8
  from .prompts import input_image_prompt
10
9
  from .prompts import hub_prompt
11
10
  from .prompts import detection_parameters_promt
@@ -13,8 +12,8 @@ from .prompts import coloc_prompt
13
12
  from .prompts import output_image_prompt
14
13
  from .prompts import ask_cancel_detection
15
14
  from .prompts import ask_cancel_segmentation
16
- from .prompts import ask_help
17
15
  from .prompts import ask_detection_confirmation
16
+ from .prompts import prompt_restore_main_menu
18
17
 
19
18
  #Helpers to build windows
20
19
  from .layout import parameters_layout