You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`atp-analysis`: Run the fibre type 1 vs type 2 analysis on...
19
-
-`docs`: Generate documentation
20
-
-`he-analysis`: Run the nuclei position analysis on HE and...
21
-
-`sdh-analysis`: Run the mitochondiral analysis and...
18
+
*`sdh-analysis`: Run the mitochondrial analysis and...
19
+
*`he-analysis`: Run the nuclei position analysis on HE and...
20
+
*`atp-analysis`: Run the fibre type 1 vs type 2 analysis on...
21
+
*`tui`: Open Textual TUI.
22
+
*`generate-docs`: Generate markdown version of usage...
22
23
23
-
## `myoquant atp-analysis`
24
+
## `myoquant sdh-analysis`
24
25
25
-
Run the fibre type 1 vs type 2 analysis on ATP images.
26
-
First input arguments and option are printed in stdout and all modules are imported. Then the input image is mask with the binary mask if provided.
27
-
Then depending on the presence of cellpose , Cellpose is run or not and mask accordingly if binary mask is provided.
28
-
Finally the ATP analysis is run with run_atp_analysis() function and the results are saved in the output folder and some info are printed in stdout.
26
+
Run the mitochondrial analysis and quantification on the image.
27
+
First input arguments and option are printed in stdout and all modules are imported and latest SDH model is downloaded.
28
+
Then the input image is mask with the binary mask if provided.
29
+
Then depending on the presence of cellpose path, Cellpose is run or not and mask accordingly if binary mask is provided.
30
+
Finally, the mitochondrial classification is run with run_sdh_analysis() function and the results are saved in the output folder and some info are printed in stdout.
29
31
30
32
**Usage**:
31
33
32
34
```console
33
-
$ myoquant atp-analysis [OPTIONS] IMAGE_PATH
35
+
$ myoquant sdh-analysis [OPTIONS] IMAGE_PATH
34
36
```
35
37
36
38
**Arguments**:
37
39
38
-
-`IMAGE_PATH`: The ATP image file path to analyse. [required]
40
+
*`IMAGE_PATH`: The image file path to analyse. \[required]
39
41
40
42
**Options**:
41
43
42
-
-`--mask-path FILE`: The path to a binary mask to hide slide region during analysis. It needs to be of the same resolution as input image and only pixel marked as 1 will be analyzed.
43
-
-`--cellpose-path FILE`: The pre-computed CellPose mask to use for analysis. Will run Cellpose if no path provided. Required as an image file.
44
-
-`--output-path PATH`: The path to the folder to save the results. Will save in the same folder as input image if not specified.
45
-
-`--intensity-threshold INTEGER RANGE`: Fiber intensity threshold to differenciate between the two fiber types. If not specified, the analysis will try to deduce it. [1<=x<=254]
46
-
-`--cellpose-diameter INTEGER`: Approximative single cell diameter in pixel for CellPose detection. If not specified, Cellpose will try to deduce it.
47
-
-`--channel INTEGER`: Image channel to use for the analysis. If not specified, the analysis will be performed on all three channels.
48
-
-`--channel-first / --no-channel-first`: If the channel is the first dimension of the image, set this to True. False by default. [default: no-channel-first]
49
-
-`--rescale-exposure / --no-rescale-exposure`: Rescale the image exposure if your image is not in the 0 255 forma, False by default. [default: no-rescale-exposure]
50
-
-`--n-classes INTEGER RANGE`: The number of classes of cell to detect. If not specified this is defaulted to two classes. [default: 2; x<=10]
51
-
-`--intensity-method TEXT`: The method to use to compute the intensity of the cell. Can be either 'median' or 'mean'. [default: median]
52
-
-`--erosion INTEGER RANGE`: Perform an erosion on the cells images to remove signal in the cell membrane (usefull for fluo). Expressed in percentage of the cell radius [default: False; x<=45]
53
-
-`--export-map / --no-export-map`: Export the original image with cells painted by classification label. [default: export-map]
54
-
-`--export-stats / --no-export-stats`: Export per fiber and per nuclei stat table. [default: export-stats]
55
-
-`--help`: Show this message and exit.
56
-
57
-
## `myoquant docs`
58
-
59
-
Generate documentation
44
+
*`--mask-path FILE`: The path to a binary mask to hide slide region during analysis. It needs to be of the same resolution as input image and only pixel marked as 1 will be analyzed.
45
+
*`--cellpose-path FILE`: The pre-computed CellPose mask to use for analysis. Will run Cellpose if no path provided. Required as an image file.
46
+
*`--output-path PATH`: The path to the folder to save the results. Will save in the current folder if not specified.
47
+
*`--cellpose-diameter INTEGER`: Approximative single cell diameter in pixel for CellPose detection. If not specified, Cellpose will try to deduce it.
48
+
*`--export-map / --no-export-map`: Export the original image with cells painted by classification label. \[default: export-map]
49
+
*`--export-stats / --no-export-stats`: Export per fiber stat table. \[default: export-stats]
50
+
*`--help`: Show this message and exit.
51
+
52
+
## `myoquant he-analysis`
53
+
54
+
Run the nuclei position analysis on HE and fluo images.
55
+
First input arguments and option are printed in stdout and all modules are imported. Then the input image is mask with the binary mask if provided.
56
+
Then depending on the presence of cellpose and stardist path, Cellpose and Stardist are run or not and mask accordingly if binary mask is provided.
57
+
Finally, the nuclei analysis is run with run_he_analysis() function and the results are saved in the output folder and some info are printed in stdout.
60
58
61
59
**Usage**:
62
60
63
61
```console
64
-
$ myoquant docs [OPTIONS] COMMAND [ARGS]...
62
+
$ myoquant he-analysis [OPTIONS] IMAGE_PATH
65
63
```
66
64
67
-
**Options**:
65
+
**Arguments**:
68
66
69
-
-`--help`: Show this message and exit.
67
+
*`IMAGE_PATH`: The HE image file path to analyse. If using single channel images, this will be used as cytoplasm image to run CellPose. Please use the --fluo-nuc option to indicate the path to the nuclei single image to run Stardist. \[required]
70
68
71
-
**Commands**:
69
+
**Options**:
72
70
73
-
-`generate`: Generate markdown version of usage...
71
+
*`--mask-path FILE`: The path to a binary mask to hide slide region during analysis. It needs to be of the same resolution as input image and only pixel marked as 1 will be analyzed.
72
+
*`--cellpose-path FILE`: The pre-computed CellPose mask to use for analysis. Will run Cellpose if no path provided. Required as an image file.
73
+
*`--stardist-path FILE`: The pre-computed Stardist mask to use for analysis. Will run Stardist if no path provided. Required as an image file.
74
+
*`--output-path PATH`: The path to the folder to save the results. Will save in the same folder as input image if not specified.
75
+
*`--cellpose-diameter INTEGER`: Approximative single cell diameter in pixel for CellPose detection. If not specified, Cellpose will try to deduce it.
*`--prob-thresh FLOAT RANGE`: Probability Threshold for Stardist nuclei detection. \[default: 0.5; 0.5<=x<=1]
78
+
*`--eccentricity-thresh FLOAT RANGE`: Eccentricity threshold value for a nucleus to be considered as internalized during nuclei classification. When very close to 1 almost all nuclei are considered as internalized. \[default: 0.75; 0<=x<=1]
79
+
*`--export-map / --no-export-map`: Export the original image with cells painted by classification label. \[default: export-map]
80
+
*`--export-stats / --no-export-stats`: Export per fiber and per nuclei stat table. \[default: export-stats]
81
+
*`--fluo-nuc FILE`: The path to single channel fluo image for nuclei.
82
+
*`--help`: Show this message and exit.
74
83
75
-
###`myoquant docs generate`
84
+
## `myoquant atp-analysis`
76
85
77
-
Generate markdown version of usage documentation
86
+
Run the fibre type 1 vs type 2 analysis on ATP images.
87
+
First input arguments and option are printed in stdout and all modules are imported. Then the input image is mask with the binary mask if provided.
88
+
Then depending on the presence of cellpose , Cellpose is run or not and mask accordingly if binary mask is provided.
89
+
Finally, the ATP analysis is run with run_atp_analysis() function and the results are saved in the output folder and some info are printed in stdout.
78
90
79
91
**Usage**:
80
92
81
93
```console
82
-
$ myoquant docs generate [OPTIONS]
94
+
$ myoquant atp-analysis [OPTIONS] IMAGE_PATH
83
95
```
84
96
85
-
**Options**:
97
+
**Arguments**:
86
98
87
-
-`--name TEXT`: The name of the CLI program to use in docs.
88
-
-`--output FILE`: An output file to write docs to, like README.md.
89
-
-`--help`: Show this message and exit.
99
+
*`IMAGE_PATH`: The ATP image file path to analyse. \[required]
90
100
91
-
## `myoquant he-analysis`
101
+
**Options**:
92
102
93
-
Run the nuclei position analysis on HE and fluo images.
94
-
First input arguments and option are printed in stdout and all modules are imported. Then the input image is mask with the binary mask if provided.
95
-
Then depending on the presence of cellpose and stardist path, Cellpose and Stardist are run or not and mask accordingly if binary mask is provided.
96
-
Finally the nuclei analysis is run with run_he_analysis() function and the results are saved in the output folder and some info are printed in stdout.
103
+
*`--mask-path FILE`: The path to a binary mask to hide slide region during analysis. It needs to be of the same resolution as input image and only pixel marked as 1 will be analyzed.
104
+
*`--cellpose-path FILE`: The pre-computed CellPose mask to use for analysis. Will run Cellpose if no path provided. Required as an image file.
105
+
*`--output-path PATH`: The path to the folder to save the results. Will save in the same folder as input image if not specified.
106
+
*`--intensity-threshold INTEGER RANGE`: Fiber intensity threshold to differenciate between the two fiber types. If not specified, the analysis will try to deduce it. [1<=x<=254]
107
+
*`--cellpose-diameter INTEGER`: Approximative single cell diameter in pixel for CellPose detection. If not specified, Cellpose will try to deduce it.
108
+
*`--channel INTEGER`: Image channel to use for the analysis. If not specified, the analysis will be performed on all three channels.
109
+
*`--channel-first / --no-channel-first`: If the channel is the first dimension of the image, set this to True. False by default. \[default: no-channel-first]
110
+
*`--rescale-exposure / --no-rescale-exposure`: Rescale the image exposure if your image is not in the 0 255 forma, False by default. \[default: no-rescale-exposure]
111
+
*`--n-classes INTEGER RANGE`: The number of classes of cell to detect. If not specified this is defaulted to two classes. \[default: 2; x<=10]
112
+
*`--intensity-method TEXT`: The method to use to compute the intensity of the cell. Can be either 'median' or 'mean'. \[default: median]
113
+
*`--erosion INTEGER RANGE`: Perform an erosion on the cells images to remove signal in the cell membrane (usefull for fluo). Expressed in percentage of the cell radius \[default: False; x<=45]
114
+
*`--export-map / --no-export-map`: Export the original image with cells painted by classification label. \[default: export-map]
115
+
*`--export-stats / --no-export-stats`: Export per fiber and per nuclei stat table. \[default: export-stats]
116
+
*`--help`: Show this message and exit.
117
+
118
+
## `myoquant tui`
119
+
120
+
Open Textual TUI.
97
121
98
122
**Usage**:
99
123
100
124
```console
101
-
$ myoquant he-analysis [OPTIONS] IMAGE_PATH
125
+
$ myoquant tui [OPTIONS]
102
126
```
103
127
104
-
**Arguments**:
105
-
106
-
-`IMAGE_PATH`: The HE image file path to analyse. If using single channel images, this will be used as cytoplasm image to run CellPose. Please use the --fluo-nuc option to indicate the path to the nuclei single image to run Stardist. [required]
107
-
108
128
**Options**:
109
129
110
-
-`--mask-path FILE`: The path to a binary mask to hide slide region during analysis. It needs to be of the same resolution as input image and only pixel marked as 1 will be analyzed.
111
-
-`--cellpose-path FILE`: The pre-computed CellPose mask to use for analysis. Will run Cellpose if no path provided. Required as an image file.
112
-
-`--stardist-path FILE`: The pre-computed Stardist mask to use for analysis. Will run Stardist if no path provided. Required as an image file.
113
-
-`--output-path PATH`: The path to the folder to save the results. Will save in the same folder as input image if not specified.
114
-
-`--cellpose-diameter INTEGER`: Approximative single cell diameter in pixel for CellPose detection. If not specified, Cellpose will try to deduce it.
-`--prob-thresh FLOAT RANGE`: Probability Threshold for Stardist nuclei detection. [default: 0.5; 0.5<=x<=1]
117
-
-`--eccentricity-thresh FLOAT RANGE`: Eccentricity threshold value for a nucleus to be considered as internalized during nuclei classification. When very close to 1 almost all nuclei are considered as internalized. [default: 0.75; 0<=x<=1]
118
-
-`--export-map / --no-export-map`: Export the original image with cells painted by classification label. [default: export-map]
119
-
-`--export-stats / --no-export-stats`: Export per fiber and per nuclei stat table. [default: export-stats]
120
-
-`--fluo-nuc FILE`: The path to single channel fluo image for nuclei.
121
-
-`--help`: Show this message and exit.
130
+
*`--help`: Show this message and exit.
122
131
123
-
## `myoquant sdh-analysis`
132
+
## `myoquant generate-docs`
124
133
125
-
Run the mitochondiral analysis and quantification on the image.
126
-
First input arguments and option are printed in stdout and all modules are imported and latest SDH model is downloaded.
127
-
Then the input image is mask with the binary mask if provided.
128
-
Then depending on the presence of cellpose path, Cellpose is run or not and mask accordingly if binary mask is provided.
129
-
Finally the mitochondiral classificaiton is run with run_sdh_analysis() function and the results are saved in the output folder and some info are printed in stdout.
134
+
Generate markdown version of usage documentation
130
135
131
136
**Usage**:
132
137
133
138
```console
134
-
$ myoquant sdh-analysis [OPTIONS] IMAGE_PATH
139
+
$ myoquant generate-docs [OPTIONS]
135
140
```
136
141
137
-
**Arguments**:
138
-
139
-
-`IMAGE_PATH`: The image file path to analyse. [required]
140
-
141
142
**Options**:
142
143
143
-
-`--mask-path FILE`: The path to a binary mask to hide slide region during analysis. It needs to be of the same resolution as input image and only pixel marked as 1 will be analyzed.
144
-
-`--cellpose-path FILE`: The pre-computed CellPose mask to use for analysis. Will run Cellpose if no path provided. Required as an image file.
145
-
-`--output-path PATH`: The path to the folder to save the results. Will save in the current folder if not specified.
146
-
-`--cellpose-diameter INTEGER`: Approximative single cell diameter in pixel for CellPose detection. If not specified, Cellpose will try to deduce it.
147
-
-`--export-map / --no-export-map`: Export the original image with cells painted by classification label. [default: export-map]
148
-
-`--export-stats / --no-export-stats`: Export per fiber stat table. [default: export-stats]
149
-
-`--help`: Show this message and exit.
144
+
*`--name TEXT`: The name of the CLI program to use in docs.
145
+
*`--output FILE`: An output file to write docs to, like README.md.
Copy file name to clipboardExpand all lines: README.md
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,10 @@ I recommend using UV for python environment management. See [UV documentation](h
34
34
35
35
## How to Use
36
36
37
+
#### **🆕 NEW:** MyoQuant now comes with a Text User Interface (TUI) for an easier discoverability of the different CLI parameter. **For this you can run `myoquant tui` or `uv run myoquant tui` to launch the TUI.**
38
+
39
+

40
+
37
41
To use the command-line tool, first activate your venv in which MyoQuant is installed: `source .venv/bin/activate` or simply install the package using UV.
38
42
Then you can perform SDH or HE analysis. You can use the command `myoquant --help` or `uv run myoquant --help` to list available commands.
39
43
@@ -66,9 +70,10 @@ For SDH Staining analysis, you can download this sample image: [HERE](https://ww
66
70
For ATP Staining analysis, you can download this sample image: [HERE](https://www.lbgi.fr/~meyer/SDH_models/sample_atp.jpg)
67
71
68
72
1. Example of successful SDH analysis output with: `myoquant sdh-analysis sample_sdh.jpg`
Copy file name to clipboardExpand all lines: src/myoquant/commands/run_he.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ def he_analysis(
96
96
"""Run the nuclei position analysis on HE and fluo images.
97
97
First input arguments and option are printed in stdout and all modules are imported. Then the input image is mask with the binary mask if provided.
98
98
Then depending on the presence of cellpose and stardist path, Cellpose and Stardist are run or not and mask accordingly if binary mask is provided.
99
-
Finally the nuclei analysis is run with run_he_analysis() function and the results are saved in the output folder and some info are printed in stdout.
99
+
Finally, the nuclei analysis is run with run_he_analysis() function and the results are saved in the output folder and some info are printed in stdout.
0 commit comments