Background Data

civet summarises information around a set of sequences of interest. It relies on the user providing an alignment and metadata file, and an optional SNP file for speed-ups.

By default, civet will search for an environment variable CIVET_DATADIR and use this to find the background data. This can be overwritten by providing the `-d/--datadir` flag or by specifying `datadir` in the optional civet config file.

Background data files

  • A metadata.csv file. (Required)
  • An alignment fasta file. (Required)
  • Optionally, a mutations.csv file. (Optional)
  • Generate your own background files: Background data generation

    The records in each file should correspond 1:1 in the fasta file, metadata file and SNP file.


    civet will look for these files in the `-d/--datadir` specified, or alternatively they can be provided with specific flags/ config arguments:

    -bseq/--background-sequences

    By default, civet will look for a fasta file in the data directory to use as the background sequence dataset. To provide a custom fasta file, use

  • the ``-bf/--background-sequences`` flag
  • add `background_sequences: .fasta` to the config file
  • -bm/--background-metadata

    By default, civet will look for a csv containing background data in the data directory. However, to provide custom background data, use

  • the ``--background-metadata`` flag
  • add `background_metadata: .csv` to the config file
  • For more information on how to configure options connected to background metadata columns, see Background column configuration

    -bsnp/--background-snps

    By default, civet will look for a csv containing background SNPs in the data directory. However, to provide custom background SNPs, use

  • the ``--background-snps`` flag
  • add `background_snps: .csv` to the config file
  • To generate the SNP file as a time-saver if you’re planning on running multiple civet reports on the same dataset, run

    gofasta updown list -q .fasta

    to generate the SNP data file for the background data.

    --background-data-checks

    Run checks on cusom background data files Default: False

    -bt/--background-tree

    coming soon

    Next: Background column configuration