Skip to content

Commit

Permalink
Fixed nf-core lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix-Kummer committed Dec 4, 2023
1 parent e2756fe commit d0e747c
Show file tree
Hide file tree
Showing 16 changed files with 71 additions and 29 deletions.
1 change: 0 additions & 1 deletion .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
steps:
- name: Launch workflow via tower
uses: seqeralabs/action-tower-launch@v2
# TODO nf-core: You can customise AWS full pipeline tests as required
# Add full size test data (but still relatively small datasets for few samples)
# on the `test_full.config` test runs with only one set of parameters
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
version: "${{ matrix.NXF_VER }}"

- name: Run pipeline with test data
# TODO nf-core: You can customise CI pipeline run tests as required
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
run: |
Expand Down
5 changes: 4 additions & 1 deletion .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ repository_type: pipeline
template:
prefix: nf-core
skip:
- igenomes
- igenomes
lint:
files_exist:
- conf/igenomes.config
1 change: 0 additions & 1 deletion conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ process {
// These labels are used and recognised by default in DSL2 files hosted on nf-core/modules.
// If possible, it would be nice to keep the same label naming convention when
// adding in your local modules too.
// TODO nf-core: Customise requirements for specific processes.
// See https://www.nextflow.io/docs/latest/config.html#config-process-selectors
withLabel:process_single {
cpus = { check_max( 1 , 'cpus' ) }
Expand Down
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ process {
publishDir = [
path: "${params.outdir}/trend/mosaic/",
mode: params.publish_dir_mode,
saveAs: { it -> it.equals('versions.yml') ? null : "${params.outdir}/trend/mosaic/${task.tag}/${it.replaceAll("trend/","")}"}
saveAs: { it.equals('versions.yml') ? null : "${params.outdir}/trend/mosaic/${task.tag}/${it.replaceAll("trend/","")}"}
]
}

Expand Down
5 changes: 5 additions & 0 deletions modules/local/check_results.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ nextflow.enable.dsl = 2

process CHECK_RESULTS {

label 'process_low'

container 'docker.io/rocker/geospatial:4.3.1'

input:
Expand All @@ -16,6 +18,9 @@ process CHECK_RESULTS {
output:
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
files=`find ./trend/ -maxdepth 1 -mindepth 1 -type d`
Expand Down
5 changes: 5 additions & 0 deletions modules/local/force-generate_analysis_mask.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ nextflow.enable.dsl = 2

process FORCE_GENERATE_ANALYSIS_MASK{

label 'process_single'

container "docker.io/davidfrantz/force:3.7.11"

input:
Expand All @@ -13,6 +15,9 @@ process FORCE_GENERATE_ANALYSIS_MASK{
path 'mask/*/*.tif', emit: masks
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
force-cube -o mask/ -s $params.resolution $aoi
Expand Down
5 changes: 5 additions & 0 deletions modules/local/force-generate_tile_allow_list.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ nextflow.enable.dsl = 2

process FORCE_GENERATE_TILE_ALLOW_LIST{

label 'process_single'

container "docker.io/davidfrantz/force:3.7.11"

input:
Expand All @@ -13,6 +15,9 @@ process FORCE_GENERATE_TILE_ALLOW_LIST{
path 'tile_allow.txt', emit: tile_allow
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
force-tile-extent $aoi tmp/ tile_allow.txt
Expand Down
9 changes: 7 additions & 2 deletions modules/local/force-higher_level.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@ nextflow.enable.dsl = 2

process FORCE_HIGHER_LEVEL {

label 'process_high'

container "docker.io/davidfrantz/force:3.7.11"
tag {tile}
tag { tile }

input:
tuple val(tile), path( config ), path( ard ), path( aoi ), path ( datacube ), path ( endmember )
tuple val(tile), path(config), path(ard), path(aoi), path (datacube), path (endmember)

output:
path 'trend/*.tif*', emit: trend_files
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
PARAM=$config
Expand Down
11 changes: 8 additions & 3 deletions modules/local/force-mosaic.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@ nextflow.enable.dsl = 2

process FORCE_MOSAIC{

label 'process_low'

tag { product }
container "docker.io/davidfrantz/force:3.7.11"

input:
tuple val( product ), path('trend/*')
tuple val(product), path('trend/*')
path 'trend/datacube-definition.prj'

output:
tuple val( product ), path( 'trend/*' ), emit: trend_files
path "versions.yml" , emit: versions
tuple val(product), path('trend/*'), emit: trend_files
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
Expand Down
7 changes: 6 additions & 1 deletion modules/local/force-preprocess.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
nextflow.enable.dsl=2

process FORCE_PREPROCESS {

label 'process_medium'
tag { data.simpleName }

container "docker.io/davidfrantz/force:3.7.11"
Expand All @@ -11,9 +13,12 @@ process FORCE_PREPROCESS {
output:
path "**/*BOA.tif", optional:true, emit: boa_tiles
path "**/*QAI.tif", optional:true, emit: qai_tiles
path "*.log"
path "*.log" , emit: log
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
PARAM=$conf
Expand Down
9 changes: 7 additions & 2 deletions modules/local/force-pyramid.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@ nextflow.enable.dsl = 2

process FORCE_PYRAMID {

label 'process_low'
tag { tile }

container "docker.io/davidfrantz/force:3.7.11"

input:
tuple val( tile ), path( image )
tuple val(tile), path(image)

output:
path( '**' ), emit: trends
path('**') , emit: trends
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
files="*.tif"
Expand Down
11 changes: 8 additions & 3 deletions modules/local/higher_level_force_config.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@ nextflow.enable.dsl = 2

process HIGHER_LEVEL_CONFIG {

container "docker.io/davidfrantz/force:3.7.11"
label 'process_single'
tag { tile }

container "docker.io/davidfrantz/force:3.7.11"

input:
tuple val( tile ), path( "ard/${tile}/*" ), path( "ard/${tile}/*" ), path( "mask/${tile}/aoi.tif" )
tuple val(tile), path("ard/${tile}/*"), path("ard/${tile}/*"), path("mask/${tile}/aoi.tif")
path 'ard/datacube-definition.prj'
path endmember

output:
tuple val (tile), path( "trend_${tile}.prm" ), path( "ard/", includeInputs: true ), path( "mask/", includeInputs: true ), path( 'ard/datacube-definition.prj', includeInputs: true ), path( endmember, includeInputs: true ), emit: higher_level_configs_and_data
tuple val (tile), path("trend_${tile}.prm"), path("ard/", includeInputs: true), path("mask/", includeInputs: true), path('ard/datacube-definition.prj', includeInputs: true), path(endmember, includeInputs: true), emit: higher_level_configs_and_data
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
# generate parameterfile from scratch
Expand Down
10 changes: 7 additions & 3 deletions modules/local/merge.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ nextflow.enable.dsl = 2

process MERGE {

label 'process_low'
tag { id }

container 'docker.io/davidfrantz/force:dev'

input:
val ( data_type ) // defines whether qai or boa is merged
tuple val( id ), path( 'input/?/*' )
val (data_type) // defines whether qai or boa is merged
tuple val(id), path('input/?/*')
path cube

output:
tuple val( id ), path( "*.tif" ), emit: tiles_merged
tuple val(id), path("*.tif"), emit: tiles_merged
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
files=`find -L input/ -type f -printf "%f\\n" | sort | uniq`
Expand Down
9 changes: 6 additions & 3 deletions modules/local/preprocess_force_config.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ nextflow.enable.dsl = 2

process PREPROCESS_CONFIG {

label 'process_single'
tag { data.simpleName }

container "docker.io/davidfrantz/force:3.7.11"
Expand All @@ -14,9 +15,11 @@ process PREPROCESS_CONFIG {
path wvdb

output:
tuple path("*.prm"), path(data), path(cube), path(tile), path(dem), path(wvdb), emit: preprocess_config_and_data
path "*.prm"
path "versions.yml", emit: versions
tuple path("*.prm"), path(data), path(cube), path(tile), path(dem), path(wvdb), emit: preprocess_config_and_data
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
Expand Down
9 changes: 2 additions & 7 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"properties": {
"input": {
"type": "string",
"default": "None",
"fa_icon": "fas fa-satellite",
"help_text": "Set this to the root directory of all satellite imagery. Directory structure should match format of data downloaded with '$ force-level1-csd\n' For concrete directory structure see ./docs/usage.md ",
"description": "Root directory of all sattelite imagery."
"description": "Root directory of all sattelite imagery.",
"mimetype": "application/x-tar"
},
"input_tar": {
"type": "boolean",
Expand All @@ -27,7 +27,6 @@
},
"dem": {
"type": "string",
"default": "None",
"help_text": "Path to directory containing a subdirectory with tile-wise digital elevation files (.tif) and a virtual dataset file (.vrt file) comprising all tile-wise files from the subdirectory. \n\n\n",
"fa_icon": "fas fa-mountain",
"description": "Digital elevation model."
Expand All @@ -40,7 +39,6 @@
},
"wvdb": {
"type": "string",
"default": "None",
"fa_icon": "fas fa-burn",
"description": "Water vapor dataset.",
"help_text": "Directory containg a number text files describing global water vapor data at different timestamps, and a coordinate order (.coo-)file containig the reference system of the water vapor data."
Expand All @@ -53,21 +51,18 @@
},
"data_cube": {
"type": "string",
"default": "None",
"description": "Datacube definition.",
"fa_icon": "fas fa-cube",
"help_text": "A single .prj file describing the projection and reference grid of the generated datacube."
},
"aoi": {
"type": "string",
"default": "None",
"fa_icon": "fas fa-chart-area",
"description": "Area of interest.",
"help_text": "A single vector file specifying the spacial extend of the targeted area."
},
"endmember": {
"type": "string",
"default": "None",
"fa_icon": "fas fa-chart-line",
"description": "Endmember definition.",
"help_text": "A single text file specifying where lines correspond to satellite bands and columns correspond to endmembers. Values correspond to reflectance values and are separated by spaces."
Expand Down

0 comments on commit d0e747c

Please sign in to comment.