Skip to content

Bracken estimates abundance at a given taxonomic level using the output report from Kraken 2. See the Bracken GitHub repo for more.

Function Call

tc.bracken(
    kraken2_report,
    output_path=None,
    output_primary_name="output.bracken",
    tool_args="",
    database_name="standard",
    database_version="1",
    remote_database_path=None,
    is_async=False,
)

Function Arguments

Argument Use in place of: Description
kraken2_report Kraken 2 report file input Path to Kraken 2 report file. The files can be a local or remote, see Using Files.
output_path -o directory name (optional) Path (directory) to where the output files will be downloaded. If omitted, skips download. The files can be a local or remote, see Using Files.
output_primary_name -o file name (Optional) Name of Bracken output file. Defaults to "output.bracken".
tool_args all other arguments (optional) Additional arguments to be passed to Bracken. This should be a string of arguments like the command line. See Supported Additional Arguments for more details.
database_name -d (optional) Name of database that was used for Kraken 2 alignment. Defaults to "standard".
database_version -d (optional) Version of database that was used for Kraken 2 alignment. Defaults to "1".
remote_database_path -d (optional) AWS S3 URI to a directory with your custom database that was used with Kraken 2 alignment.
is_async Whether to run a job asynchronously. See Async Runs for more.

See the Databases section for more details.

Output Files

A Bracken run will output one file into output_path:

  • output.bracken: Bracken report. You can change this name with the output_primary_name Toolchest argument.

Notes

Custom database arguments

If using custom_database_path, the given database will take priority over any database selected via database_name and database_version.

Tool Versions

Toolchest currently supports version 2.7 of Bracken.

Databases

Toolchest currently supports the following databases for Bracken 2:

database_name database_version Description
standard 1 RefSeq archaea, bacteria, viral, plasmid, human1, UniVec_Core1
refseq_fungi 20211120 RefSeq fungi, generated on 11/20/2021

1This database index was generated by the Langmead Lab at Johns Hopkins and can be found on the lab's database index page.

Custom Databases

Toolchest supports custom databases hosted in S3, so long as they are accessible from Toolchest. Use the argument custom_database_path to set the S3 URI of the folder with the database index files.

Supported Additional Arguments

  • -r (read length)
  • -l (taxonomic level)
  • -t (threshold)

These and any additional arguments are set with the tool_args Toolchest argument.