mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-21 18:58:16 +00:00
Adding new module gfaffix (#1149)
* Adding new module gfaffix. * add missing entry to pytest_modules.yml * update to 0.1.4--hec16e2b_0 * fixup after prettier * add when section * update md5sum * Change to process_single as discussed Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Co-authored-by: Simon Heumos <simon.heumos@qbic.uni-tuebingen.de>
This commit is contained in:
parent
f434d0c671
commit
ee5f59705f
6 changed files with 113 additions and 0 deletions
36
modules/gfaffix/main.nf
Normal file
36
modules/gfaffix/main.nf
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
process GFAFFIX {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_single'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? 'bioconda::gfaffix=0.1.4' : null)
|
||||||
|
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/gfaffix:0.1.4--hec16e2b_0' :
|
||||||
|
'quay.io/biocontainers/gfaffix:0.1.4--hec16e2b_0' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(gfa)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.gfa"), emit: gfa
|
||||||
|
tuple val(meta), path("*.txt"), emit: affixes
|
||||||
|
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}"
|
||||||
|
"""
|
||||||
|
gfaffix \\
|
||||||
|
$args \\
|
||||||
|
$gfa \\
|
||||||
|
-o ${prefix}.gfaffix.gfa > ${prefix}.affixes.txt
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
gfaffix: \$(gfaffix --version 2>&1 | grep -o 'gfaffix .*' | cut -f2 -d ' ')
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
46
modules/gfaffix/meta.yml
Normal file
46
modules/gfaffix/meta.yml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
name: gfaffix
|
||||||
|
description: Collapse walk-preserving shared affixes in variation graphs in GFA format
|
||||||
|
keywords:
|
||||||
|
- gfa
|
||||||
|
- graph
|
||||||
|
- pangenome
|
||||||
|
- variation graph
|
||||||
|
tools:
|
||||||
|
- gfaffix:
|
||||||
|
description: |
|
||||||
|
GFAffix identifies walk-preserving shared affixes in variation graphs and
|
||||||
|
collapses them into a non-redundant graph structure.
|
||||||
|
homepage: https://github.com/marschall-lab/GFAffix
|
||||||
|
documentation: https://github.com/marschall-lab/GFAffix
|
||||||
|
licence: ["MIT"]
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- gfa:
|
||||||
|
type: file
|
||||||
|
description: Variation graph in GFA format
|
||||||
|
pattern: "*.{gfa}"
|
||||||
|
|
||||||
|
output:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- gfa:
|
||||||
|
type: file
|
||||||
|
description: Non-redundant variation graph in GFA 1.0 format
|
||||||
|
pattern: "*.{gfa}"
|
||||||
|
- affixes:
|
||||||
|
type: file
|
||||||
|
description: Shared affixes in tab-separated values (TSV) text format
|
||||||
|
pattern: "*.{txt}"
|
||||||
|
- versions:
|
||||||
|
type: file
|
||||||
|
description: File containing software versions
|
||||||
|
pattern: "versions.yml"
|
||||||
|
authors:
|
||||||
|
- "@heuermh"
|
|
@ -1087,6 +1087,10 @@ genrich:
|
||||||
- modules/genrich/**
|
- modules/genrich/**
|
||||||
- tests/modules/genrich/**
|
- tests/modules/genrich/**
|
||||||
|
|
||||||
|
gfaffix:
|
||||||
|
- modules/gfaffix/**
|
||||||
|
- tests/modules/gfaffix/**
|
||||||
|
|
||||||
gffread:
|
gffread:
|
||||||
- modules/gffread/**
|
- modules/gffread/**
|
||||||
- tests/modules/gffread/**
|
- tests/modules/gffread/**
|
||||||
|
|
13
tests/modules/gfaffix/main.nf
Normal file
13
tests/modules/gfaffix/main.nf
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { GFAFFIX } from '../../../modules/gfaffix/main.nf'
|
||||||
|
|
||||||
|
workflow test_gfaffix {
|
||||||
|
input = [ [ id:'test' ], // meta map
|
||||||
|
[ file(params.test_data['sarscov2']['illumina']['assembly_gfa'], checkIfExists: true)]
|
||||||
|
]
|
||||||
|
|
||||||
|
GFAFFIX ( input )
|
||||||
|
}
|
5
tests/modules/gfaffix/nextflow.config
Normal file
5
tests/modules/gfaffix/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
9
tests/modules/gfaffix/test.yml
Normal file
9
tests/modules/gfaffix/test.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
- name: gfaffix
|
||||||
|
command: nextflow run ./tests/modules/gfaffix -entry test_gfaffix -c ./tests/config/nextflow.config -c ./tests/modules/gfaffix/nextflow.config
|
||||||
|
tags:
|
||||||
|
- gfaffix
|
||||||
|
files:
|
||||||
|
- path: output/gfaffix/test.gfaffix.gfa
|
||||||
|
md5sum: 7b51abeeab7706393957fcb66d31704a
|
||||||
|
- path: output/gfaffix/test.affixes.txt
|
||||||
|
md5sum: c3540baa386462552d7ebe4e4b7eda6a
|
Loading…
Reference in a new issue