Skip to content

1. Reference construction

Benedikt Kuhnhäuser edited this page Jun 29, 2026 · 10 revisions

Overview

GPID requires a reference directory containing BLAST databases for all genes used for identification.

There is one base command to build BLAST databases for all genes in a directory:
gpid reference

Reference directory

The reference directory needs to contain one fasta file per gene, each containing sequences of all reference samples.

Formatting Requirements

First, check that your gene and sample names follow the formatting requirements:

  • Gene sequences need to be unaligned fasta files that end with a .FNA, .fasta or .fa suffix.
  • Gene names need to match the gene names in the test dataset.
  • Each reference sample name needs to start with genus and species name <Genus>_<species>, followed by a unique identifier for the sample.
  • Use underscores _ as separators in the sample names.
  • Sample names in each file need to be identical.

Example contents of reference directory

Gene1.FNA:

>Entandrophragma_angolense_CQL_22
CTCCCATATAGGGGTGCTTGGTTGTGGGTGGGTTCTGAGATGATTCATTTAATGGAACTT
CCAAATCCAGATCCCTTAACTGGACGACCGGCACATGGTGGTCGAGATCGTCATACTTGT
ATTGCGATTCGAGATGTGTCTAAACTCAAAATAATCCTTGATAAAGCAGGTATTCCTTAC
>Entandrophragma_bussei_CQL_EB42
CTCCCATATAGGGGTGCTTGGTTGTGGGTGGGTTCTGAGATGATTCATTTAATGGAACTT
CCAAATCCAGACCCCTTAACTGGACGACCGGCACATGGTGGTCGAGATCGTCATACTTGT
ATTGCGATTCGAGATGTGTCTAAACTCAAAATAATCCTTGATAAAGCAGGTATTCCTTAC
>Entandrophragma_candollei_CQL_13
CTTCCGTATAGGGGTGCTTGGTTGTGGGTGGGTTCTGAGATGATTCATTTAATGGAACTT
CCAAATCCAGACCCCTTAACGGGACGACCGGCACATGGTGGTCGAGATCGTCATACTTGT
ATTGCGATTCGAGATGTGTCTAAACTGAAAATAATCCTTGACAAAGCAGGTGTTCCTTAC

Gene2.FNA:

>Entandrophragma_angolense_CQL_22
GTTGGGGATCTACACGGAGACCTTGATCAAGCGAGATGTGCACTTGAGATTGCTGGTGTC
>Entandrophragma_bussei_CQL_EB42
GTTGGGGATCTACACGGAGACCTTGATCAAGCGAGATGTGCACTTGAGATTGCTGGTGTC
>Entandrophragma_candollei_CQL_13
GCTGGGGATCTACATGGAGACCTTGATCAAGCAAGATGTGCACTTGAGATTGCTGGTGTC

Gene3.FNA:

>Entandrophragma_angolense_CQL_22
GAATCTCAAGGATTAACATCTCGACGATTGTGTCTTACATGTATATGTTCAACTCTAGCT
CTGATTAACAGTTCCGGCACGTTGGTTTCTGTACAAAAGGCAATTGCTTTGGAAGGAAAA
>Entandrophragma_bussei_CQL_EB42
GATATGTGTGGTGGTACAGGAAAATGGAAAGCTCTCAACAGAAAACGTGCTAAAGATGTT
TACGAGTTTACAGAATGTCCAAATTGTTATGGTCGTGGGAAACTTGTGTGTCCGGTTTGC
>Entandrophragma_candollei_CQL_13
GAATCTCAGATATCAACATCTCGCCGTTGGTGCCTTACGTGTATACTTACATGTATATGT
TCAACTCTAGCTCTGATTAACAGTTCCGGCACATTGGTTTCTGTACAAAAGGCAATTGCT

Reference construction

Now build the reference using:
gpid reference -r <reference directory>

Options:
-r Path to the reference directory containing all genes with reference samples
-h Show help message

This command performs the following steps:

  1. locating FASTA files (.FNA, .fasta, .fa)
  2. validating FASTA header format
  3. checking whether BLAST databases already exist
  4. building missing BLAST databases with makeblastdb

Next step

Upon completion of Reference construction, continue to 2. Method calibration.

Clone this wiki locally