|
Biodiversity Data Journal :
Software Description
|
|
Corresponding author: Thomas D Brekke (t.brekke@kew.org)
Academic editor: Andreas Beck
Received: 06 May 2026 | Accepted: 20 Sep 2026 | Published: 30 Sep 2026
© 2026 Thomas Brekke, Thomas Weeks, Robert Barber, Isabelle Thomson, Rosemary Gooda, Roberta Gargiulo, Guillaume Delhaye, Carrie Andrew, Jill Kowal, Martin Bidartondo, Laura Suz
This is an open access article distributed under the terms of the Creative Commons Attribution License (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Citation:
Brekke T, Weeks T, Barber R, Thomson I, Gooda R, Gargiulo R, Delhaye G, Andrew C, Kowal J, Bidartondo M, Suz L (2026) MycorrhizaTracer: A bioinformatic pipeline for fungi and plant classification of Sanger DNA sequences. Biodiversity Data Journal 14: e198617. https://doi.org/10.3897/BDJ.14.e198617
|
|
Processing Sanger DNA sequences remains a routine, yet technically demanding step in many biodiversity and ecological studies, particularly when barcoding large numbers of environmental samples. Manual inspection and editing of trace files, DNA sequence alignment and classification using taxonomic reference databases are time-consuming, inconsistent and prone to error, compromising workflow standardisation, traceability and reproducibility. These challenges are compounded in studies involving degraded samples, in-house DNA sequencing, under-described taxa or research contexts in which investigators have limited access to computational tools.
We present MycorrhizaTracer, an open-source pipeline for processing and taxonomically classifying large batches of Sanger sequencing chromatograms. The pipeline is optimised for fungal and plant taxa, but it is adaptable across the tree of life. The pipeline performs quality trimming, consensus generation from bidirectional reads, taxonomic classification via BLAST, clustering, optional salvaging of low-quality sequences and functional annotation of fungal taxa. Designed for scalability and ease of use, MycorrhizaTracer can process thousands of DNA chromatograms in a matter of hours without the need for a high-performance computer (HPC). Accuracy and ecological relevance are promoted by features such as gene region-specific taxonomic filtering and sequence-based clustering of unclassified reads. By streamlining trace-to-taxon workflows, MycorrhizaTracer reduces the burden of manual curation, supports reproducibility and enables efficient recovery of biodiversity data from Sanger sequences, particularly in field-based or resource-limited research contexts. MycorrhizaTracer is available through an open GitHub repository under an MIT licence as an open-source reproducible piece of bioinformatic software.
We demonstrate the use and effectiveness of MycorrhizaTracer with a sample set of environmental sequencing data to illustrate how the pipeline preforms when applied to real-world data. These data are composed of over 2,000 samples sequenced in both directions at three target regions and include both high and low quality chromatograms chosen to represent the variation that may be seen in practice.
Chromatograms, Fungal Taxa, Mycorrhizas, Roots, Sanger DNA sequencing, Species identification
In ecological sampling and biodiversity research, Sanger sequencing continues to serve as a dependable and accessible tool for species identification (e.g.
Sanger sequencing remains a widely applied methodology for high-accuracy sequencing of single-nucleotide variants and for environmental surveys, especially when newer high-throughput sequencing (HTS) technologies are either inaccessible or not feasible to utilise, given the study design. For example, in cases with focused identification or detection of target individual taxa (
To aid studies that utilise Sanger sequencing for large numbers of samples, we present MycorrhizaTracer (from mycorrhiza identification of chromatogram trace files), a bioinformatic pipeline specifically designed for the high-throughput processing and classification of Sanger sequencing chromatograms optimised for plant and fungal identification. MycorrhizaTracer supports scalable, automated handling of chromatogram trace files, quality filtering, alignment, consensus calling, taxonomic assignment, clustering and functional annotation (when possible) of each fungal sample using FUNGuild (
In this manuscript, we demonstrate the utility of MycorrhizaTracer using a case study of thousands of DNA sequence chromatograms obtained from individual ectomycorrhizas from diverse taxa collected from soil samples across England. We demonstrate that, rather than being superseded entirely, Sanger sequencing and HTS should be viewed as complementary tools in the molecular ecology toolkit.
MycorrhizaTracer
MycorrhizaTracer is a bioinformatic pipeline to automate the processing, quality control and taxonomic classification of large amounts of Sanger sequence data, optimised for fungal and plant DNA barcode sequences from the ITS region of the nuclear ribosomal genes and/or the rbcL gene. This pipeline is structured in five main steps following pre-pipeline preparations: (1) consensus calling; (2) classification; (3) clustering; (4) salvaging and (5) functional annotation (Fig.
Pipeline step diagram. Each major component can be fine-tuned with command line options. RAW SEQUENCING FILES (chromatograms) are used for CONSENSUS BUILDING where they are filtered, aligned and converted into a consensus, based on either one of or both forward and reverse sequencing reads. Failure to generate a consensus results in discarding the sample, as the sequence quality is too low. Consensus sequences are then passed to the CLASSIFICATION module where they are BLASTed against the specified database and the BLAST hits are filtered to assign the sample a taxonomic identity. All samples that did not achieve a species-level taxonomic classification undergo a series of QUALITY CHECKS for length, sequence quality and (if the target region includes ITS) the presence of the motifs flanking the ITS region. Samples passing these strict quality checks are sent for CLUSTERING into Operational Taxonomic Units (OTUs). Samples failing the quality checks are directed to SALVAGING where they are BLASTed against a custom database that includes both the reference sequences linked to the samples with species-level assignments and the cluster centroids of the OTUs. All fungal samples that either: (1) have a species-level classification; (2) were clustered into OTUs or (3) were successfully salvaged, can optionally undergo FUNCTIONAL ANNOTATION with FUNGuild (
Pre-pipeline
The pipeline by default expects that each sample has been sequenced in the forward and reverse directions for some or all of the following genomic regions: full ITS (fungi), ITS2 (plants) and rbcL (plants). We have tested specific primer combinations and databases (Table
|
Genome Target |
Taxa |
Primer Name |
Sequence |
Primer Citation |
Databases |
|
ITS |
Fungi |
ITS1F |
CTTGGTCATTTAGAGGAAGTAA |
|
|
|
ITS4 |
TCCTCCGCTTATTGATATGC |
|
|||
|
ITS2 |
Plants |
ITS2F |
ATGCGATACTTGGTGTGAAT |
|
|
|
ITS3R |
GACGCTTCTCCAGACTACAAT |
|
|||
|
rbcL |
Plants |
rbcLa-F |
ATGTCACCACAAACAGAGACTAAAGC |
|
|
|
rbcLr590 |
AGTCCACCGCGTAGACATTCAT |
|
Consensus calling
Forward and reverse chromatograms are loaded and quality trimmed using PHRED quality scores (
Classification
Consensus or individual reads are classified taxonomically using BLASTn (
Clustering
Samples passed to the clustering workflow are quality-filtered and then processed through ITSx (
Salvaging
The salvaging workflow attempts to recover sequences that failed initial classification or clustering due to sequencing errors and low sequence quality. This is achieved by ‘blasting’ the as-yet unclassified samples against the reference sequences that have already been positively identified in the study and tolerating low percentage identity of matches (assuming many sequencing errors occur in these samples). In order to help prevent artificially inflated diversity estimates, the user can define “salvage groups” that restrict the possible classifications that could be assigned to one of those already present amongst samples within the same group (often a soil core, sampling locality or geographic area). This minimises misclassification due to low-quality data and prevents inflation of local diversity estimates.
Functional Annotation
Fungal sequences with taxonomic assignments at specific taxonomic levels, such as species or genus, can be functionally annotated using FUNGuild (
Output
The primary output is a classification table detailing consensus results, taxonomic assignments, clusters and functional annotations. A log file summarises metrics describing how many samples were successfully classified, clustered, salvaged and functionally annotated. The output package also includes FASTA/FASTQ files, BLAST results, clustering output and FUNGuild results (for fungi) for transparency and manual validation.
MIT licence
MycorrhizaTracer is implemented as an executable Python script (“Classify_Sanger_OTUs.py”) with a command-line interface. The pipeline is distributed with a conda environment containing all necessary packages and executables, with the one exception of FUNGuild (
Metadata and databases
A metadata file is required to specify the location of the chromatogram files and define salvaging groups. These groups are used during the optional salvaging step to limit taxonomic inference from low-quality sequences to predefined ecological or geographic contexts. The expected metadata format is described in Table
|
Column Name |
Notes |
|
Sample_ID |
A unique sample identifier. |
|
salvageGroup |
A grouping factor such that samples in need of salvaging are restricted to taxa that already exist in the dataset. Keeps samples with poor sequencing quality from adding diversity to sites. |
|
directory |
The directory in which that the raw reads are stored. The full filepath for the sequencing file will be specified as: <--prefix>/<directory>/<XXX_For_file> Both --prefix and directory can be empty if the entire filepath is stored in <XXX_For_file>. |
|
ITS_For_file |
The forward ab1 file for the fungal full ITS region. |
|
ITS_Rev_file |
The reverse ab1 file for the fungal full ITS region. |
|
ITS2_For_file |
The forward ab1 file for the plant ITS2 region. |
|
ITS2_Rev_file |
The reverse ab1 file for the plant ITS2 region. |
|
rbcL_For_file |
The forward ab1 file for the plant rbcL region. |
|
rbcL_Rev_file |
The reverse ab1 file for the plant rbcL region. |
While any .fasta file with sequences which are targeted by the primers chosen will work as a reference database, the header lines of each sequence have a specific required format. The databases for fungal ITS (--ITS_db), plant ITS2 (--ITS2_db) and plant rbcL (--RBCL_db) must have headers formatted as found in the UNITE general release .fasta (
Consensus generation
The pipeline begins by loading forward and reverse chromatograms and applying quality trimming. Trimming is based on two metrics: PHRED quality scores and chromatogram peak height. These are evaluated using a sliding window approach, with user-definable parameters, such as --qual (minimum PHRED score), --window_size (window length) and --stddev_cutoff (chromatogram peak height threshold, in standard deviations below the mean). The window is moved base by base across the sequence ends, trimming low-quality regions until both metrics are satisfied. The peak height trimming is implemented specifically to deal with chromatograms that do not include quality scores and (when left at default) has minimal impact on chromatograms with PHRED scores.
After trimming, reads are assessed against a minimum length requirement, set via the --min_read_length flag. If both forward and reverse reads exceed this threshold, they are aligned using a local pairwise aligner from Biopython's Bio.Align module. A consensus sequence is then generated: matching bases are retained with the higher quality score, while mismatches are replaced with an “N”. If only one read passes filtering, it is used directly as the representative sequence for the sample and will, hereafter, be referred to as a “consensus” for simplicity and, to avoid confusion, the number of raw sequences that underlie each samples' "consensus" is reported in the output of the pipeline. Samples with no passing reads are omitted from downstream analyses.
Taxonomic classification
Taxonomic classification is performed using BLASTn (
BLAST hits are initially filtered by alignment length (--minMatchLength, default 50 bp) and coverage thresholds for both query and subject sequences (--minQCOV and --minSCOV). A match passes if either coverage exceeds 0.95 or both exceed the defined thresholds. Additional filtering steps are available: the --no_Incertae_Sedis flag removes BLAST hits with ambiguous taxonomy from consideration (unless every hit is thus removed, in which case, the original list of hits is used), while --adjustPidents adjusts identity scores to refine the percentage identity of partial alignments.
The highest percentage identity from the remaining hits is saved and any hits within a user-defined identity differential (--pidentDiff, default 0.5%) of this top percentage identity are selected as candidate matches. These are compared taxonomically from kingdom to species. Where disagreement is found, the taxonomic ranking is truncated to the last level at which all hits agree. Final classification is further constrained by a series of minimum identity cutoffs for each rank (e.g. --min_pident_species, default 97.0). The final classification is stored for each sample and the top BLAST hit’s full taxonomy is also recorded separately for users requiring higher resolution who can tolerate lower accuracy, though this should be interpreted with caution.
Plant and fungal sequences that receive a species-level match against the UNITE database are assigned a UNITE SH number. For plant sequences classified using the rbcL region, a genus-species label is used instead. Fungal samples failing to achieve species-level resolution are passed to the clustering phase.
Clustering
Sequences not classified to the species level at the designated cut off (the default of 97.0 was used in this case study) enter the clustering workflow. These are subjected to stringent quality and length filtering using thresholds set by --minSeqLengthForCluster (default 300 bp) and --minAverageQualityForCluster (default PHRED 20). High-quality reads are then processed with ITSx to extract the ITS region (ITS1, 5.8S, ITS2); sequences lacking a full ITS region are saved for later (optional) salvaging.
Valid sequences are clustered using VSEARCH --cluster_fast with an identity threshold defined by --percentIdentityForCluster (default 97.0). The resulting OTUs are given names of the form denovo_X, representing species not found in the original reference database. These clusters are best understood as study-specific sequences that are not assigned to a named taxa in the reference database (which could occur for a variety of reasons including database incompleteness, unresolved taxonomy, sequence variation and/or sequencing error) and may be analysed alongside UNITE’s SH numbers for diversity analyses.
Salvaging
The optional salvaging workflow, triggered via the --salvage flag, attempts to recover information from sequences excluded during consensus or clustering. These sequences are aligned against a custom BLAST database composed of SH reference sequences and cluster centroids identified earlier in the pipeline. Each salvaged sample is assigned the taxonomy of its best hit by bitscore, provided that a sample from the same salvage group has already been assigned that taxonomy. This requirement is intended to prevent poor-quality reads from introducing artificial taxa to the dataset and helps maintain local consistency in diversity metrics.
Functional annotation
The final step, enabled with --run_funguild, performs functional annotation of fungal taxa using FUNGuild (
Benchmarking bespoke algorithms
MycorrhizaTracer uses established programmes to do many tasks (BLAST, VSEARCH, FUNGuild) and also incorporates bespoke implementations for other tasks (quality trimming, alignment and consensus generation, BLAST-ouput parsing and salvaging). The algorithms that were written specifically for the pipeline are benchmarked and validated using a dataset of 144 chromatograms obtained from 72 morphologically identified fungal fruiting bodies. These analyses can be found in Suppl. material
The dataset used for development and testing of this pipeline contains 2,357 individual ectomycorrhizas collected from 63 soil plots across England, for fungal and plant identification following previously published methods (
Post-filtering sequence statistics for test samples (full ITS for fungi, ITS2 and rbcL for plants). These samples span a range of qualities and lengths and include many of the variants that may appear in chromatograms, such as high quality suddenly dropping due to an indel in the sample and samples whose sequencing failed.
The sample dataset and exact parameters used are available in Suppl. material
Of the 2,357 samples sequenced at the three target regions, consensus sequences were successfully generated for 88% of targets on average (86% for fungal full ITS, 94% for plant ITS2 and 83% for rbcL). The majority (85%) of successful consensus sequences were constructed from both forward and reverse DNA sequences, while the remaining 15% were based on a single sequence (either forward or reverse). These numbers are primarily dependent on the sample and sequencing quality and successful consensus building is unsurprisingly far more likely with high-quality sequences (Table
|
Target |
Consensus from an alignment of Forward and Reverse reads |
Consensus from either the Forward or Reverse read; whichever has higher quality |
Consensus failed: both Forward and Reverse reads have low quality |
|
ITS |
1,572 (66.8%) |
413 (17.6%) |
368 (15.6%) |
|
ITS2 |
1,756 (74.6%) |
453 (19.3%) |
144 (6.1%) |
|
rbcL |
1,660 (70.5%) |
292 (12.4%) |
401 (17.0%) |
To be classified, a sample had to exceed the user-defined match length (default = 50 bp) and coverage thresholds (default of 0.3 for scov and qcov), meet or exceed the user-specified percentage identity threshold (default = 97% for species and 94% for genus), and show taxonomic consensus among all BLAST hits within a percetage identity differential (default = 0.5%) of the top match. For each target region, ca. 17% of samples (19.6% ITS, 15.4% ITS2, 17.7% rbcL) were not classified to any taxonomic rank due to poor sequencing quality. Of those that had some classification with the initial BLAST, 62% (fungal ITS), 54% (plant ITS2) and 47% (plant rbcL) achieved classification to the species level and 79% (ITS), 65% (ITS2) and 73% (rbcL) were classified at the genus level (Fig.
Taxonomic classification success. (A) Fungal ITS with UNITE (
Operational taxonomic units were defined as the combination of: (1) the species names of samples with species-level classifications (or SH numbers) and (2) the cluster centroids. For fungi, OTUs are a combination of species-level classifications from the BLASTn (i.e. SH numbers) and the results of clustering the remaining high-quality sequences at 97% identity. The clustering step always occurs for fungal ITS, as many fungal species are yet undescribed and do not appear in the databases, but it is optional for plants and left to the users’ discretion to include or not. The pipeline identified 677 fungal OTUs (samples = 1,796, mean size = 2.6, max. size = 117, singletons = 467), 19 plant OTUs, based on ITS2 (samples = 1,077, mean size = 56.7, max. size = 753, singletons = 8) and 15 plant OTUs based on rbcL (samples = 919, mean size = 61.2, max. size = 637, singletons = 5).
Our salvaging workflow attempts to rescue low-quality sequences by using a BLASTn search against existing OTUs with a lenient use of the highest bitscore to decide the best hit and then a stringent filter for whether another sample in the same salvage group has already been assigned to that OTU. The highest bitscore is used to allow tolerance for poor-quality sequences that may contain sequencing errors or ambiguities. The strict already-present filter is then used to keep low-quality sequences from increasing the alpha diversity of the site; low-quality sequences should not be the only instance of an OTU at a site. The number of successful salvages is, thus, mainly constrained by two factors: (1) the sequence quality impacting BLAST’s ability to identify a potential hit and (2) the size of the dataset at each site (i.e. the number and size of salvaging groups specified in the metadata). Having a finer-scale grouping structure (i.e. using study sites as groups) may result in fewer successful salvages than a coarser-scale grouping structure (i.e. using countries as groups). When using individual sites for salvage groups (n = 63 sites), 58 of the attempted 257 fungal samples were salvaged, whereas when using the country as a group (n = 1 country; all sites are in the UK), then 122 of 257 samples were successfully salvaged. The decision how fine to set the salvage grouping is an important consideration for those using the pipeline, as it will influence the balance between treating rare (or singleton) sequences as novel taxa or discarding them as low-quality sequencing attempts. Indeed, low-frequency and singleton sequences in any ecological dataset are always worth special consideration, as they are likely to be enriched for sequencing errors, but rare and undescribed species (particularly for microbes) exist and removing all singletons may result in underestimated diversity. In our study dataset, each sample is an individual ectomycorrhiza whose morphology was confirmed by microscopy, so high-quality singletons assigned as ectomycorrhizal fungi are not removed from the results.
Sanger sequencing has been used for decades and pipelines are designed with a focus on Sanger data. Table
|
Pipeline |
GUI or CLI |
Language |
Input filetype |
Consensus Generation |
Classification |
Clustering |
Functional Annotation |
Optimised use-case |
Citation |
|
MycorrhizaTracer |
CLI |
Python |
chromatogram or fastq |
Yes |
BLASTn |
Yes |
Yes |
fungal and plant ITS and rbcL barcoding |
this paper |
|
SangerFlow |
CLI |
Nextflow |
fasta |
Yes |
BLASTn |
No |
No |
pathogen and pest barcoding |
|
|
SCATA |
GUI |
n/a |
fastq |
Yes |
BLASTn |
Yes |
No |
fungal ITS barcoding |
|
|
PipeBAR |
CLI |
Python |
chromatogram |
Yes |
No |
No |
No |
Generate consensus sequences from chromatograms |
|
|
SangerAnalyzeR |
Both |
R |
chromatogram |
Yes |
No |
No |
No |
Generate consensus sequences from chromatograms |
|
Despite its strengths, MycorrhizaTracer has some limitations that warrant consideration.
Notably, many of the failures to assemble a consensus or achieve species-level classification stem from poor-quality input sequences. This underscores the importance of generating high-quality chromatograms at the sequencing stage, as downstream performance is tightly coupled to input data quality. Occasionally, using a different base-caller may improve sequence quality and could be considered in the case of low-quality sequences, but is not implemented in the current version of the pipeline.
Clustering to identify OTUs is implemented with a tunable input parameter, but only one threshold may be chosen which is applied to all taxa. It is well established that different fungal taxa diversify at different rates and so the default of 97% may not be applicable to all taxa (
Taxonomic classification accuracy remains limited by the breadth and curation of underlying reference databases. Unknown or misannotated taxa can lead to ambiguous or incorrect matches (for examples, see Suppl. materials
The pipeline’s command-line interface, while flexible, may be less accessible to users without prior bioinformatics experience. While many parameters have default values, these are provided only for convenience and not as an endorsement that any specific default value is 'correct' for any given dataset. The reason the command-line parameters exist is so that the pipeline can be fine-tuned to accommodate the large amount of variation in real-world datasets. We encourage users to think critically about what value for each parameter is best suited for each specific use-case.
The salvage workflow, though designed to prevent overinflated diversity estimates, also depends on the completeness and correctness of sample metadata for salvage grouping and may affect relative abundance, occupancy and community structure estimates if used incautiously.
Finally, functional annotation is limited to fungal taxa interpretable by FUNGuild and confidence in guild assignment can vary widely depending on taxonomic resolution and coverage.
Critical thinking, expert opinion, visual inspection of the samples, a thorough understanding of the literature and a detailed understanding of the focal ecology are all important additions to this and any pipeline.
MycorrhizaTracer is an efficient and scalable tool for processing and classifying large numbers of DNA chromatograms. It delivers an end-to-end automated workflow, taking raw chromatograms through to functionally annotated classified taxa, while reducing the need for manual inspection of trace files. This allows for consistent, unbiased processing across large datasets. All critical thresholds (quality, coverage, identity cutoffs, taxonomic filters) are exposed as command-line arguments, allowing users to tune the pipeline for different barcoding regions, target taxa and sample quality levels without modifying the code. The optional inclusion of user-supplied species lists for regional taxa ensures that classification results are ecologically plausible and aligned with expert expectations, though such lists should be used with caution as they can inadvertently exclude unexpected, introduced, poorly documented or species whose ranges are expanding. This is particularly useful for localised biodiversity assessments. The inclusion of FUNGuild (
This manuscript is led by The Mycorrhiza Lab at RBG Kew and funded by the UK Government through Defra’s Natural Capital and Ecosystem Assessment programme. We would like to thank the lab team who processed the samples that we used for a test-data set, including R. Jarvis, O. Lindsay, G. Meadows, M. Rickards, E. Serpell and B. Underwood. We would also like to thank Eric Janke for supplying chromatograms for the validation dataset.
The Natural Capital and Ecosystem Assessment (NCEA) programme is Defra’s largest Research and Development (R&D) programme and the most ambitious assessment of the state of nature ever undertaken in the UK. NCEA is assessing England's land, freshwater and coastal ecosystems to produce a baseline of our natural assets by 2029, enabling a natural capital approach to policy and investment.
We also thank the Nature Returns programme (funded by HM Treasury's Shared Outcomes Fund), whose ectomycorrhizal data from Wakehurst were used to test and refine the pipeline.
T.D.B. developed the code and wrote the manuscript. T.W., R.B., I.T. and R.Go. beta-tested, error-checked and troubleshot the code. R.Ga., G.D. and L.M.S. contributed to planning the codes’ organisational structure and development strategy. C.A., J.K., M.B. and L.M.S. provided subject-matter expertise and valuable input on the codes’ structure and function.
Analysis using known samples (chromatograms obtained from morphologically identified fungal fruit-bodies) to validate the trimming, alignment, consensus calling, BLAST-parsing and salvaging algorithms
benchmark_data.zip is the dataset used to benchmark the pipeline as described in Supplement 1. It includes the ab1 files and metadata that were used and a spreadsheet comparing the output of the pipeline with the known sample taxonomies.
test_data.zip is the dataset used to demonstrate the pipeline presented in the manuscript. It contains a README describing how to recreate the analysis presented, the ab1 files and two versions of the metadata (using one or many salvage groups). It can be found at Zenodo using the doi: 10.5281/zenodo.19707646