![]()
A TXT-type anviāo artifact. This artifact is typically provided by the user for anviāo to import into its databases, process, and/or use.
š To the main page of anviāo programs and artifacts.
There are no anviāo tools that generate this artifact, which means it is most likely provided to the anviāo ecosystem by the user.
There are no anviāo tools that require this artifact directly, which means it is most likely an end-product for the user.
This artifact is a TAB-delimited text file that gives a color of your choosing to each category compared on kegg-pathway-map files drawn by anvi-draw-kegg-pathways.
A ācategoryā is whatever the run compares: each sample of a kegg-reaction-txt or kegg-compound-txt file, each contigs-db, each genome of a pan-db, or ā when a groups-txt groups any of these ā each group. Normally anviāo picks those colors for you by sampling a colormap (--reaction-colormap). This file says exactly which color each category gets instead, so that a color means the same thing across every figure in a paper.
Pass it with --reaction-category-colors for the reaction layer, and --compound-category-colors for the compound layer of a kegg-compound-txt file. The two layers are colored independently, so each can take its own file; pointing both options at a single file gives them one set of colors and so one legend.
| Column | Required | Description |
|---|---|---|
| a category column | YES | The first column, which can be headed anything you like ā category, sample, genome, group ā so one file can describe samples in one run and groups in another without being renamed. Each row names one category, or a combination of them (see below). |
color |
YES | A six-digit color hex code, such as #1f77b4. Color names are not accepted, since the colors that pathway maps reserve for their own unhighlighted elements are compared as hex codes. |
Here is an example file:
| category | color |
|---|---|
| SAMPLE_1 | #1f77b4 |
| SAMPLE_2 | #ff7f0e |
| SAMPLE_3 | #2ca02c |
Every category of the run needs a color: anviāo will not fill in the gaps from a colormap, since that would put colors you chose and colors chosen for you on one scale. Names in the file that are not categories of the run are reported and ignored, so one file can serve several runs that each draw a different subset.
Coloring by membership colors a map element by exactly which categories contain it, so it needs a color for every combination of them ā with three samples, that is seven colors rather than three.
A category on its own takes its own color. A combination takes the blend of its membersā colors, mixed perceptually, so that an element in the green sample and the blue sample is drawn in the color between them. To set a combinationās color yourself, add a row naming its categories separated by commas, exactly as the colorbar labels it:
| category | color |
|---|---|
| SAMPLE_1 | #1f77b4 |
| SAMPLE_2 | #ff7f0e |
| SAMPLE_3 | #2ca02c |
| SAMPLE_1, SAMPLE_2 | #7d5ba6 |
Because a combination is written this way, no category name may itself contain a comma.
Two combinations can of course blend to the same color, and a discrete colorbar labels one band per combination ā so anviāo refuses to draw a scale whose bands cannot be told apart, and reports how many distinct colors it got. Adding rows for the offending combinations fixes it. Note that no color scale distinguishes combinations of more than a handful of categories in any case; past a few of them, color by count from a colormap instead ā with --presence-colormap-scheme by_count for databases and pangenomes, or a count sample or group summary (such as --reaction-sample-summary count) for a text file, which rejects the former.
The āunifiedā map and its colorbar. Each combination of categories takes its color as described above.
Each categoryās own map. With --draw-individual-files or --draw-grid, a categoryās map is drawn in that categoryās own color rather than in one shared color, so a panel of a grid says which category it is and matches the band it takes on the āunifiedā map.
Each groupās own map, on request. When a groups-txt groups the categories, a groupās own map is colored by how many of the groupās samples, databases, or genomes contain an element ā a magnitude rather than an identity ā and takes its colors from --group-colormap, which is unaffected by this file by default. Giving --group-colormap category instead builds each groupās scale as a ramp running from a pale tint to that groupās own color, binding the two: every groupās ramp is built the same way, so the panels of a grid stay comparable while each says which group it is.
anvi-draw-kegg-pathways --reaction-txt kegg-reaction-txt \ --groups-txt groups-txt \ --group-threshold 0.5 \ --reaction-category-colors kegg-category-colors-txt \ --group-colormap category \ --draw-grid \ -o OUTPUT_DIR
The two decimal values that --group-colormap also accepts then say how far from white each ramp starts and stops, defaulting to 0.25 and 1.0. The pale end stops short of white on purpose: standard and overview maps keep white for their own unhighlighted elements, so a ramp reaching it could not be drawn there ā anviāo checks for this before writing any file and tells you to start the ramp further from white.
This file gives colors to categories, so it needs a run that has them, and needs a layer colored by which categories contain an element.
--reaction-colormap/--compound-colormap, which is the other answer to where the colors come from, nor with --reaction-color/--compound-color or --original-color, which color a layer without comparing categories at all.sample column in a kegg-reaction-txt or kegg-compound-txt file, or more than one contigs-db, or a pan-db.--presence-colormap-scheme by_count, or a count/count_continuous sample or group summary), since a count says how many categories contain an element rather than which, and so has no category whose color it could take.Edit this file to update this information.