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 {
tag "$meta.id"
label 'process_low'
label 'process_medium'
conda (params.enable_conda ? "bioconda::picard=2.26.9" : null)
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' }"
input:
tuple val(meta), path(sam)
tuple val(meta), path(bam)
output:
tuple val(meta), path("*.sam"), emit: sam
tuple val(meta), path("*.bam"), emit: bam
path "versions.yml" , emit: versions
when:
@ -20,7 +20,6 @@ process PICARD_CLEANSAM {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def STRINGENCY = task.ext.stringency ?: "STRICT"
def avail_mem = 3
if (!task.memory) {
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 \\
CleanSam \\
${args} \\
-I ${sam} \\
-O ${prefix}.sam \\
--VALIDATION_STRINGENCY ${STRINGENCY}
-I ${bam} \\
-O ${prefix}.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -1,8 +1,7 @@
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:
- clean
- sam
- bam
tools:
- picard:
@ -22,8 +21,8 @@ input:
e.g. [ id:'test', single_end:false ]
- sam:
type: file
description: SAM file
pattern: "*.{sam}"
description: BAM file
pattern: "*.{bam}"
output:
- meta:
@ -37,8 +36,8 @@ output:
pattern: "versions.yml"
- sam:
type: file
description: Cleaned SAM file
pattern: "*.{sam}"
description: Cleaned BAM file
pattern: "*.{bam}"
authors:
- "@sateeshperi"

View file

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