Merge pull request #1683 from matthdsm/update/picard

picard: make reference sequence optional
This commit is contained in:
Matthias De Smet 2022-05-23 20:06:11 +02:00 committed by GitHub
commit 91f9a0711d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 67 additions and 26 deletions

View file

@ -24,7 +24,7 @@ process PICARD_COLLECTHSMETRICS {
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 reference = fasta ? "-R $fasta" : "" def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : ""
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {

View file

@ -22,6 +22,7 @@ process PICARD_COLLECTMULTIPLEMETRICS {
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 reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : ""
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {
log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
@ -35,7 +36,7 @@ process PICARD_COLLECTMULTIPLEMETRICS {
$args \\ $args \\
--INPUT $bam \\ --INPUT $bam \\
--OUTPUT ${prefix}.CollectMultipleMetrics \\ --OUTPUT ${prefix}.CollectMultipleMetrics \\
--REFERENCE_SEQUENCE $fasta $reference
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -34,7 +34,7 @@ process PICARD_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

View file

@ -16,3 +16,14 @@ workflow test_picard_collecthsmetrics {
PICARD_COLLECTHSMETRICS ( input, fasta, fai, bait_intervals, target_intervals ) PICARD_COLLECTHSMETRICS ( input, fasta, fai, bait_intervals, target_intervals )
} }
workflow test_picard_collecthsmetrics_nofasta {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ]
bait_intervals = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true)
target_intervals = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true)
PICARD_COLLECTHSMETRICS ( input, [], [], bait_intervals, target_intervals )
}

View file

@ -1,8 +1,15 @@
- name: picard collecthsmetrics test_picard_collecthsmetrics - name: picard collecthsmetrics test_picard_collecthsmetrics
command: nextflow run ./tests/modules/picard/collecthsmetrics -entry test_picard_collecthsmetrics -c ./tests/config/nextflow.config -c ./tests/modules/picard/collecthsmetrics/nextflow.config command: nextflow run ./tests/modules/picard/collecthsmetrics -entry test_picard_collecthsmetrics -c ./tests/config/nextflow.config -c ./tests/modules/picard/collecthsmetrics/nextflow.config
tags: tags:
- picard
- picard/collecthsmetrics - picard/collecthsmetrics
- picard
files:
- path: output/picard/test.CollectHsMetrics.coverage_metrics
- name: picard collecthsmetrics test_picard_collecthsmetrics_nofasta
command: nextflow run ./tests/modules/picard/collecthsmetrics -entry test_picard_collecthsmetrics_nofasta -c ./tests/config/nextflow.config -c ./tests/modules/picard/collecthsmetrics/nextflow.config
tags:
- picard/collecthsmetrics
- picard
files: files:
# The file can't be md5'd consistently
- path: output/picard/test.CollectHsMetrics.coverage_metrics - path: output/picard/test.CollectHsMetrics.coverage_metrics

View file

@ -5,10 +5,20 @@ nextflow.enable.dsl = 2
include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../../modules/picard/collectmultiplemetrics/main.nf' include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../../modules/picard/collectmultiplemetrics/main.nf'
workflow test_picard_collectmultiplemetrics { workflow test_picard_collectmultiplemetrics {
input = [ [ id:'test', single_end:false ], // meta map input = [
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) [ 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 = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
PICARD_COLLECTMULTIPLEMETRICS ( input, fasta ) PICARD_COLLECTMULTIPLEMETRICS ( input, fasta )
} }
workflow test_picard_collectmultiplemetrics_nofasta {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
]
PICARD_COLLECTMULTIPLEMETRICS ( input, [] )
}

View file

@ -1,17 +1,33 @@
- name: picard collectmultiplemetrics - name: picard collectmultiplemetrics test_picard_collectmultiplemetrics
command: nextflow run ./tests/modules/picard/collectmultiplemetrics -entry test_picard_collectmultiplemetrics -c ./tests/config/nextflow.config -c ./tests/modules/picard/collectmultiplemetrics/nextflow.config command: nextflow run ./tests/modules/picard/collectmultiplemetrics -entry test_picard_collectmultiplemetrics -c ./tests/config/nextflow.config -c ./tests/modules/picard/collectmultiplemetrics/nextflow.config
tags: tags:
- picard - picard
- picard/collectmultiplemetrics - picard/collectmultiplemetrics
files: files:
# These can't be md5'd consistently - path: output/picard/test.CollectMultipleMetrics.alignment_summary_metrics
- path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics - path: output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle.pdf
- path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics - path: output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics
- path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics - path: output/picard/test.CollectMultipleMetrics.insert_size_histogram.pdf
- path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_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.pdf
- path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle.pdf - path: output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics
- path: ./output/picard/test.CollectMultipleMetrics.quality_distribution.pdf - path: output/picard/test.CollectMultipleMetrics.quality_distribution.pdf
- path: ./output/picard/test.CollectMultipleMetrics.read_length_histogram.pdf - path: output/picard/test.CollectMultipleMetrics.quality_distribution_metrics
- path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle.pdf - path: output/picard/test.CollectMultipleMetrics.read_length_histogram.pdf
- path: ./output/picard/test.CollectMultipleMetrics.insert_size_histogram.pdf
- name: picard collectmultiplemetrics test_picard_collectmultiplemetrics_nofasta
command: nextflow run ./tests/modules/picard/collectmultiplemetrics -entry test_picard_collectmultiplemetrics_nofasta -c ./tests/config/nextflow.config -c ./tests/modules/picard/collectmultiplemetrics/nextflow.config
tags:
- picard
- picard/collectmultiplemetrics
files:
- path: output/picard/test.CollectMultipleMetrics.alignment_summary_metrics
- path: output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle.pdf
- path: output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics
- path: output/picard/test.CollectMultipleMetrics.insert_size_histogram.pdf
- path: output/picard/test.CollectMultipleMetrics.insert_size_metrics
- path: output/picard/test.CollectMultipleMetrics.quality_by_cycle.pdf
- path: output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics
- path: output/picard/test.CollectMultipleMetrics.quality_distribution.pdf
- path: output/picard/test.CollectMultipleMetrics.quality_distribution_metrics
- path: output/picard/test.CollectMultipleMetrics.read_length_histogram.pdf

View file

@ -1,11 +1,7 @@
- name: picard collectwgsmetrics test_picard_collectwgsmetrics - name: picard collectwgsmetrics test_picard_collectwgsmetrics
command: nextflow run ./tests/modules/picard/collectwgsmetrics -entry test_picard_collectwgsmetrics -c ./tests/config/nextflow.config -c ./tests/modules/picard/collectwgsmetrics/nextflow.config command: nextflow run ./tests/modules/picard/collectwgsmetrics -entry test_picard_collectwgsmetrics -c ./tests/config/nextflow.config -c ./tests/modules/picard/collectwgsmetrics/nextflow.config
tags: tags:
- picard/collectwgsmetrics - picard/collectwgsmetrics
- picard - picard
files: files:
- path: output/picard/test.CollectWgsMetrics.coverage_metrics - path: output/picard/test.CollectWgsMetrics.coverage_metrics
contains:
- "GENOME_TERRITORY"
- "29829"
- "17554"