Skip to content

Commit cc20b80

Browse files
authored
Merge pull request #644 from bigbio/strict_syntax
strict syntax
2 parents 1cee707 + 76048f8 commit cc20b80

38 files changed

Lines changed: 156 additions & 536 deletions

File tree

.github/workflows/fix_linting.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ jobs:
1111
contains(github.event.comment.body, '@nf-core-bot fix linting') &&
1212
github.repository == 'bigbio/quantms'
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
issues: write
1418
steps:
15-
# Use the @nf-core-bot token to check out so we can push later
19+
# Use the default GITHUB_TOKEN to check out so we can push later
1620
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1721
with:
18-
token: ${{ secrets.nf_core_bot_auth_token }}
22+
token: ${{ secrets.GITHUB_TOKEN }}
1923

2024
# indication that the linting is being fixed
2125
- name: React on comment
@@ -29,7 +33,7 @@ jobs:
2933
- name: Checkout Pull Request
3034
run: gh pr checkout ${{ github.event.issue.number }}
3135
env:
32-
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3337

3438
# Install and run pre-commit
3539
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6

conf/modules/modules.config

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@ process {
1818
// saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
1919
//]
2020

21-
// Set default publish directory for software versions
22-
withName: 'BIGBIO_QUANTMS:QUANTMS:CUSTOM_DUMPSOFTWAREVERSIONS' {
23-
publishDir = [
24-
path: { "${params.outdir}/pipeline_info" },
25-
mode: 'copy',
26-
pattern: '*_versions.yml'
27-
]
28-
}
29-
3021
// Set default publish directory for pmultiqc reports
3122
withName: 'BIGBIO_QUANTMS:QUANTMS:SUMMARY_PIPELINE' {
3223
publishDir = [

modules.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
"https://github.com/nf-core/modules.git": {
2222
"modules": {
2323
"nf-core": {
24-
"custom/dumpsoftwareversions": {
25-
"branch": "master",
26-
"git_sha": "e753770db613ce014b3c4bc94f6cba443427b726",
27-
"installed_by": ["modules"]
28-
},
2924
"multiqc": {
3025
"branch": "master",
3126
"git_sha": "8deffd6a402233ebf905c66dbf804bd4c2637946",

modules/local/diann/convert_results/main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ process CONVERT_RESULTS {
2323
path "*.log", emit: log
2424
path "versions.yml", emit: versions
2525

26-
exec:
27-
log.info "DIANNCONVERT is based on the output of DIA-NN 1.8.1, 2.0.* and 2.1.*, other versions of DIA-NN don't support mzTab conversion."
2826

2927
script:
3028
def args = task.ext.args ?: ''
3129
def dia_params = [meta.fragmentmasstolerance,meta.fragmentmasstoleranceunit,meta.precursormasstolerance,
3230
meta.precursormasstoleranceunit,meta.enzyme,meta.fixedmodifications,meta.variablemodifications].join(';')
3331
def diann2mztab = params.enable_diann_mztab ? "--enable_diann2mztab" : ""
3432

33+
log.info "DIANNCONVERT is based on the output of DIA-NN 1.8.1, 2.0.* and 2.1.*, other versions of DIA-NN don't support mzTab conversion."
3534
"""
3635
quantmsutilsc diann2mztab \\
3736
--folder ./ \\
@@ -42,6 +41,7 @@ process CONVERT_RESULTS {
4241
--missed_cleavages $params.allowed_missed_cleavages \\
4342
--qvalue_threshold $params.protein_level_fdr_cutoff \\
4443
${diann2mztab} \\
44+
$args \\
4545
2>&1 | tee convert_report.log
4646
4747
cat <<-END_VERSIONS > versions.yml

modules/local/openms/comet/main.nf

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@ process COMET {
4848
def isoSlashComet = "0/1"
4949
if (params.isotope_error_range) {
5050
def isoRangeComet = params.isotope_error_range.split(",")
51-
isoSlashComet = ""
52-
for (c in isoRangeComet[0].toInteger()..isoRangeComet[1].toInteger()-1) {
53-
isoSlashComet += c + "/"
54-
}
55-
isoSlashComet += isoRangeComet[1]
51+
def range = (isoRangeComet[0].toInteger()..isoRangeComet[1].toInteger()-1).collect { v -> v.toString() }
52+
range.add(isoRangeComet[1])
53+
isoSlashComet = range.join("/")
5654
}
5755
// for consensusID the cutting rules need to be the same. So we adapt to the loosest rules from MSGF
5856
// TODO find another solution. In ProteomicsLFQ we re-run PeptideIndexer (remove??) and if we
@@ -96,8 +94,8 @@ process COMET {
9694
-enzyme "${enzyme}" \\
9795
-isotope_error ${isoSlashComet} \\
9896
-precursor_charge $params.min_precursor_charge:$params.max_precursor_charge \\
99-
-fixed_modifications ${meta.fixedmodifications.tokenize(',').collect { "'$it'" }.join(" ") } \\
100-
-variable_modifications ${meta.variablemodifications.tokenize(',').collect { "'$it'" }.join(" ") } \\
97+
-fixed_modifications ${meta.fixedmodifications.tokenize(',').collect { mod -> "'$mod'" }.join(" ") } \\
98+
-variable_modifications ${meta.variablemodifications.tokenize(',').collect { mod -> "'$mod'" }.join(" ") } \\
10199
-max_variable_mods_in_peptide $params.max_mods \\
102100
-precursor_mass_tolerance $meta.precursormasstolerance \\
103101
-precursor_error_units $meta.precursormasstoleranceunit \\

modules/local/openms/isobaric_analyzer/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ process ISOBARIC_ANALYZER {
3636
// Read the matrix file and format it into the command-line format
3737
// Read the matrix file, skipping lines that start with '#' and process the matrix
3838
def matrix_lines = new File(params.plex_corr_matrix_file).readLines()
39-
.findAll { !it.startsWith('#') && it.trim() } // Skip lines starting with '#' and empty lines
39+
.findAll { line -> !line.startsWith('#') && line.trim() } // Skip lines starting with '#' and empty lines
4040
.drop(1) // Assuming the first non-comment line is a header
4141
.collect { line ->
4242
def values = line.split('/')

modules/local/openms/luciphor/main.nf

Lines changed: 0 additions & 59 deletions
This file was deleted.

modules/local/openms/luciphor/meta.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

modules/local/openms/msgf/main.nf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ process MSGF {
2020
msgf_jar = ''
2121
if ((workflow.containerEngine || (task.executor == "awsbatch")) && (task.container.indexOf("biocontainers") > -1 || task.container.indexOf("depot.galaxyproject.org") > -1)) {
2222
msgf_jar = "-executable \$(find /usr/local/share/msgf_plus-*/MSGFPlus.jar -maxdepth 0)"
23+
// TODO session is an undocumented private API of nextflow. Unfortunately there is not other way
24+
// of determining if conda was enabled since they did not expose it in the workflow namespace
25+
// We could rely on CONDA_PREFIX but this could have been set by other things, not nextflow
2326
} else if (session.config.conda && session.config.conda.enabled) {
2427
msgf_jar = "-executable \$(find \$CONDA_PREFIX/share/msgf_plus-*/MSGFPlus.jar -maxdepth 0)"
2528
}
@@ -83,8 +86,8 @@ process MSGF {
8386
-tryptic ${msgf_num_enzyme_termini} \\
8487
-precursor_mass_tolerance $meta.precursormasstolerance \\
8588
-precursor_error_units $meta.precursormasstoleranceunit \\
86-
-fixed_modifications ${meta.fixedmodifications.tokenize(',').collect() { "'${it}'" }.join(" ") } \\
87-
-variable_modifications ${meta.variablemodifications.tokenize(',').collect() { "'${it}'" }.join(" ") } \\
89+
-fixed_modifications ${meta.fixedmodifications.tokenize(',').collect { mod -> "'${mod}'" }.join(" ") } \\
90+
-variable_modifications ${meta.variablemodifications.tokenize(',').collect { mod -> "'${mod}'" }.join(" ") } \\
8891
-max_mods $params.max_mods \\
8992
${il_equiv} \\
9093
-PeptideIndexing:unmatched_action ${params.unmatched_action} \\

modules/local/openms/mzml_indexing/main.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ process MZML_INDEXING {
2121

2222
"""
2323
mkdir -p out
24-
FileConverter -in ${mzmlfile} -out out/${mzmlfile.baseName}.mzML 2>&1 | tee ${mzmlfile.baseName}_mzmlindexing.log
24+
FileConverter -in ${mzmlfile} -out out/${mzmlfile.baseName}.mzML \\
25+
${args} \\
26+
2>&1 | tee ${mzmlfile.baseName}_mzmlindexing.log
2527
2628
cat <<-END_VERSIONS > versions.yml
2729
"${task.process}":

0 commit comments

Comments
 (0)