update args & convert to bam (#1355)

This commit is contained in:
Sateesh 2022-02-25 13:06:39 -05:00 committed by GitHub
parent 4c59984d7b
commit 8a20253f40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 15 deletions

View file

@ -1,6 +1,6 @@
process PICARD_CLEANSAM { process PICARD_CLEANSAM {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_medium'
conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) conda (params.enable_conda ? "bioconda::picard=2.26.9" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
@ -8,10 +8,10 @@ process PICARD_CLEANSAM {
'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }"
input: input:
tuple val(meta), path(sam) tuple val(meta), path(bam)
output: output:
tuple val(meta), path("*.sam"), emit: sam tuple val(meta), path("*.bam"), emit: bam
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when: when:
@ -20,7 +20,6 @@ process PICARD_CLEANSAM {
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 STRINGENCY = task.ext.stringency ?: "STRICT"
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {
log.info '[Picard CleanSam] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' log.info '[Picard CleanSam] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
@ -32,9 +31,8 @@ process PICARD_CLEANSAM {
-Xmx${avail_mem}g \\ -Xmx${avail_mem}g \\
CleanSam \\ CleanSam \\
${args} \\ ${args} \\
-I ${sam} \\ -I ${bam} \\
-O ${prefix}.sam \\ -O ${prefix}.bam
--VALIDATION_STRINGENCY ${STRINGENCY}
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -1,8 +1,7 @@
name: picard_cleansam name: picard_cleansam
description: Cleans the provided SAM/BAM, soft-clipping beyond-end-of-reference alignments and setting MAPQ to 0 for unmapped reads description: Cleans the provided BAM, soft-clipping beyond-end-of-reference alignments and setting MAPQ to 0 for unmapped reads
keywords: keywords:
- clean - clean
- sam
- bam - bam
tools: tools:
- picard: - picard:
@ -22,8 +21,8 @@ input:
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- sam: - sam:
type: file type: file
description: SAM file description: BAM file
pattern: "*.{sam}" pattern: "*.{bam}"
output: output:
- meta: - meta:
@ -37,8 +36,8 @@ output:
pattern: "versions.yml" pattern: "versions.yml"
- sam: - sam:
type: file type: file
description: Cleaned SAM file description: Cleaned BAM file
pattern: "*.{sam}" pattern: "*.{bam}"
authors: authors:
- "@sateeshperi" - "@sateeshperi"

View file

@ -4,7 +4,7 @@
- picard/cleansam - picard/cleansam
- picard - picard
files: files:
- path: output/picard/test.sam - path: output/picard/test.bam
md5sum: e314171a6060eb79947c13ad126ddf00 md5sum: a48f8e77a1480445efc57570c3a38a68
- path: output/picard/versions.yml - path: output/picard/versions.yml
md5sum: e6457d7c6de51bf6f4b577eda65e57ac md5sum: e6457d7c6de51bf6f4b577eda65e57ac