-
Notifications
You must be signed in to change notification settings - Fork 3
Modify main.nf to match the original version #21
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| process PMULTIQC { | ||
| tag "$meta.id" | ||
| label 'process_high' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
|
|
@@ -8,42 +7,46 @@ process PMULTIQC { | |
| 'biocontainers/pmultiqc:0.0.39--pyhdfd78af_0' }" | ||
|
|
||
| input: | ||
| val meta | ||
| path results | ||
| path 'results/*' | ||
| path quantms_log | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.html"), emit: report | ||
| path "*.db", optional: true, emit: quantmsdb | ||
| path "*.html", emit: ch_pmultiqc_report | ||
| path "*.db", optional: true, emit: ch_pmultiqc_db | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| path "versions.yml", emit: versions | ||
| path "*_data", emit: data | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def disable_pmultiqc = (params.enable_pmultiqc) && (params.export_mztab) ? "--quantms_plugin" : "" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Misleading variable name. The variable 🔎 Proposed fix-def disable_pmultiqc = (params.enable_pmultiqc) && (params.export_mztab) ? "--quantms_plugin" : ""
+def enable_quantms_plugin = (params.enable_pmultiqc) && (params.export_mztab) ? "--quantms_plugin" : ""And update line 36 accordingly: - ${disable_pmultiqc} \\
+ ${enable_quantms_plugin} \\
🤖 Prompt for AI Agents |
||
| def disable_table_plots = (params.enable_pmultiqc) && (params.skip_table_plots) ? "--disable_table" : "" | ||
| def disable_idxml_index = (params.enable_pmultiqc) && (params.pmultiqc_idxml_skip) ? "--ignored_idxml" : "" | ||
| def contaminant_affix = params.contaminant_string ? "--contaminant_affix ${params.contaminant_string}" : "" | ||
|
|
||
| """ | ||
| multiqc \\ | ||
| --force \\ | ||
| --filename ${prefix}_multiqc_report \\ | ||
| ${args} \\ | ||
| . | ||
| set -x | ||
| set -e | ||
|
|
||
| cat <<END_VERSIONS > versions.yml | ||
| "PMULTIQC": | ||
| pmultiqc: \$(python -c "from importlib.metadata import version; print(version('pmultiqc'))" 2>/dev/null || echo "0.0.39") | ||
| END_VERSIONS | ||
| """ | ||
| # leaving here to ease debugging | ||
| ls -lcth * | ||
|
|
||
| stub: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| cat results/*openms_design.tsv | ||
|
Comment on lines
+27
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Risk of script failure and debug artifacts. Two concerns:
🔎 Proposed fix for safer file handling-cat results/*openms_design.tsv
+if ls results/*openms_design.tsv 1> /dev/null 2>&1; then
+ cat results/*openms_design.tsv
+fi🤖 Prompt for AI Agents |
||
|
|
||
| """ | ||
| touch '${prefix}_multiqc_report.html' | ||
| mkdir '${prefix}_multiqc_report_data' | ||
|
|
||
| cat <<END_VERSIONS > versions.yml | ||
| "PMULTIQC": | ||
| pmultiqc: \$(python -c "from importlib.metadata import version; print(version('pmultiqc'))" 2>/dev/null || echo "0.0.39") | ||
| END_VERSIONS | ||
| multiqc \\ | ||
| -f \\ | ||
| ${disable_pmultiqc} \\ | ||
| --config ./results/multiqc_config.yml \\ | ||
| ${args} \\ | ||
| ${disable_table_plots} \\ | ||
| ${disable_idxml_index} \\ | ||
| ${contaminant_affix} \\ | ||
| --quantification_method $params.quantification_method \\ | ||
| ./results \\ | ||
| -o . | ||
|
Comment on lines
+35
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, find the file and read it to understand the context around lines 34-44
find . -name "main.nf" -path "*/pmultiqc/*" | head -5Repository: bigbio/nf-modules Length of output: 94 🏁 Script executed: # Search for the pmultiqc module
fd -p "pmultiqc" -t d | head -10Repository: bigbio/nf-modules Length of output: 116 🏁 Script executed: # Read the main.nf file to see full context
cat -n ./modules/bigbio/pmultiqc/main.nfRepository: bigbio/nf-modules Length of output: 2055 🏁 Script executed: # Search for quantification_method parameter in config files
rg -n 'quantification_method' --type=nf -g '*.config' -g 'nextflow.config'Repository: bigbio/nf-modules Length of output: 87 🏁 Script executed: # Also search in all files to understand where this parameter is defined
rg -n 'quantification_method' --max-count=20Repository: bigbio/nf-modules Length of output: 298 🏁 Script executed: # Read the meta.yml to understand the parameter better
cat -n ./modules/bigbio/pmultiqc/meta.ymlRepository: bigbio/nf-modules Length of output: 2443 🏁 Script executed: # Search for nextflow.config files to see if quantification_method is defined there
fd -n 'nextflow.config' -o 'config.nf' | head -10Repository: bigbio/nf-modules Length of output: 291 🏁 Script executed: # Search for where this parameter might be defined as a workflow parameter
rg -n 'params\.' -g 'nextflow.config' -g '*.config' | grep -i 'quantification' | head -20Repository: bigbio/nf-modules Length of output: 43 🏁 Script executed: # Find all config files
fd 'nextflow.config' -o '\.config$'Repository: bigbio/nf-modules Length of output: 198 🏁 Script executed: # Check the tests directory for pmultiqc to see how it's configured
find ./modules/bigbio/pmultiqc/tests -type f | head -20Repository: bigbio/nf-modules Length of output: 364 🏁 Script executed: # Look for where quantification_method might be set with a default
rg 'quantification_method\s*=' -B2 -A2Repository: bigbio/nf-modules Length of output: 43 🏁 Script executed: # Read the test nextflow.config files to see how parameters are set
cat -n ./modules/bigbio/pmultiqc/tests/nextflow.configRepository: bigbio/nf-modules Length of output: 335 🏁 Script executed: # Read the quantms variant config
cat -n ./modules/bigbio/pmultiqc/tests/nextflow.config.quantmsRepository: bigbio/nf-modules Length of output: 427 🏁 Script executed: # Check if multiqc_config.yml exists in tests
cat -n ./modules/bigbio/pmultiqc/tests/multiqc_config.yml | head -30Repository: bigbio/nf-modules Length of output: 149 🏁 Script executed: # Read the base test config to see if quantification_method is defined
cat -n ./tests/config/nextflow.configRepository: bigbio/nf-modules Length of output: 1737 🏁 Script executed: # Check if there's test_data.config that might define parameters
cat -n ./tests/config/test_data.config | head -50Repository: bigbio/nf-modules Length of output: 1875 🏁 Script executed: # Read the test file to understand how PMULTIQC is invoked
cat -n ./modules/bigbio/pmultiqc/tests/main.nf.test | head -80Repository: bigbio/nf-modules Length of output: 3634 🏁 Script executed: # Continue reading the test file to see if quantification_method is set somewhere
tail -n +50 ./modules/bigbio/pmultiqc/tests/main.nf.test | head -100Repository: bigbio/nf-modules Length of output: 3766 🏁 Script executed: # Search for any default value for quantification_method in the entire codebase
rg 'quantification_method' -B3 -A3Repository: bigbio/nf-modules Length of output: 1104 🏁 Script executed: # Check if there's a default value set anywhere by looking more broadly
rg 'params\.' ./modules/bigbio/pmultiqc/main.nf -A1 -B1Repository: bigbio/nf-modules Length of output: 653 🏁 Script executed: # Check for any conditional usage of quantification_method
rg -C5 'quantification_method' ./modules/bigbio/pmultiqc/main.nfRepository: bigbio/nf-modules Length of output: 390 🏁 Script executed: # Look for parent workflows that might define quantification_method
fd 'workflow.nf' | head -10Repository: bigbio/nf-modules Length of output: 43 🏁 Script executed: # Check if there are any parent configs or if this module is part of a larger workflow
find . -maxdepth 2 -name 'nextflow.config' -type fRepository: bigbio/nf-modules Length of output: 43 🏁 Script executed: # Look at the test more carefully - especially what parameters might be passed
tail -n +100 ./modules/bigbio/pmultiqc/tests/main.nf.test | head -50Repository: bigbio/nf-modules Length of output: 1894 🏁 Script executed: # Check the entire test file to see if there's a quantms_plugin test that would set quantification_method
wc -l ./modules/bigbio/pmultiqc/tests/main.nf.testRepository: bigbio/nf-modules Length of output: 109 🏁 Script executed: # Look at the rest of the test file, particularly the quantms test
tail -n 100 ./modules/bigbio/pmultiqc/tests/main.nf.testRepository: bigbio/nf-modules Length of output: 3746 🏁 Script executed: # Check if nextflow.config.quantms sets the quantification_method parameter
cat -n ./modules/bigbio/pmultiqc/tests/nextflow.config.quantmsRepository: bigbio/nf-modules Length of output: 427 🏁 Script executed: # Search for where this pmultiqc module is called from to see if quantification_method is set by the caller
rg 'PMULTIQC' --type=nf | grep -v test | grep -v '\.snap'Repository: bigbio/nf-modules Length of output: 87 🏁 Script executed: # Check if there's documentation about required parameters
find . -name 'README.md' -exec grep -l 'quantification_method' {} \;Repository: bigbio/nf-modules Length of output: 43 🏁 Script executed: # Look for any parent workflow configuration that might set these parameters
rg 'params\.quantification_method' -g '*.nf' -g '*.config'Repository: bigbio/nf-modules Length of output: 157 🏁 Script executed: # Check if the tests actually pass with the current setup
# by looking at the test snapshot results
cat -n ./modules/bigbio/pmultiqc/tests/main.nf.test.snapRepository: bigbio/nf-modules Length of output: 2228 🏁 Script executed: # Search the entire repository to see if quantification_method is set as a parameter anywhere
rg 'quantification_method' -C3Repository: bigbio/nf-modules Length of output: 1104 Add validation for required parameters and config file. The code uses
Consider aligning with the pattern used for 🤖 Prompt for AI Agents |
||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| pmultiqc: \$(multiqc --pmultiqc_version | sed -e "s/pmultiqc, version //g") | ||
| END_VERSIONS | ||
|
Comment on lines
+47
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: I couldn't find any documented --pmultiqc_version flag in the pmultiqc or MultiQC documentation or source. The official pmultiqc docs and package pages list its command-line options but do not include that flag. See the pmultiqc GitHub and PyPI pages for the documented options. [1][2] Would you like me to (a) search the pmultiqc source tree for an undocumented/hidden flag, (b) check a specific pmultiqc version/release, or (c) inspect your local installation (if you can paste output of multiqc --help or pip show pmultiqc)? Sources:
🌐 Web query:
💡 Result: Short answer:
Sources:
🌐 Web query:
💡 Result: Do you want (A) the exact file/lines in the pmultiqc GitHub repo that implement the --pmultiqc_version flag, (B) a short explanation of how that flag is implemented, or (C) both? 🌐 Web query:
💡 Result: I can find that for you — do you mean the bigbio/pmultiqc GitHub repo (which branch or tag/version)? If so I’ll search the repository and return the exact file path(s) and line numbers that implement the --pmultiqc_version flag. Which branch/version should I use? 🏁 Script executed: find . -type f -name "*.nf" | xargs rg -l "versions\.yml" | head -10Repository: bigbio/nf-modules Length of output: 171 🏁 Script executed: cat -n ./modules/bigbio/pmultiqc/main.nf | head -60Repository: bigbio/nf-modules Length of output: 2055 🏁 Script executed: cat -n ./modules/bigbio/thermorawfileparser/main.nf | grep -A 5 "versions.yml"Repository: bigbio/nf-modules Length of output: 691 🏁 Script executed: cat -n ./modules/bigbio/onsite/main.nf | grep -A 5 "versions.yml"Repository: bigbio/nf-modules Length of output: 528 🏁 Script executed: rg "pmultiqc_version" . --type nfRepository: bigbio/nf-modules Length of output: 87 🏁 Script executed: rg "pmultiqc_version" .Repository: bigbio/nf-modules Length of output: 178 🌐 Web query:
💡 Result: Ways to get the installed pmultiqc version:
References:
Fix the version extraction command; The command 🤖 Prompt for AI Agents |
||
| """ | ||
| } | ||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: bigbio/nf-modules
Length of output: 87
🏁 Script executed:
Repository: bigbio/nf-modules
Length of output: 2055
🏁 Script executed:
Repository: bigbio/nf-modules
Length of output: 87
🏁 Script executed:
Repository: bigbio/nf-modules
Length of output: 116
🏁 Script executed:
Repository: bigbio/nf-modules
Length of output: 115
🏁 Script executed:
Repository: bigbio/nf-modules
Length of output: 114
Remove the unused
quantms_loginput and clarify the wildcard staging pattern.The
quantms_loginput is declared at line 10 but is never referenced in the script—it's dead code and should be removed.The wildcard pattern
path 'results/*'is unusual for Nextflow inputs. This is the only occurrence of this pattern in the codebase. Clarify whether this is intentional (to stage individual files into aresults/subdirectory) or if it should bepath 'results'to stage the directory itself. The script logic at line 32 (cat results/*openms_design.tsv) and line 43 (./results) suggests the latter is expected.🤖 Prompt for AI Agents