Add FastK/Histex (#1776)

This commit is contained in:
Mahesh Binzer-Panchal 2022-06-14 16:30:37 +02:00 committed by GitHub
parent 1a4ab76618
commit fd5aea0b76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 114 additions and 0 deletions

View file

@ -0,0 +1,35 @@
process FASTK_HISTEX {
tag "$meta.id"
label 'process_low'
if (params.enable_conda) {
error "Conda environments cannot be used when using the FastK tool. Please use docker or singularity containers."
}
container 'ghcr.io/nbisweden/fastk_genescopefk_merquryfk:1.0'
input:
tuple val(meta), path(histogram)
output:
tuple val(meta), path("*.hist"), emit: hist
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def FASTK_VERSION = 'f18a4e6d2207539f7b84461daebc54530a9559b0'
"""
Histex \\
$args \\
$histogram \\
> ${prefix}.hist
cat <<-END_VERSIONS > versions.yml
"${task.process}":
fastk: $FASTK_VERSION
END_VERSIONS
"""
}

View file

@ -0,0 +1,42 @@
name: "fastk_histex"
description: A fast K-mer counter for high-fidelity shotgun datasets
keywords:
- k-mer
- histogram
tools:
- "fastk":
description: "A fast K-mer counter for high-fidelity shotgun datasets"
homepage: "https://github.com/thegenemyers/FASTK"
documentation: ""
tool_dev_url: "https://github.com/thegenemyers/FASTK"
doi: ""
licence: "https://github.com/thegenemyers/FASTK/blob/master/LICENSE"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- histogram:
type: file
description: A FastK histogram file
pattern: "*.hist"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- hist:
type: file
description: A formatted histogram file
pattern: "*.hist"
authors:
- "@mahesh-panchal"

View file

@ -679,6 +679,10 @@ fastk/fastk:
- modules/fastk/fastk/**
- tests/modules/fastk/fastk/**
fastk/histex:
- modules/fastk/histex/**
- tests/modules/fastk/histex/**
fastp:
- modules/fastp/**
- tests/modules/fastp/**

View file

@ -0,0 +1,17 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { FASTK_FASTK } from '../../../../modules/fastk/fastk/main.nf'
include { FASTK_HISTEX } from '../../../../modules/fastk/histex/main.nf'
workflow test_fastk_histex {
input = [
[ id:'test' , single_end: true ], // meta map
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
]
FASTK_FASTK ( input )
FASTK_HISTEX ( FASTK_FASTK.out.hist )
}

View file

@ -0,0 +1,8 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
withName: 'FASTK_FASTK' {
publishDir = [ enabled: false ]
}
}

View file

@ -0,0 +1,8 @@
- name: fastk histex test_fastk_histex
command: nextflow run ./tests/modules/fastk/histex -entry test_fastk_histex -c ./tests/config/nextflow.config -c ./tests/modules/fastk/histex/nextflow.config
tags:
- fastk/histex
- fastk
files:
- path: output/fastk/test.hist
md5sum: e3f0c9e7641a46525123312008e4ae86