nf-core_modules/modules/bedtools/subtract/main.nf

44 lines
1.4 KiB
Text
Raw Normal View History

Enhance bedtools (#557) * hifiasm copied from fastqc * hifiasm tests init from fastqc * meta.yml init; test.yml and main.nf for printing version * Add hifiasm version printing * Removed spaced on an empty line * Reverted hifiasm from main * hifiasm copied from fastqc * hifiasm tests init from fastqc * meta.yml init; test.yml and main.nf for printing version * Add hifiasm version printing * Removed spaced on an empty line * Reverted hifiasm from main * Generalized intersect and genomecov * Finished subtract and tests for intersect and genomecov * Finished up meta YAMLs * Replaced functions.nf in subtract * do not add "." in prefix when suffix is set (#550) when using the suffix option in the fastqc module it gets added with a "." to the ${meta.id}, this leads to sample name clashing when passing the fastqc output of raw and processed files suffixed with "trim" or "clean" to multiqc. I suggest to remove the "." this would also be more consistent with the prefix def in most of the other nf-core modules. ##' Ref: https://nfcore.slack.com/archives/CJRH30T6V/p1625129138043900 * Modules TLC (#551) * Modules TLC * Fix all the tests * Fix linting failures (#552) * Modules TLC * Fix all the tests * Fix linting failures * Soft-link build files to bypass lint error * Update software/rseqc/junctionannotation/main.nf * Fix rsem (#555) * bump bcftools filter * fix bcftools * rsem/preparereference * added calculateexpression * meta.yml and pytest_software * paired end * add test.yml * fix rseqc/junctionsaturation (#553) * bump bcftools filter * junctionsaturation meta.yml and test * pytest config entry * bump bcftools version down again * fix test * fix bcftools * Adapt linting action (#556) * bump bcftools filter * fix bcftools * adapt module linting * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Fixed variable names in intersect and genomecov Co-authored-by: Sviatoslav Sidorov <sviatoslav.sidorov@crick.ac.uk> Co-authored-by: riederd <dietmar.rieder@i-med.ac.at> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Kevin Menden <kevin.menden@t-online.de>
2021-07-07 08:44:09 +00:00
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
Enhance bedtools (#557) * hifiasm copied from fastqc * hifiasm tests init from fastqc * meta.yml init; test.yml and main.nf for printing version * Add hifiasm version printing * Removed spaced on an empty line * Reverted hifiasm from main * hifiasm copied from fastqc * hifiasm tests init from fastqc * meta.yml init; test.yml and main.nf for printing version * Add hifiasm version printing * Removed spaced on an empty line * Reverted hifiasm from main * Generalized intersect and genomecov * Finished subtract and tests for intersect and genomecov * Finished up meta YAMLs * Replaced functions.nf in subtract * do not add "." in prefix when suffix is set (#550) when using the suffix option in the fastqc module it gets added with a "." to the ${meta.id}, this leads to sample name clashing when passing the fastqc output of raw and processed files suffixed with "trim" or "clean" to multiqc. I suggest to remove the "." this would also be more consistent with the prefix def in most of the other nf-core modules. ##' Ref: https://nfcore.slack.com/archives/CJRH30T6V/p1625129138043900 * Modules TLC (#551) * Modules TLC * Fix all the tests * Fix linting failures (#552) * Modules TLC * Fix all the tests * Fix linting failures * Soft-link build files to bypass lint error * Update software/rseqc/junctionannotation/main.nf * Fix rsem (#555) * bump bcftools filter * fix bcftools * rsem/preparereference * added calculateexpression * meta.yml and pytest_software * paired end * add test.yml * fix rseqc/junctionsaturation (#553) * bump bcftools filter * junctionsaturation meta.yml and test * pytest config entry * bump bcftools version down again * fix test * fix bcftools * Adapt linting action (#556) * bump bcftools filter * fix bcftools * adapt module linting * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Fixed variable names in intersect and genomecov Co-authored-by: Sviatoslav Sidorov <sviatoslav.sidorov@crick.ac.uk> Co-authored-by: riederd <dietmar.rieder@i-med.ac.at> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Kevin Menden <kevin.menden@t-online.de>
2021-07-07 08:44:09 +00:00
params.options = [:]
options = initOptions(params.options)
process BEDTOOLS_SUBTRACT {
tag "$meta.id"
label 'process_medium'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
conda (params.enable_conda ? "bioconda::bedtools=2.30.0" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0"
} else {
container "quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0"
}
input:
tuple val(meta), path(intervals1), path(intervals2)
output:
tuple val(meta), path("*.bed"), emit: bed
path "versions.yml" , emit: versions
Enhance bedtools (#557) * hifiasm copied from fastqc * hifiasm tests init from fastqc * meta.yml init; test.yml and main.nf for printing version * Add hifiasm version printing * Removed spaced on an empty line * Reverted hifiasm from main * hifiasm copied from fastqc * hifiasm tests init from fastqc * meta.yml init; test.yml and main.nf for printing version * Add hifiasm version printing * Removed spaced on an empty line * Reverted hifiasm from main * Generalized intersect and genomecov * Finished subtract and tests for intersect and genomecov * Finished up meta YAMLs * Replaced functions.nf in subtract * do not add "." in prefix when suffix is set (#550) when using the suffix option in the fastqc module it gets added with a "." to the ${meta.id}, this leads to sample name clashing when passing the fastqc output of raw and processed files suffixed with "trim" or "clean" to multiqc. I suggest to remove the "." this would also be more consistent with the prefix def in most of the other nf-core modules. ##' Ref: https://nfcore.slack.com/archives/CJRH30T6V/p1625129138043900 * Modules TLC (#551) * Modules TLC * Fix all the tests * Fix linting failures (#552) * Modules TLC * Fix all the tests * Fix linting failures * Soft-link build files to bypass lint error * Update software/rseqc/junctionannotation/main.nf * Fix rsem (#555) * bump bcftools filter * fix bcftools * rsem/preparereference * added calculateexpression * meta.yml and pytest_software * paired end * add test.yml * fix rseqc/junctionsaturation (#553) * bump bcftools filter * junctionsaturation meta.yml and test * pytest config entry * bump bcftools version down again * fix test * fix bcftools * Adapt linting action (#556) * bump bcftools filter * fix bcftools * adapt module linting * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Fixed variable names in intersect and genomecov Co-authored-by: Sviatoslav Sidorov <sviatoslav.sidorov@crick.ac.uk> Co-authored-by: riederd <dietmar.rieder@i-med.ac.at> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Kevin Menden <kevin.menden@t-online.de>
2021-07-07 08:44:09 +00:00
script:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
bedtools \\
subtract \\
-a $intervals1 \\
-b $intervals2 \\
$options.args \\
> ${prefix}.bed
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(bedtools --version | sed -e "s/bedtools v//g")
END_VERSIONS
Enhance bedtools (#557) * hifiasm copied from fastqc * hifiasm tests init from fastqc * meta.yml init; test.yml and main.nf for printing version * Add hifiasm version printing * Removed spaced on an empty line * Reverted hifiasm from main * hifiasm copied from fastqc * hifiasm tests init from fastqc * meta.yml init; test.yml and main.nf for printing version * Add hifiasm version printing * Removed spaced on an empty line * Reverted hifiasm from main * Generalized intersect and genomecov * Finished subtract and tests for intersect and genomecov * Finished up meta YAMLs * Replaced functions.nf in subtract * do not add "." in prefix when suffix is set (#550) when using the suffix option in the fastqc module it gets added with a "." to the ${meta.id}, this leads to sample name clashing when passing the fastqc output of raw and processed files suffixed with "trim" or "clean" to multiqc. I suggest to remove the "." this would also be more consistent with the prefix def in most of the other nf-core modules. ##' Ref: https://nfcore.slack.com/archives/CJRH30T6V/p1625129138043900 * Modules TLC (#551) * Modules TLC * Fix all the tests * Fix linting failures (#552) * Modules TLC * Fix all the tests * Fix linting failures * Soft-link build files to bypass lint error * Update software/rseqc/junctionannotation/main.nf * Fix rsem (#555) * bump bcftools filter * fix bcftools * rsem/preparereference * added calculateexpression * meta.yml and pytest_software * paired end * add test.yml * fix rseqc/junctionsaturation (#553) * bump bcftools filter * junctionsaturation meta.yml and test * pytest config entry * bump bcftools version down again * fix test * fix bcftools * Adapt linting action (#556) * bump bcftools filter * fix bcftools * adapt module linting * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/intersect/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/bedtools/subtract/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/genomecov/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/bedtools/intersect/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Fixed variable names in intersect and genomecov Co-authored-by: Sviatoslav Sidorov <sviatoslav.sidorov@crick.ac.uk> Co-authored-by: riederd <dietmar.rieder@i-med.ac.at> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Kevin Menden <kevin.menden@t-online.de>
2021-07-07 08:44:09 +00:00
"""
}