Identifying UCE loci
Match the assembled contigs against the probe set used for target enrichment. This step identifies which contigs correspond to UCE loci and stores those matches for downstream locus recovery.
Objective
Use the contigs generated by SPAdes and the probe/bait FASTA associated with the experiment to identify homologous UCE loci in each sample.
The probe FASTA must correspond to the capture design used to generate the dataset. Do not substitute a probe set from another experiment simply because it contains a similar number of loci.
1. Activate PHYLUCE 1.7.3
conda activate phyluce-1.7.3
On Apple Silicon, activate the x86 environment created in Module 01:
conda activate phyluce-1.7.3-x86
Check that the matching program is available:
phyluce_assembly_match_contigs_to_probes --help
2. Define the input files
PROJECT="/path/to/my_UCE_project" CONTIGS="$PROJECT/spades-assemblies/contigs" PROBES="/path/to/probe-set.fasta" UCE_MATCHES="$PROJECT/uce-search-results" LOGS="$PROJECT/logs/uce-identification" mkdir -p "$LOGS"
3. Check the probe FASTA
Confirm that the probe file exists and inspect the first few records before running the matching step.
ls -lh "$PROBES" grep "^>" "$PROBES" | head
Standard UCE probe sets generally encode the UCE locus identifier in each FASTA header. PHYLUCE uses these identifiers to associate probe matches with loci.
The default PHYLUCE regular expression expects standard UCE-style probe names such
as uce-123_p1. Custom bait sets may require a different
--regex. Do not change the regular expression unless the probe headers
actually require it.
4. Match contigs to probes
Run the standard PHYLUCE 1.7.3 matching step:
phyluce_assembly_match_contigs_to_probes \ --contigs "$CONTIGS" \ --probes "$PROBES" \ --output "$UCE_MATCHES" \ --log-path "$LOGS"
PHYLUCE 1.7.3 uses 80 as the default minimum probe coverage and
80 as the default minimum identity. This tutorial keeps those defaults
unless there is a documented biological reason to change them.
5. What happens during this step?
PHYLUCE uses LASTZ to compare the assembled contigs from each sample against the supplied probes. Matches are evaluated independently for each sample.
The procedure also screens ambiguous matches. By default, contigs or loci that produce problematic duplicate relationships are excluded rather than being retained as unambiguous UCE loci.
A UCE locus should ideally correspond to one homologous contig within a sample. Multiple loci matching the same contig, or one locus matching multiple contigs, can reflect assembly ambiguity, duplicated genomic regions or other biological and technical complications.
6. Expected output
After a successful run, the output directory contains one LASTZ result file per sample and a SQLite database summarizing the UCE matches.
uce-search-results/ ├── sample01.contigs.lastz ├── sample02.contigs.lastz ├── sample03.contigs.lastz ├── ... └── probe.matches.sqlite
7. Basic quality check
Confirm that the expected database exists and that LASTZ results were generated:
ls -lh "$UCE_MATCHES/probe.matches.sqlite" find "$UCE_MATCHES" \ -maxdepth 1 \ -name "*.contigs.lastz" \ | sort \ | head
The terminal output generated during the matching step also reports, for each sample, the number of unique matches and the number of ambiguous matches removed. Large differences among samples should be noted before proceeding.
8. Common problems
No UCE loci are recovered
First verify that the probe FASTA is the same probe set used for target enrichment, that the contig directory contains the correct assemblies, and that the probe headers follow the expected naming convention.
Probe-header or regex errors
The default regular expression is designed for standard UCE probe names. Custom probe
sets can require a custom --regex. This should be changed only after
inspecting the probe headers and understanding the locus naming pattern.
Unexpected contig-name errors
PHYLUCE parses assembler-specific FASTA headers. If contigs were generated with a non-standard assembler or their headers were modified after assembly, the matching program may fail to recognize them. Preserve the original SPAdes headers produced in Module 05.
9. Pre-flight check
References and official documentation
PHYLUCE 1.7.3 — UCE processing for phylogenomics
PHYLUCE 1.7.3 — Tutorial I: match contigs to probes
PHYLUCE v1.7.3 — Official release
The command, default identity/coverage thresholds and expected output files in this module were checked against the official PHYLUCE 1.7.3 documentation.