-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/rt cetsa tools #9
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
Open
agerardin
wants to merge
18
commits into
PolusAI:main
Choose a base branch
from
agerardin:feat/rt_cetsa_tools
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a714aea
feat: added tool
nishaq503 08097f3
chore: added ict.yml file
nishaq503 ec94a09
fix: moltenprot tool.
agerardin c0a0bad
feat: containerized and cwl-able
agerardin d1815fa
feat: add rt_cetsa analysis.
agerardin 6233b6e
feat: rt_Cetsa analysis tool, containerized.
agerardin a64ec3c
feat: update for running tools in rt_cetsa dashboard.
agerardin 1a34c2a
feat: update analysis tool before PR.
agerardin 1b9a4c6
chore: refactor moltenprot
agerardin b50a884
feat: review api. Removed filepattern.
agerardin 15be753
Bump version: 0.1.0 → 0.2.0-dev0
agerardin 74e7928
fix: add version in __init__.py
agerardin a6f0504
Bump version: 0.1.0 → 0.2.0-dev0
agerardin ec31dd9
chore: refactor code for dashboard integration.
agerardin e17bb38
dev: add tests to satisfy git actions
agerardin d54b950
fix: values and params and not required.
agerardin 2f272be
fix: values and params and not required.
agerardin bff4e9d
fix cwl.
agerardin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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:VERSION] | ||
|
|
||
| [bumpversion:file:pyproject.toml] | ||
| search = version = "{current_version}" | ||
| replace = version = "{new_version}" | ||
|
|
||
| [bumpversion:file:README.md] | ||
|
|
||
| [bumpversion:file:src/polus/tabular/regression/rt_cetsa_analysis/__init__.py] | ||
|
|
||
| [bumpversion:file:plugin.json] | ||
|
|
||
| [bumpversion:file:ict.yml] | ||
|
|
||
| [bumpversion:file:rt_cetsa_analysis.cwl] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| tests/out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| FROM r-base:4.4.0 | ||
|
|
||
|
|
||
| ARG EXEC_DIR="/opt/executables" | ||
|
|
||
| RUN apt-get update && apt-get install -y python3 | ||
|
|
||
| #Create folders | ||
| RUN mkdir -p ${EXEC_DIR} | ||
|
|
||
| # Install R packages external dependencies | ||
| RUN apt-get install -y libssl-dev \ | ||
| && apt-get install -y libcurl4-openssl-dev libfontconfig1-dev \ | ||
| && apt-get install -y libharfbuzz-dev libfribidi-dev \ | ||
| && apt-get install -y libxml2-dev \ | ||
| && apt-get install -y libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev \ | ||
| && apt-get install -y cmake | ||
|
|
||
| # Install required R packages | ||
| ADD requirements/Requirements_1.R ${EXEC_DIR}/Requirements_1.R | ||
| RUN Rscript ${EXEC_DIR}/Requirements_1.R | ||
|
|
||
| ADD requirements/Requirements_2.R ${EXEC_DIR}/Requirements_2.R | ||
| RUN Rscript ${EXEC_DIR}/Requirements_2.R | ||
|
|
||
| ADD requirements/Requirements_3.R ${EXEC_DIR}/Requirements_3.R | ||
| RUN Rscript ${EXEC_DIR}/Requirements_3.R | ||
|
|
||
| RUN apt-get install -y --allow-downgrades libxcb-render0=1.15-1 libxcb-shm0=1.15-1 libxcb1=1.15-1 | ||
| RUN apt-get install -y libcairo2-dev | ||
|
|
||
| ADD requirements/Requirements_4.R ${EXEC_DIR}/Requirements_4.R | ||
| RUN Rscript ${EXEC_DIR}/Requirements_4.R | ||
|
|
||
| RUN apt-get install -y libgit2-dev | ||
|
|
||
| ADD requirements/Requirements_6.R ${EXEC_DIR}/Requirements_6.R | ||
| RUN Rscript ${EXEC_DIR}/Requirements_6.R | ||
|
|
||
| ADD requirements/Requirements_5.R ${EXEC_DIR}/Requirements_5.R | ||
| RUN Rscript ${EXEC_DIR}/Requirements_5.R | ||
|
|
||
| COPY pyproject.toml ${EXEC_DIR} | ||
| COPY README.md ${EXEC_DIR} | ||
| RUN apt-get update && apt-get install -y python3 | ||
| RUN apt-get -y install python3-pip python3-venv | ||
| COPY src/ ${EXEC_DIR}/src | ||
| RUN pip3 install ${EXEC_DIR} --no-cache-dir --break-system-packages | ||
|
|
||
| WORKDIR ${EXEC_DIR} | ||
|
|
||
| # CMD ["Rscript", "main.R"] | ||
| CMD ["python3", "-m", "polus.tabular.regression.rt_cetsa_analysis"] | ||
| # CMD ["--help"] | ||
| # CMD ["bash"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # RT_CETSA Analysis Tool (v0.2.0-dev0) | ||
|
|
||
| This WIPP plugin runs statistical analysis 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` | File Pattern to parse input files | Input | string | | ||
| | `--outDir` | Output file | Output | genericData | | ||
| | `--preview` | Generate JSON file with outputs | Output | JSON | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 0.2.0-dev0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
|
|
||
| version=$(<VERSION) | ||
| docker build . -t polusai/rt-cetsa-analysis-tool:"${version}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| author: | ||
| - Nick Schaub | ||
| - Antoine Gerardin | ||
| - Najib Ishaq | ||
| contact: nick.schaub@nih.gov | ||
| container: polusai/rt-cetsa-analysis-simple-tool:0.2.0-dev0 | ||
| description: Run statisical analysis for the RT-CETSA pipeline. | ||
| entrypoint: python3 -m polus.tabular.regression.rt_cetsa_analysis | ||
| inputs: | ||
| - description: Fit params csv file | ||
| format: | ||
| - params | ||
| name: params | ||
| required: false | ||
| type: string | ||
| - description: Baseline corrected csv files | ||
| format: | ||
| - values | ||
| name: values | ||
| required: false | ||
| type: string | ||
| - description: platemap excel file | ||
| format: | ||
| - platemap | ||
| name: platemap | ||
| required: true | ||
| type: path | ||
| - description: Generate an output preview. | ||
| format: | ||
| - preview | ||
| name: preview | ||
| required: false | ||
| type: boolean | ||
| name: polusai/RTCETSAAnalysis | ||
| outputs: | ||
| - description: Output collection | ||
| format: | ||
| - outDir | ||
| name: outDir | ||
| required: true | ||
| type: path | ||
| repository: https://github.com/PolusAI/tabular-tools | ||
| specVersion: 1.0.0 | ||
| title: RT-CETSA Analysis | ||
| ui: | ||
| - description: Fit params csv file | ||
| key: inputs.params | ||
| title: Fit params csv file | ||
| type: string | ||
| - description: baseline corrected csv file | ||
| key: inputs.values | ||
| title: baseline corrected csv file | ||
| type: string | ||
| - description: platemap excel file | ||
| key: inputs.platemap | ||
| title: platemap excel file | ||
| type: path | ||
| - description: Generate an output preview. | ||
| key: inputs.preview | ||
| title: Preview example output of this plugin | ||
| type: checkbox | ||
| version: 0.2.0-dev0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| { | ||
| "name": "RT-CETSA Analysis", | ||
| "version": "0.2.0-dev0", | ||
| "title": "RT-CETSA Analysis", | ||
| "description": "Run statistical analysis for the RT-CETSA pipeline.", | ||
| "author": "Nicholas Schaub (nick.schaub@nih.gov), Antoine Gerardin (antoine.gerardin@nih.gov), Najib Ishaq (najib.ishaq@nih.gov)", | ||
| "institution": "National Center for Advancing Translational Sciences, National Institutes of Health", | ||
| "repository": "https://github.com/PolusAI/tabular-tools", | ||
| "website": "https://ncats.nih.gov/preclinical/core/informatics", | ||
| "citation": "", | ||
| "containerId": "polusai/rt-cetsa-analysis-simple-tool:0.2.0-dev0", | ||
| "baseCommand": [ | ||
| "python3", | ||
| "-m", | ||
| "polus.tabular.regression.rt_cetsa_analysis" | ||
| ], | ||
| "inputs": [ | ||
| { | ||
| "name": "params", | ||
| "type": "genericData", | ||
| "description": "Fit params csv file" | ||
| }, | ||
| { | ||
| "name": "values", | ||
| "type": "genericData", | ||
| "description": "Baseline corrected csv files" | ||
| }, | ||
| { | ||
| "name": "platemap", | ||
| "type": "genericData", | ||
| "description": "platemap excel file", | ||
| "required": true | ||
| } | ||
| ], | ||
| "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.params", | ||
| "title": "Params", | ||
| "description": "Params" | ||
| }, | ||
| { | ||
| "key": "inputs.values", | ||
| "title": "Values", | ||
| "description": "Values" | ||
| }, | ||
| { | ||
| "key": "inputs.platemap", | ||
| "title": "Plate Map", | ||
| "description": "Plate Map" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| [tool.poetry] | ||
| name = "polus_tabular_regression_rt_cetsa_analysis" | ||
| version = "0.2.0-dev0" | ||
| description = "Run statiscal analysis for the RT-CETSA pipeline." | ||
| authors = [ | ||
| "Nick Schaub <nick.schaub@nih.gov>", | ||
| "Antoine Gerardin <antoine.gerardin@nih.gov>", | ||
| "Najib Ishaq <najib.ishaq@nih.gov>", | ||
| ] | ||
| readme = "README.md" | ||
| packages = [{include = "polus", from = "src"}] | ||
|
|
||
| [tool.poetry.dependencies] | ||
| python = ">=3.9,<3.12" | ||
| # filepattern = "2.0.4" | ||
| typer = "^0.7" | ||
|
|
||
| [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()` | ||
| ] |
3 changes: 3 additions & 0 deletions
3
regression/rt-cetsa-analysis-tool/requirements/Requirements_1.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| install.packages('argparse') | ||
| install.packages('logging') | ||
| install.packages('tidyverse') |
1 change: 1 addition & 0 deletions
1
regression/rt-cetsa-analysis-tool/requirements/Requirements_2.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| install.packages('drc') |
6 changes: 6 additions & 0 deletions
6
regression/rt-cetsa-analysis-tool/requirements/Requirements_3.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| install.packages('readxl') | ||
| install.packages('stringr') | ||
| install.packages('ggthemes') | ||
| install.packages('cowplot') | ||
| install.packages('ggpubr') | ||
| install.packages('MESS') |
1 change: 1 addition & 0 deletions
1
regression/rt-cetsa-analysis-tool/requirements/Requirements_4.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| install.packages('hrbrthemes') |
1 change: 1 addition & 0 deletions
1
regression/rt-cetsa-analysis-tool/requirements/Requirements_5.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| install.packages('devtools') |
1 change: 1 addition & 0 deletions
1
regression/rt-cetsa-analysis-tool/requirements/Requirements_6.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| install.packages('gert') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| class: CommandLineTool | ||
| cwlVersion: v1.2 | ||
| baseCommand: ["python3", "-m", "polus.tabular.regression.rt_cetsa_analysis"] | ||
| inputs: | ||
| inpDir: | ||
| inputBinding: | ||
| prefix: --inpDir | ||
| type: Directory | ||
| params: | ||
| inputBinding: | ||
| prefix: --params | ||
| type: string? | ||
| values: | ||
| inputBinding: | ||
| prefix: --values | ||
| type: string? | ||
| platemap: | ||
| inputBinding: | ||
| prefix: --platemap | ||
| type: File | ||
| preview: | ||
| inputBinding: | ||
| prefix: --preview | ||
| type: boolean? | ||
| outDir: | ||
| inputBinding: | ||
| prefix: --outDir | ||
| type: Directory | ||
| outputs: | ||
| outDir: | ||
| outputBinding: | ||
| glob: $(inputs.outDir.basename) | ||
| type: Directory | ||
| requirements: | ||
| EnvVarRequirement: | ||
| envDef: | ||
| WORKDIR: /opt/executables/ | ||
| DockerRequirement: | ||
| dockerPull: polusai/rt-cetsa-analysis-tool:0.2.0-dev0 | ||
| InitialWorkDirRequirement: | ||
| listing: | ||
| - entry: $(inputs.outDir) | ||
| writable: true | ||
| InlineJavascriptRequirement: {} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do the R requirements need to be installed in this specific order or can these six files be consolidated somehow?