-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
process SEQKIT_FX2TAB { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "bioconda::seqkit=2.1.0" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/seqkit:2.1.0--h9ee0642_0' : | ||
'biocontainers/seqkit:2.1.0--h9ee0642_0' }" | ||
|
||
input: | ||
tuple val(meta), path(fastx) | ||
|
||
output: | ||
tuple val(meta), path("*.txt*"), emit: text | ||
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 suffix = task.ext.suffix ?: "txt.zst" | ||
""" | ||
seqkit \\ | ||
fx2tab \\ | ||
$args \\ | ||
--threads $task.cpus \\ | ||
$fastx \\ | ||
-o ${prefix}.${suffix} | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
seqkit: \$( seqkit | sed '3!d; s/Version: //' ) | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: seqkit_fx2tab | ||
description: Convert FASTA/Q to tabular format, and provide various information, like sequence length, GC content/GC skew. | ||
keywords: | ||
- fasta | ||
- fastq | ||
- text | ||
- tabular | ||
- convert | ||
tools: | ||
- seqkit: | ||
description: | | ||
Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. | ||
homepage: https://github.com/shenwei356/seqkit | ||
documentation: https://bioinf.shenwei.me/seqkit/ | ||
doi: 10.1371/journal.pone.0163962 | ||
licence: ["MIT"] | ||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- fastx: | ||
type: file | ||
description: Sequence file in fasta/q format | ||
pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}[.gz,.zst]" | ||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- text: | ||
type: file | ||
description: Text file in tabular format | ||
pattern: "*.txt[.gz,.zstd,.zst]" | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@heuermh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { SEQKIT_FX2TAB } from '../../../../../modules/nf-core/seqkit/fx2tab/main.nf' | ||
|
||
workflow test_seqkit_fx2tab_fasta { | ||
|
||
input = [ [ id:'test' ], // meta map | ||
[ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] | ||
] | ||
|
||
SEQKIT_FX2TAB ( input ) | ||
|
||
} | ||
|
||
workflow test_seqkit_fx2tab_fastq { | ||
|
||
input = [ [ id:'test' ], // meta map | ||
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] | ||
] | ||
|
||
SEQKIT_FX2TAB ( input ) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
process { | ||
|
||
withName: 'SEQKIT_FX2TAB' { | ||
ext.args = "" | ||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- name: seqkit fx2tab test_seqkit_fx2tab_fasta | ||
command: nextflow run ./tests/modules/nf-core/seqkit/fx2tab -entry test_seqkit_fx2tab_fasta -c ./tests/config/nextflow.config | ||
tags: | ||
- seqkit/fx2tab | ||
- seqkit | ||
files: | ||
- path: output/seqkit/test.txt.zst | ||
md5sum: 9d6751134b38b57b1d2f76f508b610fa | ||
- path: output/seqkit/versions.yml | ||
- name: seqkit fx2tab test_seqkit_fx2tab_fastq | ||
command: nextflow run ./tests/modules/nf-core/seqkit/fx2tab -entry test_seqkit_fx2tab_fastq -c ./tests/config/nextflow.config | ||
tags: | ||
- seqkit/fx2tab | ||
- seqkit | ||
files: | ||
- path: output/seqkit/test.txt.zst | ||
md5sum: df053f44dbaa8576e93426274e73c2b5 | ||
- path: output/seqkit/versions.yml |