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

Fix specified CPUs in piped commands #753

Merged
merged 7 commits into from
May 27, 2021
Merged

Fix specified CPUs in piped commands #753

merged 7 commits into from
May 27, 2021

Conversation

jfy133
Copy link
Member

@jfy133 jfy133 commented May 21, 2021

To close #750

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 - add to the software_versions process and a regex to scrape_software_versions.py
    • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
    • If necessary, also make a PR on the nf-core/eager branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core lint .).
  • Ensure the test suite passes (nextflow run . -profile test,docker).
  • 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).

@jfy133 jfy133 requested a review from a team May 21, 2021 11:05
@github-actions
Copy link

Markdown linting is failing

To keep the code consistent with lots of contributors, we run automated code consistency checks.
To fix this CI test, please run:

  • Install markdownlint-cli
  • Fix the markdown errors
    • Automatically: markdownlint . --config .github/markdownlint.yml --fix
    • Manually resolve anything left from markdownlint . --config .github/markdownlint.yml

Once you push these changes the test should pass, and you can hide this comment 👍

We highly recommend setting up markdownlint in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!

Thanks again for your contribution!

@github-actions
Copy link

github-actions bot commented May 21, 2021

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 49956c1

+| ✅ 366 tests passed       |+
#| ❔   4 tests were ignored |#
!| ❗  33 tests had warnings |!

❗ Test warnings:

  • params_used - Config variable not found in main.nf: params.input_paths
  • params_used - Config variable not found in main.nf: params.enable_conda
  • conda_env_yaml - Conda dep outdated: conda-forge::python=3.7.3, 3.9.4 available
  • conda_env_yaml - Conda dep outdated: conda-forge::markdown=3.2.2, 3.3.4 available
  • conda_env_yaml - Conda dep outdated: conda-forge::pymdown-extensions=7.1, 8.2 available
  • conda_env_yaml - Conda dep outdated: conda-forge::pygments=2.6.1, 2.9.0 available
  • conda_env_yaml - Conda dep outdated: conda-forge::openjdk=8.0.144, 11.0.9.1 available
  • conda_env_yaml - Conda dep outdated: bioconda::adapterremoval=2.3.1, 2.3.2 available
  • conda_env_yaml - Conda dep outdated: bioconda::picard=2.22.9, 2.25.5 available
  • conda_env_yaml - Conda dep outdated: bioconda::samtools=1.9, 1.12 available
  • conda_env_yaml - Conda dep outdated: bioconda::angsd=0.933, 0.935 available
  • conda_env_yaml - Conda dep outdated: bioconda::gatk4=4.1.7.0, 4.2.0.0 available
  • conda_env_yaml - Conda dep outdated: bioconda::gatk=3.5, 3.8 available
  • conda_env_yaml - Conda dep outdated: bioconda::damageprofiler=0.4.9, 1.1 available
  • conda_env_yaml - Conda dep outdated: bioconda::bedtools=2.29.2, 2.30.0 available
  • conda_env_yaml - Conda dep outdated: conda-forge::libiconv=1.15, 1.16 available
  • conda_env_yaml - Conda dep outdated: bioconda::preseq=2.0.3, 3.1.2 available
  • conda_env_yaml - Conda dep outdated: bioconda::bamutil=1.0.14, 1.0.15 available
  • conda_env_yaml - Conda dep outdated: bioconda::pysam=0.15.4, 0.16.0 available
  • conda_env_yaml - Conda dep outdated: bioconda::kraken2=2.1.1, 2.1.2 available
  • conda_env_yaml - Conda dep outdated: conda-forge::pandas=1.0.4, 1.2.4 available
  • conda_env_yaml - Conda dep outdated: bioconda::freebayes=1.3.2, 1.3.5 available
  • conda_env_yaml - Conda dep outdated: conda-forge::biopython=1.76, 1.78 available
  • conda_env_yaml - Conda dep outdated: conda-forge::xopen=0.9.0, 1.1.0 available
  • conda_env_yaml - Conda dep outdated: bioconda::bowtie2=2.4.2, 2.4.4 available
  • conda_env_yaml - Conda dep outdated: bioconda::mapdamage2=2.2.0, 2.2.1 available
  • conda_env_yaml - Conda dep outdated: bioconda::bbmap=38.87, 38.90 available
  • schema_description - No description provided in schema for parameter: skip_fastqc
  • schema_description - No description provided in schema for parameter: skip_adapterremoval
  • schema_description - No description provided in schema for parameter: skip_preseq
  • schema_description - No description provided in schema for parameter: skip_deduplication
  • schema_description - No description provided in schema for parameter: skip_damage_calculation
  • schema_description - No description provided in schema for parameter: skip_qualimap

❔ Tests ignored:

  • files_unchanged - File ignored due to lint config: .github/CONTRIBUTING.md
  • files_unchanged - File ignored due to lint config: .github/ISSUE_TEMPLATE/bug_report.md
  • files_unchanged - File ignored due to lint config: docs/README.md
  • files_unchanged - File ignored due to lint config: assets/multiqc_config.yaml

✅ Tests passed:

  • files_exist - File found: .gitattributes
  • files_exist - File found: CHANGELOG.md
  • files_exist - File found: CODE_OF_CONDUCT.md
  • files_exist - File found: CODE_OF_CONDUCT.md
  • files_exist - File found: LICENSE or LICENSE.md or LICENCE or LICENCE.md
  • files_exist - File found: nextflow_schema.json
  • files_exist - File found: nextflow.config
  • files_exist - File found: README.md
  • files_exist - File found: .github/.dockstore.yml
  • files_exist - File found: .github/CONTRIBUTING.md
  • files_exist - File found: .github/ISSUE_TEMPLATE/bug_report.md
  • files_exist - File found: .github/ISSUE_TEMPLATE/config.yml
  • files_exist - File found: .github/ISSUE_TEMPLATE/feature_request.md
  • files_exist - File found: .github/markdownlint.yml
  • files_exist - File found: .github/PULL_REQUEST_TEMPLATE.md
  • files_exist - File found: .github/workflows/branch.yml
  • files_exist - File found: .github/workflows/ci.yml
  • files_exist - File found: .github/workflows/linting_comment.yml
  • files_exist - File found: .github/workflows/linting.yml
  • files_exist - File found: assets/email_template.html
  • files_exist - File found: assets/email_template.txt
  • files_exist - File found: assets/sendmail_template.txt
  • files_exist - File found: assets/nf-core-eager_logo.png
  • files_exist - File found: bin/markdown_to_html.py
  • files_exist - File found: docs/images/nf-core-eager_logo.png
  • files_exist - File found: docs/output.md
  • files_exist - File found: docs/README.md
  • files_exist - File found: docs/README.md
  • files_exist - File found: docs/usage.md
  • files_exist - File found: lib/nfcore_external_java_deps.jar
  • files_exist - File found: lib/NfcoreSchema.groovy
  • files_exist - File found: main.nf
  • files_exist - File found: environment.yml
  • files_exist - File found: Dockerfile
  • files_exist - File found: conf/base.config
  • files_exist - File found: .github/workflows/awstest.yml
  • files_exist - File found: .github/workflows/awsfulltest.yml
  • files_exist - File not found check: Singularity
  • files_exist - File not found check: parameters.settings.json
  • files_exist - File not found check: bin/markdown_to_html.r
  • files_exist - File not found check: conf/aws.config
  • files_exist - File not found check: .github/workflows/push_dockerhub.yml
  • files_exist - File not found check: .travis.yml
  • nextflow_config - Config variable found: manifest.name
  • nextflow_config - Config variable found: manifest.nextflowVersion
  • nextflow_config - Config variable found: manifest.description
  • nextflow_config - Config variable found: manifest.version
  • nextflow_config - Config variable found: manifest.homePage
  • nextflow_config - Config variable found: timeline.enabled
  • nextflow_config - Config variable found: trace.enabled
  • nextflow_config - Config variable found: report.enabled
  • nextflow_config - Config variable found: dag.enabled
  • nextflow_config - Config variable found: process.cpus
  • nextflow_config - Config variable found: process.memory
  • nextflow_config - Config variable found: process.time
  • nextflow_config - Config variable found: params.outdir
  • nextflow_config - Config variable found: params.input
  • nextflow_config - Config variable found: params.show_hidden_params
  • nextflow_config - Config variable found: params.schema_ignore_params
  • nextflow_config - Config variable found: manifest.mainScript
  • nextflow_config - Config variable found: timeline.file
  • nextflow_config - Config variable found: trace.file
  • nextflow_config - Config variable found: report.file
  • nextflow_config - Config variable found: dag.file
  • nextflow_config - Config variable found: process.container
  • nextflow_config - Config variable (correctly) not found: params.version
  • nextflow_config - Config variable (correctly) not found: params.nf_required_version
  • nextflow_config - Config variable (correctly) not found: params.container
  • nextflow_config - Config variable (correctly) not found: params.singleEnd
  • nextflow_config - Config variable (correctly) not found: params.igenomesIgnore
  • nextflow_config - Config variable (correctly) not found: params.name
  • nextflow_config - Config timeline.enabled had correct value: true
  • nextflow_config - Config report.enabled had correct value: true
  • nextflow_config - Config trace.enabled had correct value: true
  • nextflow_config - Config dag.enabled had correct value: true
  • nextflow_config - Config manifest.name began with nf-core/
  • nextflow_config - Config variable manifest.homePage began with https://github.com/nf-core/
  • nextflow_config - Config dag.file ended with .svg
  • nextflow_config - Config variable manifest.nextflowVersion started with >= or !>=
  • nextflow_config - Config process.container looks correct: nfcore/eager:dev
  • nextflow_config - Config manifest.version ends in dev: '2.3.5dev'
  • nextflow_config - Config params.custom_config_version is set to master
  • nextflow_config - Config params.custom_config_base is set to https://raw.githubusercontent.com/nf-core/configs/master
  • nextflow_config - Lines for loading custom profiles found
  • params_used - Config variable found in main.nf: params.genome
  • params_used - Config variable found in main.nf: params.input
  • params_used - Config variable found in main.nf: params.single_end
  • params_used - Config variable found in main.nf: params.outdir
  • params_used - Config variable found in main.nf: params.publish_dir_mode
  • params_used - Config variable found in main.nf: params.awsqueue
  • params_used - Config variable found in main.nf: params.awsregion
  • params_used - Config variable found in main.nf: params.awscli
  • params_used - Config variable found in main.nf: params.validate_params
  • params_used - Config variable found in main.nf: params.udg_type
  • params_used - Config variable found in main.nf: params.single_stranded
  • params_used - Config variable found in main.nf: params.colour_chemistry
  • params_used - Config variable found in main.nf: params.bam
  • params_used - Config variable found in main.nf: params.snpcapture_bed
  • params_used - Config variable found in main.nf: params.run_convertinputbam
  • params_used - Config variable found in main.nf: params.fasta
  • params_used - Config variable found in main.nf: params.bwa_index
  • params_used - Config variable found in main.nf: params.bt2_index
  • params_used - Config variable found in main.nf: params.fasta_index
  • params_used - Config variable found in main.nf: params.seq_dict
  • params_used - Config variable found in main.nf: params.large_ref
  • params_used - Config variable found in main.nf: params.save_reference
  • params_used - Config variable found in main.nf: params.genomes
  • params_used - Config variable found in main.nf: params.skip_fastqc
  • params_used - Config variable found in main.nf: params.skip_adapterremoval
  • params_used - Config variable found in main.nf: params.skip_preseq
  • params_used - Config variable found in main.nf: params.skip_deduplication
  • params_used - Config variable found in main.nf: params.skip_damage_calculation
  • params_used - Config variable found in main.nf: params.skip_qualimap
  • params_used - Config variable found in main.nf: params.complexity_filter_poly_g
  • params_used - Config variable found in main.nf: params.complexity_filter_poly_g_min
  • params_used - Config variable found in main.nf: params.clip_forward_adaptor
  • params_used - Config variable found in main.nf: params.clip_reverse_adaptor
  • params_used - Config variable found in main.nf: params.clip_readlength
  • params_used - Config variable found in main.nf: params.clip_min_read_quality
  • params_used - Config variable found in main.nf: params.min_adap_overlap
  • params_used - Config variable found in main.nf: params.skip_collapse
  • params_used - Config variable found in main.nf: params.skip_trim
  • params_used - Config variable found in main.nf: params.preserve5p
  • params_used - Config variable found in main.nf: params.mergedonly
  • params_used - Config variable found in main.nf: params.qualitymax
  • params_used - Config variable found in main.nf: params.mapper
  • params_used - Config variable found in main.nf: params.bwaalnn
  • params_used - Config variable found in main.nf: params.bwaalnk
  • params_used - Config variable found in main.nf: params.bwaalnl
  • params_used - Config variable found in main.nf: params.bwaalno
  • params_used - Config variable found in main.nf: params.circularextension
  • params_used - Config variable found in main.nf: params.circulartarget
  • params_used - Config variable found in main.nf: params.circularfilter
  • params_used - Config variable found in main.nf: params.bt2_alignmode
  • params_used - Config variable found in main.nf: params.bt2_sensitivity
  • params_used - Config variable found in main.nf: params.bt2n
  • params_used - Config variable found in main.nf: params.bt2l
  • params_used - Config variable found in main.nf: params.bt2_trim5
  • params_used - Config variable found in main.nf: params.bt2_trim3
  • params_used - Config variable found in main.nf: params.bt2_maxins
  • params_used - Config variable found in main.nf: params.hostremoval_input_fastq
  • params_used - Config variable found in main.nf: params.hostremoval_mode
  • params_used - Config variable found in main.nf: params.run_bam_filtering
  • params_used - Config variable found in main.nf: params.bam_mapping_quality_threshold
  • params_used - Config variable found in main.nf: params.bam_filter_minreadlength
  • params_used - Config variable found in main.nf: params.bam_unmapped_type
  • params_used - Config variable found in main.nf: params.dedupper
  • params_used - Config variable found in main.nf: params.dedup_all_merged
  • params_used - Config variable found in main.nf: params.preseq_step_size
  • params_used - Config variable found in main.nf: params.damageprofiler_length
  • params_used - Config variable found in main.nf: params.damageprofiler_threshold
  • params_used - Config variable found in main.nf: params.damageprofiler_yaxis
  • params_used - Config variable found in main.nf: params.run_pmdtools
  • params_used - Config variable found in main.nf: params.pmdtools_range
  • params_used - Config variable found in main.nf: params.pmdtools_threshold
  • params_used - Config variable found in main.nf: params.pmdtools_reference_mask
  • params_used - Config variable found in main.nf: params.pmdtools_max_reads
  • params_used - Config variable found in main.nf: params.pmdtools_platypus
  • params_used - Config variable found in main.nf: params.run_mapdamage_rescaling
  • params_used - Config variable found in main.nf: params.rescale_length_5p
  • params_used - Config variable found in main.nf: params.rescale_length_3p
  • params_used - Config variable found in main.nf: params.run_bedtools_coverage
  • params_used - Config variable found in main.nf: params.anno_file
  • params_used - Config variable found in main.nf: params.run_trim_bam
  • params_used - Config variable found in main.nf: params.bamutils_clip_half_udg_left
  • params_used - Config variable found in main.nf: params.bamutils_clip_half_udg_right
  • params_used - Config variable found in main.nf: params.bamutils_clip_none_udg_left
  • params_used - Config variable found in main.nf: params.bamutils_clip_none_udg_right
  • params_used - Config variable found in main.nf: params.bamutils_softclip
  • params_used - Config variable found in main.nf: params.run_genotyping
  • params_used - Config variable found in main.nf: params.genotyping_tool
  • params_used - Config variable found in main.nf: params.genotyping_source
  • params_used - Config variable found in main.nf: params.gatk_call_conf
  • params_used - Config variable found in main.nf: params.gatk_ploidy
  • params_used - Config variable found in main.nf: params.gatk_downsample
  • params_used - Config variable found in main.nf: params.gatk_dbsnp
  • params_used - Config variable found in main.nf: params.gatk_hc_out_mode
  • params_used - Config variable found in main.nf: params.gatk_hc_emitrefconf
  • params_used - Config variable found in main.nf: params.gatk_ug_genotype_model
  • params_used - Config variable found in main.nf: params.gatk_ug_out_mode
  • params_used - Config variable found in main.nf: params.gatk_ug_keep_realign_bam
  • params_used - Config variable found in main.nf: params.gatk_ug_defaultbasequalities
  • params_used - Config variable found in main.nf: params.freebayes_C
  • params_used - Config variable found in main.nf: params.freebayes_g
  • params_used - Config variable found in main.nf: params.freebayes_p
  • params_used - Config variable found in main.nf: params.pileupcaller_snpfile
  • params_used - Config variable found in main.nf: params.pileupcaller_bedfile
  • params_used - Config variable found in main.nf: params.pileupcaller_method
  • params_used - Config variable found in main.nf: params.pileupcaller_transitions_mode
  • params_used - Config variable found in main.nf: params.angsd_glmodel
  • params_used - Config variable found in main.nf: params.angsd_glformat
  • params_used - Config variable found in main.nf: params.angsd_createfasta
  • params_used - Config variable found in main.nf: params.angsd_fastamethod
  • params_used - Config variable found in main.nf: params.run_vcf2genome
  • params_used - Config variable found in main.nf: params.vcf2genome_outfile
  • params_used - Config variable found in main.nf: params.vcf2genome_header
  • params_used - Config variable found in main.nf: params.vcf2genome_minc
  • params_used - Config variable found in main.nf: params.vcf2genome_minq
  • params_used - Config variable found in main.nf: params.vcf2genome_minfreq
  • params_used - Config variable found in main.nf: params.run_multivcfanalyzer
  • params_used - Config variable found in main.nf: params.write_allele_frequencies
  • params_used - Config variable found in main.nf: params.min_genotype_quality
  • params_used - Config variable found in main.nf: params.min_base_coverage
  • params_used - Config variable found in main.nf: params.min_allele_freq_hom
  • params_used - Config variable found in main.nf: params.min_allele_freq_het
  • params_used - Config variable found in main.nf: params.additional_vcf_files
  • params_used - Config variable found in main.nf: params.reference_gff_annotations
  • params_used - Config variable found in main.nf: params.reference_gff_exclude
  • params_used - Config variable found in main.nf: params.snp_eff_results
  • params_used - Config variable found in main.nf: params.run_mtnucratio
  • params_used - Config variable found in main.nf: params.mtnucratio_header
  • params_used - Config variable found in main.nf: params.run_sexdeterrmine
  • params_used - Config variable found in main.nf: params.sexdeterrmine_bedfile
  • params_used - Config variable found in main.nf: params.run_nuclear_contamination
  • params_used - Config variable found in main.nf: params.contamination_chrom_name
  • params_used - Config variable found in main.nf: params.run_metagenomic_screening
  • params_used - Config variable found in main.nf: params.metagenomic_complexity_filter
  • params_used - Config variable found in main.nf: params.metagenomic_complexity_entropy
  • params_used - Config variable found in main.nf: params.metagenomic_tool
  • params_used - Config variable found in main.nf: params.database
  • params_used - Config variable found in main.nf: params.metagenomic_min_support_reads
  • params_used - Config variable found in main.nf: params.percent_identity
  • params_used - Config variable found in main.nf: params.malt_mode
  • params_used - Config variable found in main.nf: params.malt_alignment_mode
  • params_used - Config variable found in main.nf: params.malt_top_percent
  • params_used - Config variable found in main.nf: params.malt_min_support_mode
  • params_used - Config variable found in main.nf: params.malt_min_support_percent
  • params_used - Config variable found in main.nf: params.malt_max_queries
  • params_used - Config variable found in main.nf: params.malt_memory_mode
  • params_used - Config variable found in main.nf: params.malt_sam_output
  • params_used - Config variable found in main.nf: params.run_maltextract
  • params_used - Config variable found in main.nf: params.maltextract_taxon_list
  • params_used - Config variable found in main.nf: params.maltextract_ncbifiles
  • params_used - Config variable found in main.nf: params.maltextract_filter
  • params_used - Config variable found in main.nf: params.maltextract_toppercent
  • params_used - Config variable found in main.nf: params.maltextract_destackingoff
  • params_used - Config variable found in main.nf: params.maltextract_downsamplingoff
  • params_used - Config variable found in main.nf: params.maltextract_duplicateremovaloff
  • params_used - Config variable found in main.nf: params.maltextract_matches
  • params_used - Config variable found in main.nf: params.maltextract_megansummary
  • params_used - Config variable found in main.nf: params.maltextract_percentidentity
  • params_used - Config variable found in main.nf: params.maltextract_topalignment
  • params_used - Config variable found in main.nf: params.multiqc_config
  • params_used - Config variable found in main.nf: params.email
  • params_used - Config variable found in main.nf: params.email_on_fail
  • params_used - Config variable found in main.nf: params.max_multiqc_email_size
  • params_used - Config variable found in main.nf: params.plaintext_email
  • params_used - Config variable found in main.nf: params.monochrome_logs
  • params_used - Config variable found in main.nf: params.help
  • params_used - Config variable found in main.nf: params.tracedir
  • params_used - Config variable found in main.nf: params.hostnames
  • params_used - Config variable found in main.nf: params.config_profile_description
  • params_used - Config variable found in main.nf: params.config_profile_contact
  • params_used - Config variable found in main.nf: params.config_profile_url
  • params_used - Config variable found in main.nf: params.max_memory
  • params_used - Config variable found in main.nf: params.max_cpus
  • params_used - Config variable found in main.nf: params.max_time
  • files_unchanged - .gitattributes matches the template
  • files_unchanged - CODE_OF_CONDUCT.md matches the template
  • files_unchanged - LICENSE matches the template
  • files_unchanged - .github/.dockstore.yml matches the template
  • files_unchanged - .github/ISSUE_TEMPLATE/config.yml matches the template
  • files_unchanged - .github/ISSUE_TEMPLATE/feature_request.md matches the template
  • files_unchanged - .github/markdownlint.yml matches the template
  • files_unchanged - .github/PULL_REQUEST_TEMPLATE.md matches the template
  • files_unchanged - .github/workflows/branch.yml matches the template
  • files_unchanged - .github/workflows/linting_comment.yml matches the template
  • files_unchanged - .github/workflows/linting.yml matches the template
  • files_unchanged - assets/email_template.html matches the template
  • files_unchanged - assets/email_template.txt matches the template
  • files_unchanged - assets/sendmail_template.txt matches the template
  • files_unchanged - assets/nf-core-eager_logo.png matches the template
  • files_unchanged - bin/markdown_to_html.py matches the template
  • files_unchanged - docs/images/nf-core-eager_logo.png matches the template
  • files_unchanged - lib/nfcore_external_java_deps.jar matches the template
  • files_unchanged - lib/NfcoreSchema.groovy matches the template
  • files_unchanged - .gitignore matches the template
  • files_unchanged - .github/workflows/push_dockerhub_dev.yml matches the template
  • files_unchanged - .github/workflows/push_dockerhub_release.yml matches the template
  • actions_ci - '.github/workflows/ci.yml' is triggered on expected events
  • actions_ci - CI is building the correct docker image: docker build --no-cache . -t nfcore/eager:dev
  • actions_ci - CI is pulling the correct docker image: docker pull nfcore/eager:dev
  • actions_ci - CI is tagging docker image correctly: docker tag nfcore/eager:dev nfcore/eager:dev
  • actions_ci - '.github/workflows/ci.yml' checks minimum NF version
  • actions_awstest - '.github/workflows/awstest.yml' is triggered correctly
  • actions_awsfulltest - .github/workflows/awsfulltest.yml is triggered correctly
  • actions_awsfulltest - .github/workflows/awsfulltest.yml does not use -profile test
  • readme - README Nextflow minimum version badge matched config. Badge: 20.07.1, Config: 20.07.1
  • readme - README had a bioconda badge
  • conda_env_yaml - Conda environment name was correct (nf-core-eager-2.3.5dev)
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::python=3.7.3
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::markdown=3.2.2
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::pymdown-extensions=7.1
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::pygments=2.6.1
  • conda_env_yaml - Conda dep had pinned version number: bioconda::rename=1.601
  • conda_env_yaml - Conda package is the latest available: bioconda::rename=1.601
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::openjdk=8.0.144
  • conda_env_yaml - Conda dep had pinned version number: bioconda::fastqc=0.11.9
  • conda_env_yaml - Conda package is the latest available: bioconda::fastqc=0.11.9
  • conda_env_yaml - Conda dep had pinned version number: bioconda::adapterremoval=2.3.1
  • conda_env_yaml - Conda dep had pinned version number: bioconda::adapterremovalfixprefix=0.0.5
  • conda_env_yaml - Conda package is the latest available: bioconda::adapterremovalfixprefix=0.0.5
  • conda_env_yaml - Conda dep had pinned version number: bioconda::bwa=0.7.17
  • conda_env_yaml - Conda package is the latest available: bioconda::bwa=0.7.17
  • conda_env_yaml - Conda dep had pinned version number: bioconda::picard=2.22.9
  • conda_env_yaml - Conda dep had pinned version number: bioconda::samtools=1.9
  • conda_env_yaml - Conda dep had pinned version number: bioconda::dedup=0.12.8
  • conda_env_yaml - Conda package is the latest available: bioconda::dedup=0.12.8
  • conda_env_yaml - Conda dep had pinned version number: bioconda::angsd=0.933
  • conda_env_yaml - Conda dep had pinned version number: bioconda::circularmapper=1.93.5
  • conda_env_yaml - Conda package is the latest available: bioconda::circularmapper=1.93.5
  • conda_env_yaml - Conda dep had pinned version number: bioconda::gatk4=4.1.7.0
  • conda_env_yaml - Conda dep had pinned version number: bioconda::gatk=3.5
  • conda_env_yaml - Conda dep had pinned version number: bioconda::qualimap=2.2.2d
  • conda_env_yaml - Conda package is the latest available: bioconda::qualimap=2.2.2d
  • conda_env_yaml - Conda dep had pinned version number: bioconda::vcf2genome=0.91
  • conda_env_yaml - Conda package is the latest available: bioconda::vcf2genome=0.91
  • conda_env_yaml - Conda dep had pinned version number: bioconda::damageprofiler=0.4.9
  • conda_env_yaml - Conda dep had pinned version number: bioconda::multiqc=1.10.1
  • conda_env_yaml - Conda package is the latest available: bioconda::multiqc=1.10.1
  • conda_env_yaml - Conda dep had pinned version number: bioconda::pmdtools=0.60
  • conda_env_yaml - Conda package is the latest available: bioconda::pmdtools=0.60
  • conda_env_yaml - Conda dep had pinned version number: bioconda::bedtools=2.29.2
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::libiconv=1.15
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::pigz=2.6
  • conda_env_yaml - Conda package is the latest available: conda-forge::pigz=2.6
  • conda_env_yaml - Conda dep had pinned version number: bioconda::sequencetools=1.4.0.6
  • conda_env_yaml - Conda package is the latest available: bioconda::sequencetools=1.4.0.6
  • conda_env_yaml - Conda dep had pinned version number: bioconda::preseq=2.0.3
  • conda_env_yaml - Conda dep had pinned version number: bioconda::fastp=0.20.1
  • conda_env_yaml - Conda package is the latest available: bioconda::fastp=0.20.1
  • conda_env_yaml - Conda dep had pinned version number: bioconda::bamutil=1.0.14
  • conda_env_yaml - Conda dep had pinned version number: bioconda::mtnucratio=0.7
  • conda_env_yaml - Conda package is the latest available: bioconda::mtnucratio=0.7
  • conda_env_yaml - Conda dep had pinned version number: bioconda::pysam=0.15.4
  • conda_env_yaml - Conda dep had pinned version number: bioconda::kraken2=2.1.1
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::pandas=1.0.4
  • conda_env_yaml - Conda dep had pinned version number: bioconda::freebayes=1.3.2
  • conda_env_yaml - Conda dep had pinned version number: bioconda::sexdeterrmine=1.1.2
  • conda_env_yaml - Conda package is the latest available: bioconda::sexdeterrmine=1.1.2
  • conda_env_yaml - Conda dep had pinned version number: bioconda::multivcfanalyzer=0.85.2
  • conda_env_yaml - Conda package is the latest available: bioconda::multivcfanalyzer=0.85.2
  • conda_env_yaml - Conda dep had pinned version number: bioconda::hops=0.35
  • conda_env_yaml - Conda package is the latest available: bioconda::hops=0.35
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::biopython=1.76
  • conda_env_yaml - Conda dep had pinned version number: conda-forge::xopen=0.9.0
  • conda_env_yaml - Conda dep had pinned version number: bioconda::bowtie2=2.4.2
  • conda_env_yaml - Conda dep had pinned version number: bioconda::eigenstratdatabasetools=1.0.2
  • conda_env_yaml - Conda package is the latest available: bioconda::eigenstratdatabasetools=1.0.2
  • conda_env_yaml - Conda dep had pinned version number: bioconda::mapdamage2=2.2.0
  • conda_env_yaml - Conda dep had pinned version number: bioconda::bbmap=38.87
  • conda_dockerfile - Found all expected strings in Dockerfile file
  • pipeline_name_conventions - Name adheres to nf-core convention
  • template_strings - Did not find any Jinja template strings (145 files)
  • schema_lint - Schema lint passed
  • schema_lint - Schema title + description lint passed
  • schema_params - Schema matched params returned from nextflow config
  • actions_schema_validation - Workflow validation passed: ci.yml
  • actions_schema_validation - Workflow validation passed: push_dockerhub_dev.yml
  • actions_schema_validation - Workflow validation passed: linting.yml
  • actions_schema_validation - Workflow validation passed: awsfulltest.yml
  • actions_schema_validation - Workflow validation passed: push_dockerhub_release.yml
  • actions_schema_validation - Workflow validation passed: awstest.yml
  • actions_schema_validation - Workflow validation passed: linting_comment.yml
  • actions_schema_validation - Workflow validation passed: branch.yml
  • merge_markers - No merge markers found in pipeline files

Run details

  • nf-core/tools version 1.14
  • Run at 2021-05-26 12:31:05

@jfy133 jfy133 linked an issue May 21, 2021 that may be closed by this pull request
@mahesh-panchal
Copy link
Member

Is there a check in the code somewhere that cpus is at minimum 2 and at least divisible by 2 (since it's used to calculate split_cpus)?

@jfy133
Copy link
Member Author

jfy133 commented May 21, 2021

Is there a check in the code somewhere that cpus is at minimum 2 and at least divisible by 2 (since it's used to calculate split_cpus)?

Thanks for looking @mahesh-panchal !

There isn't a specific check for (1): the number of CPUs is specified with the label parameter of the process, so assuming users don't modify that (and I don't really see why they would), the split_cpu varliable is only assigned to multi-threaded label'd processes.

And for (2) I believe the floor part of the split_cpu definition is account for the divisible by 2 issue

main.nf Outdated Show resolved Hide resolved
@mahesh-panchal
Copy link
Member

And for (2) I believe the floor part of the split_cpu definition is account for the divisible by 2 issue

Definitely a little embarrassed at not registering that.

main.nf Outdated Show resolved Hide resolved
main.nf Outdated Show resolved Hide resolved
main.nf Show resolved Hide resolved
main.nf Show resolved Hide resolved
main.nf Outdated Show resolved Hide resolved
main.nf Outdated Show resolved Hide resolved
@jfy133
Copy link
Member Author

jfy133 commented May 26, 2021

@mahesh-panchal thanks for looking so closely. This was one of those cases where you think 'oh this should be a quick PR', end up doing in a rush, and then miss lots of things 🤦 .

I looked a bit more closely now and I think I've caught everything.

main.nf Outdated
#Run Filtering step
samtools calmd -b ${bam} ${fasta} | pmdtools --threshold ${params.pmdtools_threshold} ${treatment} ${snpcap} --header | samtools view -@ ${task.cpus - 2} -Sb - > "${libraryid}".pmd.bam
samtools calmd -b ${bam} ${fasta} | samtools view -h - | pmdtools --threshold ${params.pmdtools_threshold} ${treatment} ${snpcap} --header | samtools view -Sb - > "${libraryid}".pmd.bam
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you not get the output directly from samtools calmd? At the moment you're using the -b flag which produces compressed bam. Does removing the -b give you uncompressed sam with the headers?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok good call, I've tested and that seems to work. However, i've just checked the line history, and going to check with the actual writers of this process that it makes sense. I never used pmdtools mself 😅

@jfy133
Copy link
Member Author

jfy133 commented May 26, 2021

@apeltzer @maxibor @TCLamnidis I've just changed the PMDtools command after suggestions from @mahesh-panchal . Can you check this looks OK with you? I never used pmdtools so I want to double check with you guys, who all actually have modified this line in the past according to git history.

image

@TCLamnidis
Copy link
Collaborator

TCLamnidis commented May 26, 2021

I tried running a working command locally with and without samtools view, and it would throw an error when the calmd output was not passed through samtools view.

$ samtools calmd -u JK2067_rmdup.bam hs37d5.fa | pmdtools --threshold 3 --header | samtools view -bo test.bam
Traceback (most recent call last):
  File "/Users/lamnidis/miniconda3/envs/pmdtools/bin/pmdtools", line 282, in <module>
    position = int(col[3])
IndexError: list index out of range

$ samtools calmd -u JK2067_rmdup.bam hs37d5.fa | samtools view -h - | pmdtools --threshold 3 --header | samtools view -bo test.bam
[bam_fillmd1] different MD for read 'K00233:65:HKTTVBBXX:6:2119:1387:28446': '30^T24' -> '30^N24'
[bam_fillmd1] different MD for read 'K00233:65:HKTTVBBXX:5:1112:4066:2070': '0A0C0T53' -> '0A0C0N53'

 $ samtools --version
samtools 1.3.1
Using htslib 1.3.1
Copyright (C) 2016 Genome Research Ltd.

pmdtools is version 0.60

@jfy133
Copy link
Member Author

jfy133 commented May 26, 2021

That's a very old version of samtools @TCLamnidis . Could you try with the version in eager (I think 1.10). I tried the eager command without -b earlier and it worked....? Also what is -u? That isn't in the eager command is it?

@mahesh-panchal
Copy link
Member

mahesh-panchal commented May 26, 2021

Also what is -u?

That tells samtools to output uncompressed bam. It's used when the next tool in the pipe can read bam, but saves time by not going through a compression-decompression step.

@jfy133
Copy link
Member Author

jfy133 commented May 27, 2021

❯  samtools --version
samtools 1.9
Using htslib 1.9
Copyright (C) 2018 Genome Research Ltd.
❯ samtools calmd JK2782_rmdup.bam Mammoth_MT_Krause.fasta | pmdtools --threshold 3 --CpG  --header | samtools view -Sb - > "JK2782".pmd.bam
❯ samtools calmd JK2782_rmdup.bam Mammoth_MT_Krause.fasta | pmdtools --deamination  --range 10 --CpG  -n 10000 > "JK2782".cpg.range."10".txt

This works for me? Is the -u really necessary?

@mahesh-panchal
Copy link
Member

I don't think pmdtools can read bam, since it uses samtools view to produce SAM input.
https://github.com/pontussk/PMDtools

@jfy133
Copy link
Member Author

jfy133 commented May 27, 2021

Ok, then given default calmd output is sam anyway, (at least when I run it now), it's unecessary to specify.

Will proceed with merge, and someone can complain later if I brake something ;).

@jfy133 jfy133 merged commit bd75f9c into dev May 27, 2021
@apeltzer apeltzer deleted the cpu-fix branch May 27, 2021 09:06
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.

Fix number of CPUs in piped commands
4 participants