-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/rt cetsa #541
base: master
Are you sure you want to change the base?
Feat/rt cetsa #541
Changes from all commits
18597dc
b058e2a
df1b7d8
f4dc409
2ee3cf5
7657bde
f11ce9d
fb6ecad
052d189
2550cdf
ad82637
618cd30
a6a9b28
7140088
9fcde28
d813629
cdd1662
2d2b4c1
d6c8c37
f3849c3
3345e3d
c884aec
ece52fc
82362f5
bf32f5c
9ba335b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[bumpversion] | ||
current_version = 0.2.0-dev0 | ||
commit = True | ||
tag = False | ||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<dev>\d+))? | ||
serialize = | ||
{major}.{minor}.{patch}-{release}{dev} | ||
{major}.{minor}.{patch} | ||
|
||
[bumpversion:part:release] | ||
optional_value = _ | ||
first_value = dev | ||
values = | ||
dev | ||
_ | ||
|
||
[bumpversion:part:dev] | ||
|
||
[bumpversion:file:pyproject.toml] | ||
search = version = "{current_version}" | ||
replace = version = "{new_version}" | ||
|
||
[bumpversion:file:plugin.json] | ||
|
||
[bumpversion:file:VERSION] | ||
|
||
[bumpversion:file:README.md] | ||
|
||
[bumpversion:file:src/polus/images/features/rt_cetsa_intensity_extraction/__init__.py] | ||
|
||
[bumpversion:file:ict.yml] | ||
|
||
[bumpversion:file:rt_cetsa_intensity_extraction.cwl] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM polusai/bfio:2.1.9 | ||
|
||
# environment variables defined in polusai/bfio | ||
ENV EXEC_DIR="/opt/executables" | ||
ENV POLUS_IMG_EXT=".ome.tif" | ||
ENV POLUS_TAB_EXT=".csv" | ||
ENV POLUS_LOG="INFO" | ||
|
||
# Work directory defined in the base container | ||
WORKDIR ${EXEC_DIR} | ||
|
||
COPY pyproject.toml ${EXEC_DIR} | ||
COPY VERSION ${EXEC_DIR} | ||
COPY README.md ${EXEC_DIR} | ||
COPY src ${EXEC_DIR}/src | ||
|
||
RUN apt-get -y update | ||
RUN apt-get -y install git | ||
|
||
RUN pip3 install ${EXEC_DIR} --no-cache-dir | ||
|
||
ENTRYPOINT ["python3", "-m", "polus.images.features.rt_cetsa_intensity_extraction"] | ||
CMD ["--help"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# RT_CETSA Intensity Extraction Tool (v0.2.0-dev0) | ||
|
||
This tool runs well intensities extraction for the RT-CETSA pipeline. | ||
|
||
## Building | ||
|
||
To build the Docker image for the conversion plugin, run | ||
`./build-docker.sh`. | ||
|
||
## Install WIPP Plugin | ||
|
||
If WIPP is running, navigate to the plugins page and add a new plugin. Paste the contents of `plugin.json` into the pop-up window and submit. | ||
|
||
## Options | ||
|
||
This plugin takes eight input argument and one output argument: | ||
|
||
| Name | Description | I/O | Type | | ||
|-----------------|----------------------------------------------------|--------|-------------| | ||
| `--inpDir` | Input data collection to be processed by this tool | Input | genericData | | ||
| `--filePattern` | Pattern to parse input files | Input | string | | ||
| `--outDir` | Output file | Output | genericData | | ||
| `--preview` | Generate JSON file with outputs | Output | JSON | Optional | ||
| `--params` | Plate params to use | Output | JSON | Optional | ||
| `--temp` | Temperature range. Default to [37,90] | Output | JSON | Optional | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.2.0-dev0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
version=$(<VERSION) | ||
docker build . -t polusai/rt-cetsa-intensity-extraction-tool:"${version}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
author: | ||
- Nick Schaub | ||
- Antoine Gerardin | ||
- Najib Ishaq | ||
contact: [email protected] | ||
container: polusai/rt-cetsa-intensity-extraction-tool:0.2.0-dev0 | ||
description: Extract well intensities from RT-CETSA plate images and masks. | ||
entrypoint: python3 -m polus.images.features.rt_cetsa_intensity_extraction | ||
inputs: | ||
- description: Input data collection to be processed by this tool | ||
format: | ||
- inpDir | ||
name: inpDir | ||
required: true | ||
type: path | ||
- description: filename of the plate params | ||
format: | ||
- params | ||
name: params | ||
required: false | ||
type: string | ||
- description: temp interval on which to collect intensities | ||
format: | ||
- temp | ||
name: temp | ||
required: false | ||
type: array[int] | ||
- description: Filepattern to parse input files | ||
format: | ||
- filePattern | ||
name: filePattern | ||
required: false | ||
type: string | ||
- description: Generate an output preview. | ||
format: | ||
- preview | ||
name: preview | ||
required: false | ||
type: boolean | ||
name: polusai/RTCETSAIntensityExtraction | ||
outputs: | ||
- description: Output data | ||
format: | ||
- outDir | ||
name: outDir | ||
required: true | ||
type: path | ||
repository: https://github.com/PolusAI/image-tools | ||
specVersion: 1.0.0 | ||
title: RT-CETSA Intensity Extraction | ||
ui: | ||
- description: Input data collection | ||
key: inputs.inpDir | ||
title: Input data collection | ||
type: path | ||
- description: Filepattern to parse input files | ||
key: inputs.pattern | ||
title: pattern | ||
type: text | ||
- description: Plate params to use | ||
key: inputs.params | ||
title: Plate Params | ||
type: text | ||
- description: Temperature interval | ||
key: inputs.temp | ||
title: Temperature interval | ||
type: text | ||
- description: Generate an output preview. | ||
key: inputs.preview | ||
title: Preview example output of this plugin | ||
type: checkbox | ||
version: 0.2.0-dev0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"name": "RT-CETSA Intensity Extraction", | ||
"version": "0.2.0-dev0", | ||
"title": "RT-CETSA Intensity Extraction", | ||
"description": "Extract well intensities from RT-CETSA images and masks.", | ||
"author": "Nicholas Schaub ([email protected]), Antoine Gerardin ([email protected]), Najib Ishaq ([email protected])", | ||
"institution": "National Center for Advancing Translational Sciences, National Institutes of Health", | ||
"repository": "https://github.com/PolusAI/image-tools", | ||
"website": "https://ncats.nih.gov/preclinical/core/informatics", | ||
"citation": "", | ||
"containerId": "polusai/rt-cetsa-intensity-extraction-tool:0.2.0-dev0", | ||
"baseCommand": [ | ||
"python3", | ||
"-m", | ||
"polus.images.features.rt_cetsa_intensity_extraction" | ||
], | ||
"inputs": [ | ||
{ | ||
"name": "inpDir", | ||
"type": "genericData", | ||
"description": "RT_Cetsa image collection to be processed by this tool.", | ||
"required": true | ||
}, | ||
{ | ||
"name": "filePattern", | ||
"type": "string", | ||
"description": "filePattern to parse input files.", | ||
"default": ".+", | ||
"required": false | ||
}, | ||
{ | ||
"name": "preview", | ||
"type": "boolean", | ||
"description": "Generate preview of outputs.", | ||
"required": false | ||
}, | ||
{ | ||
"name": "params", | ||
"type": "boolean", | ||
"description": "Plate params to use.", | ||
"required": false | ||
}, | ||
{ | ||
"name": "temp", | ||
"type": "boolean", | ||
"description": "Temperature range. Default to [37,90].", | ||
"required": false | ||
} | ||
Comment on lines
+37
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The types for these are listed as JSON in the README, string in the ICT and boolean here. What is the actual type? |
||
], | ||
"outputs": [ | ||
{ | ||
"name": "outDir", | ||
"type": "genericData", | ||
"description": "Output data collection." | ||
} | ||
], | ||
"ui": [ | ||
{ | ||
"key": "inputs.inpDir", | ||
"title": "Input collection", | ||
"description": "Input data collection to be processed by this plugin." | ||
}, | ||
{ | ||
"key": "inputs.mask", | ||
"title": "Mask", | ||
"description": "Mask to process plate image." | ||
}, | ||
{ | ||
"key": "inputs.filePattern", | ||
"title": "FilePattern", | ||
"description": "File Pattern to parse input files.", | ||
"default": ".+" | ||
}, | ||
{ | ||
"name": "inputs.params", | ||
"title": "Params", | ||
"description": "Plate params to use." | ||
}, | ||
{ | ||
"name": "inputs.temp", | ||
"title": "Temp", | ||
"description": "Temperature range. Default to [37,90]." | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
[tool.poetry] | ||
name = "polus_images_features_rt_cetsa_intensity_extraction" | ||
version = "0.2.0-dev0" | ||
description = "Extract well intensities from RT-CETSA plate images." | ||
authors = [ | ||
"Nick Schaub <[email protected]>", | ||
"Antoine Gerardin <[email protected]>", | ||
"Najib Ishaq <[email protected]>", | ||
] | ||
readme = "README.md" | ||
packages = [{include = "polus", from = "src"}] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9,<3.12" | ||
typer = "^0.7.0" | ||
filepattern = "^2.0.5" | ||
pandas = "^2.2.2" | ||
numpy = "^1.26.4" | ||
bfio = "^2.3.6" | ||
scikit-image = "^0.22.0" | ||
imagecodecs = "^2024.1.1" | ||
polus-images-segmentation-rt-cetsa-plate-extraction = {git = "https://github.com/agerardin/image-tools.git", branch = "feat/rt_cetsa", subdirectory = "segmentation/rt-cetsa-plate-extraction-tool"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This git link will need to be updated to either use the main repo from polusai and the master branch, or it should be changed to a local path dependency |
||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
bump2version = "^1.0.1" | ||
pre-commit = "^3.1.0" | ||
pytest = "^7.2.1" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.ruff] | ||
extend = "../../ruff.toml" | ||
extend-ignore = [ | ||
"RET505", # Unnecessary `else` after `return` statement | ||
"E501", # Line too long | ||
"ANN001", # Missing type annotation | ||
"D102", # Missing docstring in public method | ||
"ANN201", # Missing return type annotation | ||
"N806", # Variable in function should be lowercase | ||
"D205", # 1 blank line required between summary line and description | ||
"N803", # Argument name should be lowercase | ||
"PLR0913", # Too many arguments | ||
"D415", # First line should end with a period, question mark, or exclamation point | ||
"PLR2004", # Magic value used in comparison | ||
"B006", # Do not use mutable default arguments | ||
"D107", # Missing docstring | ||
"D101", # Missing docstring | ||
"E731", # Do not assign a lambda expression, use a def | ||
"E402", # Module level import not at top of file | ||
"PTH123", # `open()` should be replaced with `Path.open()` | ||
"PTH118", # `os.path.join()` should be replaced with `/` operator | ||
"PTH100", # `os.path.abspath()` should be replaced with `Path.resolve()` | ||
"PLR0915", # Too many statements | ||
"PLR0912", # Too many branches | ||
"C901", # Function is too complex | ||
"T201", # `print` used | ||
"E722", # Do not use bare 'except' | ||
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling | ||
"ANN202", # Missing return type annotation for private function | ||
"ARG002", # Unused method argument | ||
"N802", # Function name should be lowercase | ||
"PTH103", # `os.makedirs()` should be replaced with `Path.mkdir(parents=True)` | ||
"ANN003", # Missing type annotation for `**kwargs` | ||
"B007", # Loop control variable not used within the loop body | ||
"ANN204", # Missing return type annotation for magic method | ||
"D417", # Missing argument descriptions in the docstring | ||
"ANN205", # Missing return type annotation for static method | ||
"PLR5501", # Use `elif` instead of `else` following `if` condition to avoid unnecessary indentation | ||
"EM102", # Exception must not use an f-string literal | ||
"D414", # Section has no content | ||
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` | ||
"A001", # Variable `input` is shadowing a Python builtin | ||
"A002", # Argument `input` is shadowing a Python builtin | ||
"E741", # Ambiguous variable name: `l` | ||
"PTH120", # `os.path.dirname()` should be replaced by `Path.parent` | ||
"N816", # Variable `cfFilename` in global scope should not be mixedCase | ||
"PTH109", # `os.getcwd()` should be replaced by `Path.cwd()` | ||
"ARG001", # Unused function argument | ||
"S101", # Use of assert detected | ||
"D103", # Missing docstring in public function | ||
"D100", # Missing docstring in public module | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
class: CommandLineTool | ||
cwlVersion: v1.2 | ||
inputs: | ||
inpDir: | ||
inputBinding: | ||
prefix: --inpDir | ||
type: Directory | ||
mask: | ||
inputBinding: | ||
prefix: --mask | ||
type: string? | ||
filePattern: | ||
inputBinding: | ||
prefix: --filePattern | ||
type: string? | ||
outDir: | ||
inputBinding: | ||
prefix: --outDir | ||
type: Directory | ||
params: | ||
inputBinding: | ||
prefix: --params | ||
type: string? | ||
temp: | ||
type: int[]? | ||
inputBinding: | ||
prefix: -temp= | ||
itemSeparator: " " | ||
separate: false | ||
preview: | ||
inputBinding: | ||
prefix: --preview | ||
type: boolean? | ||
outputs: | ||
outDir: | ||
outputBinding: | ||
glob: $(inputs.outDir.basename) | ||
type: Directory | ||
requirements: | ||
DockerRequirement: | ||
dockerPull: polusai/rt-cetsa-intensity-extraction-tool:0.2.0-dev0 | ||
InitialWorkDirRequirement: | ||
listing: | ||
- entry: $(inputs.outDir) | ||
writable: true | ||
InlineJavascriptRequirement: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three lines need an additional column in the table.