Build KMC index
Builds a reusable KMC KFF index from a FASTA reference.
- Step type:
Utility step
Run this step
ASOkai run --step build-kmc-index --config-file ./config.yaml
Example configuration for this step:
datadir: ./data
parameters:
target:
k: 16
Parameters
These scalar configuration values are passed to this step.
Configuration path |
Details |
|---|---|
|
Accepted value: integer; minimum: 1 Requirement: Required Description: Target-site length. |
|
Accepted value: string; one of: fa, fm Requirement: Optional Description: FASTA input format. |
|
Accepted value: boolean Requirement: Optional Description: Use strict memory mode. |
|
Accepted value: boolean Requirement: Optional Description: Count homopolymer-compressed k-mers. |
|
Accepted value: integer or null; minimum: 5; maximum: 11 Requirement: Optional Description: Signature length. |
|
Accepted value: integer; minimum: 1 Requirement: Optional Description: Minimum count to retain. |
|
Accepted value: integer or null; minimum: 1 Requirement: Optional Description: Maximum stored count. |
|
Accepted value: integer or null; minimum: 1 Requirement: Optional Description: Maximum count to retain. |
|
Accepted value: boolean Requirement: Optional Description: Disable canonical k-mers. |
|
Accepted value: boolean Requirement: Optional Description: Use RAM-only mode. |
|
Accepted value: integer or null; minimum: 1 Requirement: Optional Description: Number of bins. |
|
Accepted value: integer or null; minimum: 1 Requirement: Optional Description: Input-reading threads. |
|
Accepted value: integer or null; minimum: 1 Requirement: Optional Description: Splitting threads. |
|
Accepted value: integer or null; minimum: 1 Requirement: Optional Description: Second-stage threads. |
|
Accepted value: boolean Requirement: Optional Description: Optimize output database size. |
Parameter rules
exactly one of these config values is required: target_id, target_name
Inputs
An input with a fixed producer uses that output by default. A selected run can instead link a named output or supply an existing path. The input’s path override in config.yaml also selects an existing file. External paths are validated against the input’s file contract.
File input |
Details |
|---|---|
|
Shared config source: Format: plain or gzip-compressed FASTA reference Description: Plain or gzip-compressed FASTA reference to count. |
Example path-override configuration:
steps:
build-kmc-index:
inputs:
reference:
path: /path/to/reference.fa
Resources
Configurable resources use the first value in the resolution order shown below.
Resource setting |
Details |
|---|---|
|
Step override: Shared default: Built-in fallback: 1 Accepted value: integer; minimum: 1 Description: Number of workers allocated to a step that supports parallel execution. |
|
Step override: Shared default: Built-in fallback: 4096 Accepted value: integer; minimum: 1 Description: Memory in mebibytes allocated to this step. |
Outputs
File output paths are relative to datadir. Braced names are replaced with the corresponding parameter values.
File outputs
File output |
Details |
|---|---|
|
Format: KFF k-mer index Description: Reference k-mer counts in KFF format. Path template: Example path: |
Note
This step invokes the third-party kmc and kmc_tools executables.
KMC is GPLv3-only software; ASOkai does not distribute or link against it.
Install the executables through the supplied Conda environment.
Supply a plain or gzip-compressed FASTA file as reference. The step builds
one KFF index using the configured k-mer length and KMC options. Set
resources.build-kmc-index.memory_mb to control KMC’s memory limit.
Configure parameters.genome.assembly, parameters.genome.source, and
parameters.genome.release to place the index under its genome
directory. Link the step to a named genome download when the FASTA needs to be
created:
datadir: /path/to/data
parameters:
genome:
assembly: GRCh38
source: ensembl
release: 114
species: Homo_sapiens
runs:
- step: download-genome
id: genome
- step: build-kmc-index
parameters:
k: 16
inputs:
reference:
from: run.genome.dna
If the FASTA already exists, select only build-kmc-index and supply its
reference input with {path: /path/to/genome.fa}.
For a target gene, name an instantiate-target-gene task run target_gene
and link reference to run.target_gene.fasta instead.