Niu Du
06/05/2025, 6:08 PM-harshil-alignment option does not work correctly for the input and output sections, and it does the opposite of what's intended.
original:
output:
tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf
tuple val(meta), path("${prefix}.vcf.gz.tbi"), emit: tbi, optional: true
tuple val(meta), path("${prefix}.vcf.gz.csi"), emit: csi, optional: true
path "versions.yml" , emit: versions
after nextflow lint -format -harshil-alignment .:
tuple val(meta), path("${prefix}.vcf.gz"), emit: vcf
tuple val(meta), path("${prefix}.vcf.gz.tbi"), emit: tbi, optional: true
tuple val(meta), path("${prefix}.vcf.gz.csi"), emit: csi, optional: true
path "versions.yml", emit: versions
2. it introduces undesired line breaks that reduce code readability
original:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def index = args.contains("--write-index=tbi") || args.contains("-W=tbi") ? "tbi" :
args.contains("--write-index=csi") || args.contains("-W=csi") ? "csi" :
args.contains("--write-index") || args.contains("-W") ? "csi" :
""
after nextflow lint -format -harshil-alignment .:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def index = args.contains("--write-index=tbi") || args.contains("-W=tbi")
? "tbi"
: args.contains("--write-index=csi") || args.contains("-W=csi")
? "csi"
: args.contains("--write-index") || args.contains("-W")
? "csi"
: ""