Skip to content

Configuration v0.0.0

The PanVA application can be configured with a runtime configuration file config.json placed in the root directory of the application. It's recommended to use a config file whenever metadata, annotations, and trees need to be displayed.

Options

All fields are optional.

FieldTypeDefaultDescription
apiUrlstring"/api/"Base URI of the API.
appsstring[]["homology"]Apps that should be enabled.
homologyobjectConfiguration options for the homology app.
homology.alignmentMetadataMetadata[][]Alignment cell metadata.
homology.annotationsAnnotation[][]List of available annotations.
homology.defaultIdintegerThe first id in the homologies list.Default homology group to load.
homology.defaultSequence
MetadataColumns
string[][]Default sequence metadata columns to be shown.
homology.homologyMetadataMetadata[][]Homology group metadata.
homology.sequenceMetadataMetadata[][]Sequence metadata, user-selectable.
homology.treesTree[][]Additional trees.
homology.variableMetadataMetadata[][]Variable position metadata.
titlestring"PanVA"Title of the application.

Annotation

Positions can be annotated with one or more features. You can configure which annotations should be displayed.

Each column should be configured as a JSON object with the following options:

FieldTypeNotes
columnstringCSV column in annotations.csv.
labelstringDescription of the annotation.

Metadata

Metadata can be visualized in a number of different ways. You can configure which columns should be displayed.

Each column should be configured as a JSON object with the following options:

FieldTypeNotes
columnstringCSV column in the respective file (see note below).
labelstringName of the column to be displayed.
type"boolean" | "categorical" | "quantitative"

Based on the value of type these options are extended with the options as defined below.

Important: The same metadata column can not be displayed more than once.

Files

This type is used for several kinds of metadata, which are stored in multiple files:

  • alignmentMetadata is stored in alignments.csv and contains metadata for each position in each aligned gene sequence.
  • homologyMetadata is stored in homologies.json and contains metadata for each homology group.
  • sequenceMetadata is stored in metadata.csv and contains metadata for each aligned gene sequence (metadata is the same for all positions).
  • variableMetadata is stored in variable.csv and contains metadata for each variable position (metadata is the same for all sequences).

Metadata of type boolean in variableMetadata can also be used to filter positions.

Type: Boolean

FieldTypeRequiredNotes
labelsobjectDisplayed in tooltip over column.
labels.truestring✔️
labels.falsestring✔️
labels.nullstring✔️
valuesobject
values.truestring✔️Consider this CSV value to be true.
values.falsestring✔️Consider this CSV value to be false.

When values is omitted, the value will be matched (case-insensitive) against "true" | "t" | "yes" | "y" for true and "false" | "f" | "no" | "n" for false. All other values will be considered to be unknown (null).

Type: Categorical

FieldTypeDefaultNotes
widthnumber120Width of the column for sequence metadata.

Type: Quantitative

FieldTypeDefaultNotes
decimalsnumber0Maximum number of decimals to display. Trailing zeroes are removed.
maxValuenumberMaximum value in columnMaximum value to determine bar width.
suffixstring""String to be placed behind the numeric value (e.g. "%")
widthnumber120Width of the column for sequence metadata.

Tree

Besides the default and custom dendrogram, PanVA can render additional trees in Newick for. You can configure which columns should be displayed.

Each column should be configured as a JSON object with the following options:

FieldTypeNotes
filenamestringFilename of the tree file (in Newick format) in the root dataset directory.
labelstringDescription of the tree.

Example config file

json
{
  "apiUrl": "/pecto/",
  "homology": {
    "defaultId": "13803671",
    "annotations": [
      {
        "column": "cds",
        "label": "CDS"
      }
    ],
    "sequenceMetadata": [
      {
        "column": "ft16",
        "label": "FT16",
        "type": "quantitative",
        "width": 80
      },
      {
        "column": "virulence",
        "label": "Virulence",
        "labels": {
          "true": "Virulent",
          "false": "Avirulent",
          "null": "Unknown"
        },
        "type": "boolean",
        "values": {
          "true": "virulent",
          "false": "avirulent"
        }
      },
      {
        "column": "species",
        "label": "Species",
        "type": "categorical",
        "width": 80
      },
      {
        "column": "strain_name",
        "label": "Strain",
        "type": "categorical",
        "width": 120
      }
    ],
  },
  "title": "PanVA: Pectobacterium"
}

Released under the GPL-3 License. Docs built with VitePress.