Skip to content

Commit

Permalink
moved cellpose properties under segmentation
Browse files Browse the repository at this point in the history
tried to cleanup some lint errors
  • Loading branch information
Cristian Goina committed Feb 13, 2025
1 parent 99bddd3 commit e5ce4c1
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 67 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,21 @@ jobs:
NXF_VER:
- "24.10.4"
- "latest-everything"
profile:
- "conda"
- "docker"
- "singularity"
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
- name: Set up Nextflow
uses: nf-core/setup-nextflow@v2
with:
version: "${{ matrix.NXF_VER }}"

- name: Run pipeline with test data
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
28 changes: 21 additions & 7 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python 3.12
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: "3.12"

Expand All @@ -31,35 +31,49 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@v2

- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: "3.12"
architecture: "x64"

- name: read .nf-core.yml
uses: pietrobolcato/[email protected]
id: read_yml
with:
config: ${{ github.workspace }}/.nf-core.yml

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nf-core
pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }}
- name: Run nf-core lint
- name: Run nf-core pipelines lint
env:
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
run: nf-core -l lint_log.txt pipelines lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md

- name: Run nf-core pipelines lint --release
if: ${{ github.base_ref == 'master' }}
env:
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
run: nf-core -l lint_log.txt pipelines lint --release --dir ${GITHUB_WORKSPACE} --markdown lint_results.md

- name: Save PR number
if: ${{ always() }}
run: echo ${{ github.event.pull_request.number }} > PR_number.txt

- name: Upload linting log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: linting-logs
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download lint results
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3
uses: dawidd6/action-download-artifact@20319c5641d495c8a52e688b7dc5fada6c3a9fbc # v8
with:
workflow: linting.yml
workflow_conclusion: completed
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ results/
testing/
testing*
*.pyc
mylocal
lint_log.txt

null/
mylocal
16 changes: 4 additions & 12 deletions .nf-core.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
repository_type: pipeline

nf_core_version: 3.2.0

lint:
files_exist:
- CODE_OF_CONDUCT.md
- assets/nf-core-janeliascicomp-easifish_logo_light.png
- docs/images/nf-core-janeliascicomp-easifish_logo_light.png
- docs/images/nf-core-janeliascicomp-easifish_logo_dark.png
- .github/ISSUE_TEMPLATE/config.yml
- .github/workflows/awstest.yml
- .github/workflows/awsfulltest.yml
- conf/igenomes.config
files_unchanged:
- LICENSE
- CODE_OF_CONDUCT.md
- assets/nf-core-janeliascicomp-easifish_logo_light.png
- docs/images/nf-core-janeliascicomp-easifish_logo_light.png
- docs/images/nf-core-janeliascicomp-easifish_logo_dark.png
- .github/ISSUE_TEMPLATE/bug_report.yml
nextflow_config:
- manifest.name
- manifest.homePage
multiqc_config: False
readme:
- nextflow_badge
nf_core_version: 2.14.1
repository_type: pipeline
template:
prefix: JaneliaSciComp
skip:
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ testing/
testing*
*.pyc
bin/
ro-crate-metadata.json
8 changes: 2 additions & 6 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,8 @@ params {
// Load base.config by default for all pipelines
includeConfig 'conf/base.config'

// Load nf-core custom profiles from different Institutions
try {
includeConfig "${params.custom_config_base}/nfcore_custom.config"
} catch (Exception e) {
System.err.println("WARNING: Could not load nf-core/config profiles: ${params.custom_config_base}/nfcore_custom.config")
}
// Load nf-core custom profiles from different Institutions.
includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null"

// Override institutional configs which set scratch dir, since that results in large data being copied instead of symlinked
process {
Expand Down
66 changes: 32 additions & 34 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,30 @@
"type": "boolean",
"description": "If true skip segmentation"
},
"sample_anisotropy": {
"type": "number",
"default": 1.0
},
"sample_expansion_factor": {
"type": "number",
"default": 1.0
},
"sample_voxel_spacing": {
"type": "string"
},
"sample_z_axis": {
"type": "integer",
"default": 0
},
"cellpose_verbose": {
"type": "boolean"
},
"cellpose_preprocessing_steps": {
"type": "string"
},
"cellpose_preprocessing_params_file": {
"type": "string"
},
"distributed_cellpose": {
"type": "boolean",
"description": "Use a distributed dask cluster to run segmentation",
Expand Down Expand Up @@ -850,6 +874,13 @@
"default": 0,
"description": "Default dashboards port of the Dask segmentation cluster",
"hidden": true
},
"cellpose_worker_runtime_opts": {
"type": "string"
},
"cellpose_worker_lsf_opts": {
"type": "string",
"default": "-q gpu_l4 -gpu \"num=1"
}
}
},
Expand Down Expand Up @@ -1002,38 +1033,5 @@
{
"$ref": "#/definitions/generic_options"
}
],
"properties": {
"sample_anisotropy": {
"type": "integer",
"default": 1
},
"sample_expansion_factor": {
"type": "integer",
"default": 1
},
"sample_voxel_spacing": {
"type": "string"
},
"sample_z_axis": {
"type": "integer",
"default": 0
},
"cellpose_verbose": {
"type": "boolean"
},
"cellpose_preprocessing_steps": {
"type": "string"
},
"cellpose_preprocessing_params_file": {
"type": "string"
},
"cellpose_worker_runtime_opts": {
"type": "string"
},
"cellpose_worker_lsf_opts": {
"type": "string",
"default": "-q gpu_l4 -gpu \"num=1"
}
}
]
}

0 comments on commit e5ce4c1

Please sign in to comment.