mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Add FastK/Histex (#1776)
This commit is contained in:
parent
1a4ab76618
commit
fd5aea0b76
6 changed files with 114 additions and 0 deletions
35
modules/fastk/histex/main.nf
Normal file
35
modules/fastk/histex/main.nf
Normal 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
|
||||||
|
"""
|
||||||
|
}
|
42
modules/fastk/histex/meta.yml
Normal file
42
modules/fastk/histex/meta.yml
Normal 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"
|
|
@ -679,6 +679,10 @@ fastk/fastk:
|
||||||
- modules/fastk/fastk/**
|
- modules/fastk/fastk/**
|
||||||
- tests/modules/fastk/fastk/**
|
- tests/modules/fastk/fastk/**
|
||||||
|
|
||||||
|
fastk/histex:
|
||||||
|
- modules/fastk/histex/**
|
||||||
|
- tests/modules/fastk/histex/**
|
||||||
|
|
||||||
fastp:
|
fastp:
|
||||||
- modules/fastp/**
|
- modules/fastp/**
|
||||||
- tests/modules/fastp/**
|
- tests/modules/fastp/**
|
||||||
|
|
17
tests/modules/fastk/histex/main.nf
Normal file
17
tests/modules/fastk/histex/main.nf
Normal 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 )
|
||||||
|
}
|
8
tests/modules/fastk/histex/nextflow.config
Normal file
8
tests/modules/fastk/histex/nextflow.config
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
withName: 'FASTK_FASTK' {
|
||||||
|
publishDir = [ enabled: false ]
|
||||||
|
}
|
||||||
|
}
|
8
tests/modules/fastk/histex/test.yml
Normal file
8
tests/modules/fastk/histex/test.yml
Normal 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
|
Loading…
Reference in a new issue