Add hifiasm version printing

This commit is contained in:
Sviatoslav Sidorov 2021-03-16 13:14:43 +00:00
parent 390c835f9f
commit b58233794b
2 changed files with 21 additions and 16 deletions

View file

@ -4,33 +4,34 @@ include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:] params.options = [:]
options = initOptions(params.options) options = initOptions(params.options)
process FASTQC { process HIFIASM {
tag "$meta.id" //tag "$meta.id"
label 'process_medium' label 'process_high'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') } // publish_id:meta.id) }
conda (params.enable_conda ? "bioconda::fastqc=0.11.9" : null) conda (params.enable_conda ? "bioconda::hifiasm=0.14" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0" container "https://depot.galaxyproject.org/singularity/hifiasm:0.14--h8b12597_0"
} else { } else {
container "quay.io/biocontainers/fastqc:0.11.9--0" container "quay.io/biocontainers/hifiasm:0.14--h8b12597_0"
} }
input: /* input:
tuple val(meta), path(reads) tuple val(meta), path(reads) */
output: output:
tuple val(meta), path("*.html"), emit: html /* tuple val(meta), path("*.html"), emit: html
tuple val(meta), path("*.zip") , emit: zip tuple val(meta), path("*.zip") , emit: zip */
path "*.version.txt" , emit: version path "*.version.txt" , emit: version
script: script:
// Add soft-links to original FastQs for consistent naming in pipeline // Add soft-links to original FastQs for consistent naming in pipeline
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}.${options.suffix}" : "${meta.id}" //def prefix = options.suffix ? "${meta.id}.${options.suffix}" : "${meta.id}"
if (meta.single_end) {
/* if (meta.single_end) {
""" """
[ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz
fastqc $options.args --threads $task.cpus ${prefix}.fastq.gz fastqc $options.args --threads $task.cpus ${prefix}.fastq.gz
@ -43,5 +44,9 @@ process FASTQC {
fastqc $options.args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz fastqc $options.args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz
fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt
""" """
} } */
"""
hifiasm --version > ${software}.version.txt || exit 0
"""
} }

View file

@ -1,7 +1,7 @@
- name: hifiasm - name: hifiasm
command: nextflow run ./tests/software/hifiasm/ -entry test_hifiasm_version -c tests/config/nextflow.config command: nextflow run ./tests/software/hifiasm -entry test_hifiasm_version -c tests/config/nextflow.config
tags: tags:
- hifiasm - hifiasm
- hifiasm_version - hifiasm_version
files: files:
- path: ./output/hifiasm/VERSION.txt - path: ./output/hifiasm/hifiasm.version.txt