Skip to content
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

Add handling of output_bam param #316

Closed
wants to merge 1 commit into from
Closed

Conversation

weaglesBio
Copy link
Contributor

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

Added handling of additional parameter in .yaml 'output_bam'. This will have the value 'true' or 'false'. If true, the merged bam will be output to hic_files directory.

Copy link

github-actions bot commented Aug 22, 2024

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 20892da

+| ✅ 127 tests passed       |+
#| ❔  20 tests were ignored |#
!| ❗   4 tests had warnings |!

❗ Test warnings:

  • nextflow_config - Config manifest.version should end in dev: '1.1.1'
  • pipeline_todos - TODO string in methods_description_template.yml: ## Update the HTML below to your prefered methods description, e.g. add publication citation for this pipeline
  • pipeline_todos - TODO string in WorkflowMain.groovy: Add Zenodo DOI for pipeline after first release
  • system_exit - System.exit in WorkflowTreeval.groovy: System.exit(1) [line 17]

❔ Tests ignored:

  • files_exist - File is ignored: assets/nf-core-treeval_logo_light.png
  • files_exist - File is ignored: conf/test_full.config
  • files_exist - File is ignored: docs/images/nf-core-treeval_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-treeval_logo_dark.png
  • files_exist - File is ignored: conf/igenomes.config
  • files_exist - File is ignored: .github/workflows/awstest.yml
  • files_exist - File is ignored: .github/workflows/awsfulltest.yml
  • nextflow_config - Config variable ignored: manifest.name
  • nextflow_config - Config variable ignored: manifest.homePage
  • files_unchanged - File ignored due to lint config: LICENSE or LICENSE.md or LICENCE or LICENCE.md
  • files_unchanged - File ignored due to lint config: .github/CONTRIBUTING.md
  • files_unchanged - File ignored due to lint config: .github/ISSUE_TEMPLATE/bug_report.yml
  • files_unchanged - File ignored due to lint config: .github/workflows/linting.yml
  • files_unchanged - File ignored due to lint config: assets/sendmail_template.txt
  • files_unchanged - File does not exist: assets/nf-core-treeval_logo_light.png
  • files_unchanged - File does not exist: docs/images/nf-core-treeval_logo_light.png
  • files_unchanged - File does not exist: docs/images/nf-core-treeval_logo_dark.png
  • files_unchanged - File ignored due to lint config: lib/NfcoreTemplate.groovy
  • files_unchanged - File ignored due to lint config: .gitignore or .prettierignore or pyproject.toml
  • actions_awstest - 'awstest.yml' workflow not found: /home/runner/work/treeval/treeval/.github/workflows/awstest.yml

✅ Tests passed:

Run details

  • nf-core/tools version 2.8
  • Run at 2024-08-22 15:12:30

@DLBPointon
Copy link
Contributor

DLBPointon commented Aug 22, 2024

As posted on Slack, I have this running locally.

    withName: '.*:.*:.*:HIC_BWAMEM2:SAMTOOLS_MERGE|.*:.*:.*:HIC_MINIMAP2:SAMTOOLS_MERGE' {
        publishDir = [
            path: { "${params.outdir}/mapped_bam" },
            mode: params.publish_dir_mode,
            saveAs: { filename -> if ${bam.size()} < 4000000000 ? null : filename }
        ]
    }

EDIT: the idea above is sound but how i implemented it was wrong

Below from slack:
Actually that's wrong isn't it you want the input genome as the comparator (edited)

Add reference.size() as a meta value in the workflows and then use that in the above instead of the bam

To really limit it you can also add a specific arg.prefix to the modules.config for these two processes and then search output file on

if filename.contains("thingmabob") && ${meta.ref_size} > 4000000000 ? filename : null

@weaglesBio weaglesBio closed this Sep 17, 2024
@weaglesBio weaglesBio deleted the output_bam branch September 17, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants