From 8e3a5e146a3e7a020a49a0f77c4718cbf364468b Mon Sep 17 00:00:00 2001 From: Bjoern Gruening Date: Tue, 23 Apr 2024 15:03:53 +0200 Subject: [PATCH 1/2] update testing --- .github/workflows/ci.yaml | 5 +++-- .github/workflows/pr.yaml | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c7903f0c7..819936bd5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ on: types: [run-all-tool-tests-command] env: GALAXY_FORK: galaxyproject - GALAXY_BRANCH: release_23.2 + GALAXY_BRANCH: release_24.0 MAX_CHUNKS: 40 jobs: setup: @@ -103,7 +103,7 @@ jobs: mode: lint repository-list: ${{ needs.setup.outputs.repository-list }} tool-list: ${{ needs.setup.outputs.tool-list }} - additional-planemo-options: --biocontainers -s tests,output,inputs,help,general,command,citations,tool_xsd,xml_order,tool_urls,shed_metadata + additional-planemo-options: --biocontainers -s stdio,tests,output,inputs,help,general,command,citations,tool_xsd,xml_order,tool_urls,shed_metadata,urls,readme,shed_yaml,repository_dependencies,tool_dependencies_actions,tool_dependencies_sha256sum,tool_dependencies_xsd,expansion - uses: actions/upload-artifact@v4 if: ${{ failure() }} with: @@ -204,6 +204,7 @@ jobs: with: name: 'All tool test results' path: upload + - run: cat upload/tool_test_output.md >> $GITHUB_STEP_SUMMARY - name: Create URL to the run output if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }} id: vars diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0c496e80e..b9fd105b7 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -2,7 +2,6 @@ name: Galaxy Tool Linting and Tests for push and PR on: pull_request: paths-ignore: - - '.github/**' - 'deprecated/**' - 'docs/**' - '*' @@ -11,13 +10,12 @@ on: - main - master paths-ignore: - - '.github/**' - 'deprecated/**' - 'docs/**' - '*' env: GALAXY_FORK: galaxyproject - GALAXY_BRANCH: release_23.2 + GALAXY_BRANCH: release_24.0 MAX_CHUNKS: 4 MAX_FILE_SIZE: 1M concurrency: @@ -401,7 +399,7 @@ jobs: deploy-report: name: Report deploy status needs: [deploy] - if: ${{ always() && needs.deploy.result != 'success' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'galaxyproject' }} + if: ${{ always() && needs.deploy.result != 'success' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'galaxyproteomics' }} runs-on: ubuntu-latest steps: # report to the PR if deployment failed From 00029e8a3ee400f69a6dbe9e556ec9c27c6979cb Mon Sep 17 00:00:00 2001 From: Niko Pinter <34959927+npinter@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:57:57 +0200 Subject: [PATCH 2/2] Update QuPath ROIsplitter to v0.2.1 (#758) * Initial commit * Fix test * Fix test * Fix test * Fix test * Fix test * Fix test * Fix test --- .../qupath_roi_splitter.py | 15 +++++++++---- .../qupath_roi_splitter.xml | 22 +++++++++++++++---- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/tools/qupath_roi_splitter/qupath_roi_splitter.py b/tools/qupath_roi_splitter/qupath_roi_splitter.py index 83708efbe..9f727a039 100644 --- a/tools/qupath_roi_splitter/qupath_roi_splitter.py +++ b/tools/qupath_roi_splitter/qupath_roi_splitter.py @@ -25,20 +25,22 @@ def draw_roi(input_roi, input_img, fill): # Polygon with holes if not isinstance(sub_roi[0][0], list): if first_roi: - input_img = draw_poly(sub_roi, input_img, fill=fill) first_roi = False + col = (0, 0, 0) else: # holes in ROI - input_img = draw_poly(sub_roi, input_img, col=(255, 255, 255), fill=fill) + col = (255, 255, 255) if not fill else (0, 0, 0) + input_img = draw_poly(sub_roi, input_img, col=col, fill=fill) else: # MultiPolygon with holes for sub_coord in sub_roi: if first_roi: - input_img = draw_poly(sub_coord, input_img, fill=fill) first_roi = False + col = (0, 0, 0) else: # holes in ROI - input_img = draw_poly(sub_coord, input_img, col=(255, 255, 255), fill=fill) + col = (255, 255, 255) if not fill else (0, 0, 0) + input_img = draw_poly(sub_coord, input_img, col=col, fill=fill) return input_img @@ -89,6 +91,10 @@ def split_qupath_roi(in_roi): coords_df.to_csv("{}_{}.txt".format(tma_name, cell_type), sep='\t', index=False) + # img save + if args.img: + cv2.imwrite("{}_{}.png".format(tma_name, cell_type), img) + if __name__ == "__main__": parser = argparse.ArgumentParser(description="Split ROI coordinates of QuPath TMA annotation by cell type (classfication)") @@ -96,6 +102,7 @@ def split_qupath_roi(in_roi): parser.add_argument("--fill", action="store_true", required=False, help="Fill pixels in ROIs") parser.add_argument('--version', action='version', version='%(prog)s 0.1.0') parser.add_argument("--all", action="store_true", required=False, help="Extracts all ROIs") + parser.add_argument("--img", action="store_true", required=False, help="Generates image of ROIs") args = parser.parse_args() if args.qupath_roi: diff --git a/tools/qupath_roi_splitter/qupath_roi_splitter.xml b/tools/qupath_roi_splitter/qupath_roi_splitter.xml index acc6ecbb5..757dfc728 100644 --- a/tools/qupath_roi_splitter/qupath_roi_splitter.xml +++ b/tools/qupath_roi_splitter/qupath_roi_splitter.xml @@ -1,14 +1,14 @@ Split ROI coordinates of QuPath TMA annotation by cell type (classification) - 0.2.0 + 0.2.1 0 geojson numpy opencv - pandas + pandas
+
- + + + + @@ -43,9 +49,10 @@
+
- + @@ -54,6 +61,13 @@ + + + + + + +