Merge branch 'master' into subwf/bam_qc

This commit is contained in:
Matthias De Smet 2022-04-29 11:39:18 +02:00 committed by GitHub
commit 3997d28a77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 83 additions and 87 deletions

View file

@ -27,8 +27,8 @@ process MINIMAP2_ALIGN {
def prefix = task.ext.prefix ?: "${meta.id}"
def input_reads = meta.single_end ? "$reads" : "${reads[0]} ${reads[1]}"
def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf"
def cigar_paf = cigar_paf_format && !sam_format ? "-c" : ''
def set_cigar_bam = cigar_bam && sam_format ? "-L" : ''
def cigar_paf = cigar_paf_format && !bam_format ? "-c" : ''
def set_cigar_bam = cigar_bam && bam_format ? "-L" : ''
"""
minimap2 \\
$args \\

View file

@ -2,10 +2,10 @@ process PICARD_ADDORREPLACEREADGROUPS {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
@ -38,12 +38,12 @@ process PICARD_ADDORREPLACEREADGROUPS {
-Xmx${avail_mem}g \\
--INPUT ${bam} \\
--OUTPUT ${prefix}.bam \\
-ID ${ID} \\
-LB ${LIBRARY} \\
-PL ${PLATFORM} \\
-PU ${BARCODE} \\
-SM ${SAMPLE} \\
-CREATE_INDEX true
--RGID ${ID} \\
--RGLB ${LIBRARY} \\
--RGPL ${PLATFORM} \\
--RGPU ${BARCODE} \\
--RGSM ${SAMPLE} \\
--CREATE_INDEX true
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -2,10 +2,10 @@ process PICARD_CLEANSAM {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
@ -31,8 +31,8 @@ process PICARD_CLEANSAM {
-Xmx${avail_mem}g \\
CleanSam \\
${args} \\
-I ${bam} \\
-O ${prefix}.bam
--INPUT ${bam} \\
--OUTPUT ${prefix}.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -2,10 +2,10 @@ process PICARD_COLLECTHSMETRICS {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
@ -38,10 +38,10 @@ process PICARD_COLLECTHSMETRICS {
CollectHsMetrics \\
$args \\
$reference \\
-BAIT_INTERVALS $bait_intervals \\
-TARGET_INTERVALS $target_intervals \\
-INPUT $bam \\
-OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics
--BAIT_INTERVALS $bait_intervals \\
--TARGET_INTERVALS $target_intervals \\
--INPUT $bam \\
--OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics
cat <<-END_VERSIONS > versions.yml

View file

@ -2,10 +2,10 @@ process PICARD_COLLECTMULTIPLEMETRICS {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
@ -33,9 +33,9 @@ process PICARD_COLLECTMULTIPLEMETRICS {
-Xmx${avail_mem}g \\
CollectMultipleMetrics \\
$args \\
INPUT=$bam \\
OUTPUT=${prefix}.CollectMultipleMetrics \\
REFERENCE_SEQUENCE=$fasta
--INPUT $bam \\
--OUTPUT ${prefix}.CollectMultipleMetrics \\
--REFERENCE_SEQUENCE $fasta
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -2,13 +2,13 @@ process PICARD_COLLECTWGSMETRICS {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam), path(bai)
tuple val(meta), path(bam)
path fasta
output:
@ -32,9 +32,10 @@ process PICARD_COLLECTWGSMETRICS {
-Xmx${avail_mem}g \\
CollectWgsMetrics \\
$args \\
INPUT=$bam \\
OUTPUT=${prefix}.CollectWgsMetrics.coverage_metrics \\
REFERENCE_SEQUENCE=$fasta
--INPUT $bam \\
--OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\
--REFERENCE_SEQUENCE $fasta
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -2,10 +2,10 @@ process PICARD_CREATESEQUENCEDICTIONARY {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(fasta)
@ -31,8 +31,8 @@ process PICARD_CREATESEQUENCEDICTIONARY {
-Xmx${avail_mem}g \\
CreateSequenceDictionary \\
$args \\
R=$fasta \\
O=${prefix}.dict
--REFERENCE $fasta \\
--OUTPUT ${prefix}.dict
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -2,10 +2,10 @@ process PICARD_CROSSCHECKFINGERPRINTS {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(input1)

View file

@ -2,10 +2,10 @@ process PICARD_FILTERSAMREADS {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam), path(readlist)

View file

@ -2,10 +2,10 @@ process PICARD_FIXMATEINFORMATION {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
@ -31,8 +31,8 @@ process PICARD_FIXMATEINFORMATION {
picard \\
FixMateInformation \\
-Xmx${avail_mem}g \\
-I ${bam} \\
-O ${prefix}.bam \\
--INPUT ${bam} \\
--OUTPUT ${prefix}.bam \\
--VALIDATION_STRINGENCY ${STRINGENCY}
cat <<-END_VERSIONS > versions.yml

View file

@ -2,10 +2,10 @@ process PICARD_LIFTOVERVCF {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(input_vcf)
@ -35,11 +35,11 @@ process PICARD_LIFTOVERVCF {
-Xmx${avail_mem}g \\
LiftoverVcf \\
$args \\
I=$input_vcf \\
O=${prefix}.lifted.vcf.gz \\
CHAIN=$chain \\
REJECT=${prefix}.unlifted.vcf.gz \\
R=$fasta
--INPUT $input_vcf \\
--OUTPUT ${prefix}.lifted.vcf.gz \\
--CHAIN $chain \\
--REJECT ${prefix}.unlifted.vcf.gz \\
--REFERENCE_SEQUENCE $fasta
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -2,10 +2,10 @@ process PICARD_MARKDUPLICATES {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
@ -33,9 +33,9 @@ process PICARD_MARKDUPLICATES {
-Xmx${avail_mem}g \\
MarkDuplicates \\
$args \\
I=$bam \\
O=${prefix}.bam \\
M=${prefix}.MarkDuplicates.metrics.txt
--INPUT $bam \\
--OUTPUT ${prefix}.bam \\
--METRICS_FILE ${prefix}.MarkDuplicates.metrics.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -2,10 +2,10 @@ process PICARD_MERGESAMFILES {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bams)
@ -33,8 +33,8 @@ process PICARD_MERGESAMFILES {
-Xmx${avail_mem}g \\
MergeSamFiles \\
$args \\
${'INPUT='+bam_files.join(' INPUT=')} \\
OUTPUT=${prefix}.bam
${'--INPUT '+bam_files.join(' --INPUT ')} \\
--OUTPUT ${prefix}.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
picard: \$( echo \$(picard MergeSamFiles --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:)

View file

@ -2,10 +2,10 @@ process PICARD_SORTSAM {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam)

View file

@ -2,10 +2,10 @@ process PICARD_SORTVCF {
tag "$meta.id"
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 ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf)
@ -22,8 +22,8 @@ process PICARD_SORTVCF {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def seq_dict = sequence_dict ? "-SEQUENCE_DICTIONARY $sequence_dict" : ""
def reference = reference ? "-REFERENCE_SEQUENCE $reference" : ""
def seq_dict = sequence_dict ? "--SEQUENCE_DICTIONARY $sequence_dict" : ""
def reference = reference ? "--REFERENCE_SEQUENCE $reference" : ""
def avail_mem = 3
if (!task.memory) {
log.info '[Picard SortVcf] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'

View file

@ -7,4 +7,3 @@
- path: output/picard/test.bam
md5sum: 7b82f3461c2d80fc6a10385e78c9427f
- path: output/picard/versions.yml
md5sum: 8a2d176295e1343146ea433c79bb517f

View file

@ -7,4 +7,3 @@
- path: output/picard/test.bam
md5sum: a48f8e77a1480445efc57570c3a38a68
- path: output/picard/versions.yml
md5sum: e6457d7c6de51bf6f4b577eda65e57ac

View file

@ -7,7 +7,6 @@ include { PICARD_COLLECTWGSMETRICS } from '../../../../modules/picard/collectwgs
workflow test_picard_collectwgsmetrics {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)
]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)

View file

@ -7,4 +7,3 @@
- path: output/picard/test.dict
contains: ["SN:MT192765.1"]
- path: output/picard/versions.yml
md5sum: b3d8c7ea65b8a6d3237b153d13fe2014

View file

@ -7,4 +7,3 @@
- path: output/picard/test.bam
md5sum: 746102e8c242c0ef42e045c49d320030
- path: output/picard/versions.yml
md5sum: 4329ba7cdca8f4f6018dfd5c019ba2eb

View file

@ -1,5 +1,5 @@
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()}" }
}

View file

@ -3,7 +3,7 @@ process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
withName: PICARD_MARKDUPLICATES_UNSORTED {
ext.args = 'ASSUME_SORT_ORDER=queryname'
ext.args = '--ASSUME_SORT_ORDER queryname'
}
}