mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Merge branch 'master' into diamond-update
This commit is contained in:
commit
7de207f93f
25 changed files with 242 additions and 79 deletions
|
@ -2,10 +2,10 @@ process PICARD_ADDORREPLACEREADGROUPS {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_low'
|
label 'process_low'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.9" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
|
@ -38,12 +38,12 @@ process PICARD_ADDORREPLACEREADGROUPS {
|
||||||
-Xmx${avail_mem}g \\
|
-Xmx${avail_mem}g \\
|
||||||
--INPUT ${bam} \\
|
--INPUT ${bam} \\
|
||||||
--OUTPUT ${prefix}.bam \\
|
--OUTPUT ${prefix}.bam \\
|
||||||
-ID ${ID} \\
|
--RGID ${ID} \\
|
||||||
-LB ${LIBRARY} \\
|
--RGLB ${LIBRARY} \\
|
||||||
-PL ${PLATFORM} \\
|
--RGPL ${PLATFORM} \\
|
||||||
-PU ${BARCODE} \\
|
--RGPU ${BARCODE} \\
|
||||||
-SM ${SAMPLE} \\
|
--RGSM ${SAMPLE} \\
|
||||||
-CREATE_INDEX true
|
--CREATE_INDEX true
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_CLEANSAM {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.9" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
|
@ -31,8 +31,8 @@ process PICARD_CLEANSAM {
|
||||||
-Xmx${avail_mem}g \\
|
-Xmx${avail_mem}g \\
|
||||||
CleanSam \\
|
CleanSam \\
|
||||||
${args} \\
|
${args} \\
|
||||||
-I ${bam} \\
|
--INPUT ${bam} \\
|
||||||
-O ${prefix}.bam
|
--OUTPUT ${prefix}.bam
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_COLLECTHSMETRICS {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
|
@ -38,10 +38,10 @@ process PICARD_COLLECTHSMETRICS {
|
||||||
CollectHsMetrics \\
|
CollectHsMetrics \\
|
||||||
$args \\
|
$args \\
|
||||||
$reference \\
|
$reference \\
|
||||||
-BAIT_INTERVALS $bait_intervals \\
|
--BAIT_INTERVALS $bait_intervals \\
|
||||||
-TARGET_INTERVALS $target_intervals \\
|
--TARGET_INTERVALS $target_intervals \\
|
||||||
-INPUT $bam \\
|
--INPUT $bam \\
|
||||||
-OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics
|
--OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics
|
||||||
|
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_COLLECTMULTIPLEMETRICS {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
|
@ -33,9 +33,9 @@ process PICARD_COLLECTMULTIPLEMETRICS {
|
||||||
-Xmx${avail_mem}g \\
|
-Xmx${avail_mem}g \\
|
||||||
CollectMultipleMetrics \\
|
CollectMultipleMetrics \\
|
||||||
$args \\
|
$args \\
|
||||||
INPUT=$bam \\
|
--INPUT $bam \\
|
||||||
OUTPUT=${prefix}.CollectMultipleMetrics \\
|
--OUTPUT ${prefix}.CollectMultipleMetrics \\
|
||||||
REFERENCE_SEQUENCE=$fasta
|
--REFERENCE_SEQUENCE $fasta
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -32,9 +32,10 @@ process PICARD_COLLECTWGSMETRICS {
|
||||||
-Xmx${avail_mem}g \\
|
-Xmx${avail_mem}g \\
|
||||||
CollectWgsMetrics \\
|
CollectWgsMetrics \\
|
||||||
$args \\
|
$args \\
|
||||||
-INPUT $bam \\
|
--INPUT $bam \\
|
||||||
-OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\
|
--OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\
|
||||||
-REFERENCE_SEQUENCE $fasta
|
--REFERENCE_SEQUENCE $fasta
|
||||||
|
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_CREATESEQUENCEDICTIONARY {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.9" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(fasta)
|
tuple val(meta), path(fasta)
|
||||||
|
@ -31,8 +31,8 @@ process PICARD_CREATESEQUENCEDICTIONARY {
|
||||||
-Xmx${avail_mem}g \\
|
-Xmx${avail_mem}g \\
|
||||||
CreateSequenceDictionary \\
|
CreateSequenceDictionary \\
|
||||||
$args \\
|
$args \\
|
||||||
R=$fasta \\
|
--REFERENCE $fasta \\
|
||||||
O=${prefix}.dict
|
--OUTPUT ${prefix}.dict
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_CROSSCHECKFINGERPRINTS {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(input1)
|
tuple val(meta), path(input1)
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_FILTERSAMREADS {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_low'
|
label 'process_low'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam), path(readlist)
|
tuple val(meta), path(bam), path(readlist)
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_FIXMATEINFORMATION {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_low'
|
label 'process_low'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.9" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
|
@ -31,8 +31,8 @@ process PICARD_FIXMATEINFORMATION {
|
||||||
picard \\
|
picard \\
|
||||||
FixMateInformation \\
|
FixMateInformation \\
|
||||||
-Xmx${avail_mem}g \\
|
-Xmx${avail_mem}g \\
|
||||||
-I ${bam} \\
|
--INPUT ${bam} \\
|
||||||
-O ${prefix}.bam \\
|
--OUTPUT ${prefix}.bam \\
|
||||||
--VALIDATION_STRINGENCY ${STRINGENCY}
|
--VALIDATION_STRINGENCY ${STRINGENCY}
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_LIFTOVERVCF {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_low'
|
label 'process_low'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(input_vcf)
|
tuple val(meta), path(input_vcf)
|
||||||
|
@ -35,11 +35,11 @@ process PICARD_LIFTOVERVCF {
|
||||||
-Xmx${avail_mem}g \\
|
-Xmx${avail_mem}g \\
|
||||||
LiftoverVcf \\
|
LiftoverVcf \\
|
||||||
$args \\
|
$args \\
|
||||||
I=$input_vcf \\
|
--INPUT $input_vcf \\
|
||||||
O=${prefix}.lifted.vcf.gz \\
|
--OUTPUT ${prefix}.lifted.vcf.gz \\
|
||||||
CHAIN=$chain \\
|
--CHAIN $chain \\
|
||||||
REJECT=${prefix}.unlifted.vcf.gz \\
|
--REJECT ${prefix}.unlifted.vcf.gz \\
|
||||||
R=$fasta
|
--REFERENCE_SEQUENCE $fasta
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_MARKDUPLICATES {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
|
@ -33,9 +33,9 @@ process PICARD_MARKDUPLICATES {
|
||||||
-Xmx${avail_mem}g \\
|
-Xmx${avail_mem}g \\
|
||||||
MarkDuplicates \\
|
MarkDuplicates \\
|
||||||
$args \\
|
$args \\
|
||||||
I=$bam \\
|
--INPUT $bam \\
|
||||||
O=${prefix}.bam \\
|
--OUTPUT ${prefix}.bam \\
|
||||||
M=${prefix}.MarkDuplicates.metrics.txt
|
--METRICS_FILE ${prefix}.MarkDuplicates.metrics.txt
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_MERGESAMFILES {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bams)
|
tuple val(meta), path(bams)
|
||||||
|
@ -33,8 +33,8 @@ process PICARD_MERGESAMFILES {
|
||||||
-Xmx${avail_mem}g \\
|
-Xmx${avail_mem}g \\
|
||||||
MergeSamFiles \\
|
MergeSamFiles \\
|
||||||
$args \\
|
$args \\
|
||||||
${'INPUT='+bam_files.join(' INPUT=')} \\
|
${'--INPUT '+bam_files.join(' --INPUT ')} \\
|
||||||
OUTPUT=${prefix}.bam
|
--OUTPUT ${prefix}.bam
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
picard: \$( echo \$(picard MergeSamFiles --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:)
|
picard: \$( echo \$(picard MergeSamFiles --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:)
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_SORTSAM {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_low'
|
label 'process_low'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
|
|
|
@ -2,10 +2,10 @@ process PICARD_SORTVCF {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
|
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
|
||||||
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
|
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(vcf)
|
tuple val(meta), path(vcf)
|
||||||
|
@ -22,8 +22,8 @@ process PICARD_SORTVCF {
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
def seq_dict = sequence_dict ? "-SEQUENCE_DICTIONARY $sequence_dict" : ""
|
def seq_dict = sequence_dict ? "--SEQUENCE_DICTIONARY $sequence_dict" : ""
|
||||||
def reference = reference ? "-REFERENCE_SEQUENCE $reference" : ""
|
def reference = reference ? "--REFERENCE_SEQUENCE $reference" : ""
|
||||||
def avail_mem = 3
|
def avail_mem = 3
|
||||||
if (!task.memory) {
|
if (!task.memory) {
|
||||||
log.info '[Picard SortVcf] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
log.info '[Picard SortVcf] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
||||||
|
|
41
subworkflows/nf-core/bam_qc_picard/main.nf
Normal file
41
subworkflows/nf-core/bam_qc_picard/main.nf
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
//
|
||||||
|
// Run QC steps on BAM/CRAM files using Picard
|
||||||
|
//
|
||||||
|
|
||||||
|
include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picard/collectmultiplemetrics/main'
|
||||||
|
include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picard/collectwgsmetrics/main'
|
||||||
|
include { PICARD_COLLECTHSMETRICS } from '../../../modules/picard/collecthsmetrics/main'
|
||||||
|
|
||||||
|
workflow BAM_QC_PICARD {
|
||||||
|
take:
|
||||||
|
ch_bam // channel: [ val(meta), [ bam ]]
|
||||||
|
ch_fasta // channel: [ fasta ]
|
||||||
|
ch_fasta_fai // channel: [ fasta_fai ]
|
||||||
|
ch_bait_interval // channel: [ bait_interval ]
|
||||||
|
ch_target_interval // channel: [ target_interval ]
|
||||||
|
|
||||||
|
main:
|
||||||
|
ch_versions = Channel.empty()
|
||||||
|
ch_coverage_metrics = Channel.empty()
|
||||||
|
|
||||||
|
PICARD_COLLECTMULTIPLEMETRICS( ch_bam, ch_fasta )
|
||||||
|
ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first())
|
||||||
|
|
||||||
|
if (ch_bait_interval || ch_target_interval) {
|
||||||
|
if (!ch_bait_interval) log.error("Bait interval channel is empty")
|
||||||
|
if (!ch_target_interval) log.error("Target interval channel is empty")
|
||||||
|
PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval )
|
||||||
|
ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics)
|
||||||
|
ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first())
|
||||||
|
} else {
|
||||||
|
PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta )
|
||||||
|
ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first())
|
||||||
|
ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics)
|
||||||
|
}
|
||||||
|
|
||||||
|
emit:
|
||||||
|
coverage_metrics = ch_coverage_metrics // channel: [ val(meta), [ coverage_metrics ] ]
|
||||||
|
multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ]
|
||||||
|
|
||||||
|
versions = ch_versions // channel: [ versions.yml ]
|
||||||
|
}
|
60
subworkflows/nf-core/bam_qc_picard/meta.yml
Normal file
60
subworkflows/nf-core/bam_qc_picard/meta.yml
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
name: bam_qc
|
||||||
|
description: Produces comprehensive statistics from BAM file
|
||||||
|
keywords:
|
||||||
|
- statistics
|
||||||
|
- counts
|
||||||
|
- hs_metrics
|
||||||
|
- wgs_metrics
|
||||||
|
- bam
|
||||||
|
- sam
|
||||||
|
- cram
|
||||||
|
modules:
|
||||||
|
- picard/collectmultiplemetrics
|
||||||
|
- picard/collectwgsmetrics
|
||||||
|
- picard/collecthsmetrics
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- bam:
|
||||||
|
type: file
|
||||||
|
description: BAM/CRAM/SAM file
|
||||||
|
pattern: "*.{bam,cram,sam}"
|
||||||
|
- fasta:
|
||||||
|
type: optional file
|
||||||
|
description: Reference fasta file
|
||||||
|
pattern: "*.{fasta,fa}"
|
||||||
|
- fasta_fai:
|
||||||
|
type: optional file
|
||||||
|
description: Reference fasta file index
|
||||||
|
pattern: "*.{fasta,fa}.fai"
|
||||||
|
- bait_intervals:
|
||||||
|
type: optional file
|
||||||
|
description: An interval list file that contains the locations of the baits used.
|
||||||
|
pattern: "baits.interval_list"
|
||||||
|
- target_intervals:
|
||||||
|
type: optional file
|
||||||
|
description: An interval list file that contains the locations of the targets.
|
||||||
|
pattern: "targets.interval_list"
|
||||||
|
output:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- coverage_metrics:
|
||||||
|
type: file
|
||||||
|
description: Alignment metrics files generated by picard CollectHsMetrics or CollectWgsMetrics
|
||||||
|
pattern: "*_metrics.txt"
|
||||||
|
- multiple_metrics:
|
||||||
|
type: file
|
||||||
|
description: Alignment metrics files generated by picard CollectMultipleMetrics
|
||||||
|
pattern: "*_{metrics}"
|
||||||
|
- versions:
|
||||||
|
type: file
|
||||||
|
description: File containing software versions
|
||||||
|
pattern: "versions.yml"
|
||||||
|
authors:
|
||||||
|
- "@matthdsm"
|
|
@ -7,4 +7,3 @@
|
||||||
- path: output/picard/test.bam
|
- path: output/picard/test.bam
|
||||||
md5sum: 7b82f3461c2d80fc6a10385e78c9427f
|
md5sum: 7b82f3461c2d80fc6a10385e78c9427f
|
||||||
- path: output/picard/versions.yml
|
- path: output/picard/versions.yml
|
||||||
md5sum: 8a2d176295e1343146ea433c79bb517f
|
|
||||||
|
|
|
@ -7,4 +7,3 @@
|
||||||
- path: output/picard/test.bam
|
- path: output/picard/test.bam
|
||||||
md5sum: a48f8e77a1480445efc57570c3a38a68
|
md5sum: a48f8e77a1480445efc57570c3a38a68
|
||||||
- path: output/picard/versions.yml
|
- path: output/picard/versions.yml
|
||||||
md5sum: e6457d7c6de51bf6f4b577eda65e57ac
|
|
||||||
|
|
|
@ -7,4 +7,3 @@
|
||||||
- path: output/picard/test.dict
|
- path: output/picard/test.dict
|
||||||
contains: ["SN:MT192765.1"]
|
contains: ["SN:MT192765.1"]
|
||||||
- path: output/picard/versions.yml
|
- path: output/picard/versions.yml
|
||||||
md5sum: b3d8c7ea65b8a6d3237b153d13fe2014
|
|
||||||
|
|
|
@ -7,4 +7,3 @@
|
||||||
- path: output/picard/test.bam
|
- path: output/picard/test.bam
|
||||||
md5sum: 746102e8c242c0ef42e045c49d320030
|
md5sum: 746102e8c242c0ef42e045c49d320030
|
||||||
- path: output/picard/versions.yml
|
- path: output/picard/versions.yml
|
||||||
md5sum: 4329ba7cdca8f4f6018dfd5c019ba2eb
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
process {
|
process {
|
||||||
ext.args = "WARN_ON_MISSING_CONTIG=true"
|
ext.args = "--WARN_ON_MISSING_CONTIG true"
|
||||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ process {
|
||||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
withName: PICARD_MARKDUPLICATES_UNSORTED {
|
withName: PICARD_MARKDUPLICATES_UNSORTED {
|
||||||
ext.args = 'ASSUME_SORT_ORDER=queryname'
|
ext.args = '--ASSUME_SORT_ORDER queryname'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
27
tests/subworkflows/nf-core/bam_qc_picard/main.nf
Normal file
27
tests/subworkflows/nf-core/bam_qc_picard/main.nf
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { BAM_QC_PICARD } from '../../../../subworkflows/nf-core/bam_qc_picard/main' addParams([:])
|
||||||
|
|
||||||
|
workflow test_bam_qc_picard_wgs {
|
||||||
|
input = [ [ id:'test', single_end:false ], // meta map
|
||||||
|
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||||
|
fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||||
|
|
||||||
|
BAM_QC_PICARD ( input, fasta, fasta_fai, [], [] )
|
||||||
|
}
|
||||||
|
|
||||||
|
workflow test_bam_qc_picard_targetted {
|
||||||
|
input = [ [ id:'test', single_end:false ], // meta map
|
||||||
|
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||||
|
fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||||
|
bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true)
|
||||||
|
target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true)
|
||||||
|
|
||||||
|
BAM_QC_PICARD ( input, fasta, fasta_fai, bait, target )
|
||||||
|
}
|
5
tests/subworkflows/nf-core/bam_qc_picard/nextflow.config
Normal file
5
tests/subworkflows/nf-core/bam_qc_picard/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
33
tests/subworkflows/nf-core/bam_qc_picard/test.yml
Normal file
33
tests/subworkflows/nf-core/bam_qc_picard/test.yml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
- name: bam qc picard wgs
|
||||||
|
command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_wgs -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- subworkflows
|
||||||
|
# - subworkflows/bam_qc_picard
|
||||||
|
# Modules
|
||||||
|
# - picard
|
||||||
|
# - picard/collectmultiplemetrics
|
||||||
|
# - picard/collectwgsmetrics
|
||||||
|
files:
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics
|
||||||
|
- path: ./output/picard/test.CollectWgsMetrics.coverage_metrics
|
||||||
|
|
||||||
|
- name: bam qc picard targetted
|
||||||
|
command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_targetted -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- subworkflows
|
||||||
|
# - subworkflows/bam_qc_picard
|
||||||
|
# Modules
|
||||||
|
# - picard
|
||||||
|
# - picard/collectmultiplemetrics
|
||||||
|
# - picard/collecthsmetrics
|
||||||
|
files:
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics
|
||||||
|
- path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics
|
||||||
|
- path: ./output/picard/test.CollectHsMetrics.coverage_metrics
|
Loading…
Reference in a new issue