Description

Resolve the taxonomy for a set of sequences: use an explicit taxonomy file if one is given (warning, not silently ignoring, if the sequences also carry embedded taxonomy text); otherwise derive taxonomy from each sequence’s own FASTA header, GTDB-style (>id taxonomy;string). Headers are always stripped down to a bare id in the output sequences, regardless of which taxonomy source was used. When taxonomy_required is false, records with neither source are dropped from the resolved taxonomy (with a warning) instead of failing the run.

Input

name:type
description
pattern

meta

:map

Groovy Map containing sample information. e.g. [ id:'sample1' ]

taxonomy

:file

Optional tab-separated taxonomy labels (seq_namerank1;rank2;…). Pass [] if not available – taxonomy is then derived from the sequences’ own FASTA headers instead.

*.{tax,tsv}

sequences

:file

Sequences, aligned or not, in FASTA, Clustal or PHYLIP format.

*.{fa,fasta,fna,aln,phy}

taxonomy_required

:boolean

Whether every record must end up with a resolved taxonomy. When true, a record with neither an explicit-file entry nor embedded header text fails the run. When false, such records are silently dropped from the resolved taxonomy output instead (a warning is still written).

Output

name:type
description
pattern

taxonomy

meta

:map

Groovy Map containing sample information. e.g. [ id:'sample1' ]

*.resolved.tax

:file

The resolved taxonomy, either passed through from the input file or derived from sequence headers. May have fewer records than the input sequences when taxonomy_required is false.

*.resolved.tax

sequences

meta

:map

Groovy Map containing sample information. e.g. [ id:'sample1' ]

*.resolved.${sequences.extension ?: 'fasta'}

:file

The input sequences (same format as the input), headers stripped down to a bare id.

*.resolved.*

warnings

meta

:map

Groovy Map containing sample information. e.g. [ id:'sample1' ]

*.warnings.txt

:file

One line per warning (e.g. embedded taxonomy text ignored, or records dropped); empty if none.

*.warnings.txt

versions_biopython

${task.process}

:string

The name of the process

biopython

:string

The name of the tool

python3 -c 'import Bio; print(Bio.__version__)'

:eval

The expression to obtain the version of the tool

Topics

name:type
description
pattern

versions

${task.process}

:string

The name of the process

biopython

:string

The name of the tool

python3 -c 'import Bio; print(Bio.__version__)'

:eval

The expression to obtain the version of the tool

Tools

biopython
Biopython License Agreement

Freely available tools for computational molecular biology.