Part I · Module 01 · PHYLUCE 1.7.3

Introduction and requirements

Prepare a portable computational environment for processing UCE target-capture data. This module defines the starting data, software environment, directory conventions and basic checks used throughout the tutorial.

Objective

By the end of this module, you should have a working command-line environment, a dedicated PHYLUCE installation, and a simple project directory ready to receive paired-end UCE sequencing reads.

Starting data

The tutorial starts from paired-end Illumina reads stored as compressed FASTQ files, typically named sample_R1.fastq.gz and sample_R2.fastq.gz.

1. Software environment

This tutorial is fixed to PHYLUCE v1.7.3. Commands and directory expectations are checked against the official PHYLUCE 1.7.3 documentation and the v1.7.3 release files. Using a fixed version avoids mixing commands from older PHYLUCE tutorials with the current 1.7.x workflow.

Version used throughout this tutorial

PHYLUCE 1.7.3. The official documentation recommends installation through Conda because PHYLUCE has a complex dependency chain and the supported binaries are distributed through Conda environments.

Check whether Conda is available

conda --version

If Conda is not available, install Miniconda before continuing. The PHYLUCE documentation specifically recommends the Miniconda distribution for supported installations.

2. Install PHYLUCE 1.7.3

PHYLUCE 1.7.3 provides operating-system-specific Conda environment files. Choose the instructions that match your computer.

Linux

Download the official Linux environment file:

curl -L -O https://raw.githubusercontent.com/faircloth-lab/phyluce/v1.7.3/distrib/phyluce-1.7.3-py36-Linux-conda.yml

Create the environment:

conda env create \
  -n phyluce-1.7.3 \
  --file phyluce-1.7.3-py36-Linux-conda.yml

Activate it:

conda activate phyluce-1.7.3

macOS — Intel processor

Download the official macOS environment file:

curl -L -O https://raw.githubusercontent.com/faircloth-lab/phyluce/v1.7.3/distrib/phyluce-1.7.3-py36-macOS-conda.yml

Create and activate the environment:

conda env create \
  -n phyluce-1.7.3 \
  --file phyluce-1.7.3-py36-macOS-conda.yml

conda activate phyluce-1.7.3

macOS — Apple Silicon (M1/M2/M3/M4)

PHYLUCE 1.7.3 uses the macOS x86-64 environment on Apple Silicon. The official release therefore creates an Intel-compatible Conda environment and sets osx-64 as the environment subdirectory.

curl -L -O https://raw.githubusercontent.com/faircloth-lab/phyluce/v1.7.3/distrib/phyluce-1.7.3-py36-macOS-conda.yml

CONDA_SUBDIR=osx-64 conda create \
  -n phyluce-1.7.3-x86 \
  python=3.6

conda activate phyluce-1.7.3-x86

conda config --env --set subdir osx-64

conda env update \
  --name phyluce-1.7.3-x86 \
  --file phyluce-1.7.3-py36-macOS-conda.yml \
  --prune
Apple Silicon note

Keep CONDA_SUBDIR=osx-64 on the same command line as conda create. This is the procedure specified in the official PHYLUCE 1.7.3 release instructions.

Verify the exact environment

conda env list

python --version

conda list | grep -i phyluce

phyluce_assembly_match_contigs_to_probes --help

phyluce_assembly_assemblo_spades --help

Both PHYLUCE commands above should print their help messages without an import or dependency error. PHYLUCE 1.7.x supports SPAdes, ABySS and Velvet for assembly; this tutorial will use SPAdes as the default assembler.

Do not use old Trinity-based PHYLUCE commands

Trinity was removed from PHYLUCE beginning with version 1.7.0. Older tutorials that call phyluce_assembly_assemblo_trinity should therefore not be mixed with this PHYLUCE 1.7.3 tutorial.

Deactivate PHYLUCE when necessary

conda deactivate

3. Define a project directory

Do not hard-code a personal path throughout the analysis. Define one project location and work relative to it. Replace the example path below with a directory on your system.

PROJECT="/path/to/my_UCE_project"

mkdir -p "$PROJECT"
cd "$PROJECT"

pwd

The tutorial will progressively create a directory structure similar to:

my_UCE_project/
├── raw_reads/
├── clean_reads/
├── assemblies/
├── uce_loci/
├── alignments/
├── pseudoreference/
├── mapping/
├── variants/
└── analyses/

Not every directory needs to be created now. They are shown here so that the complete workflow has a predictable organization from the beginning.

4. Define reusable variables

The examples in this tutorial use shell variables instead of machine-specific paths. This makes the same commands easier to reuse on another computer or dataset.

PROJECT="/path/to/my_UCE_project"
READS="$PROJECT/raw_reads"
PROBES="/path/to/my_UCE_probes.fasta"
THREADS=8
PROJECT
Top-level directory containing the analysis.
READS
Directory containing the original paired-end FASTQ files.
PROBES
FASTA file containing the UCE probe or bait sequences used for the capture design.
THREADS
Number of CPU threads available for commands that support parallel execution.
Important

Values such as THREADS=8 are examples, not biological or computational requirements. Adjust them to the resources available on your machine.

5. Input naming convention

Use consistent sample identifiers and preserve the paired-end relationship between R1 and R2 files. A simple convention is:

sample01_R1.fastq.gz
sample01_R2.fastq.gz

sample02_R1.fastq.gz
sample02_R2.fastq.gz

sample03_R1.fastq.gz
sample03_R2.fastq.gz

Avoid spaces in filenames. Keep sample identifiers short, stable and unique because these names will propagate through assemblies, UCE loci, alignments, BAM files and population-genomic datasets.

6. Pre-flight check

Before continuing, verify the following:

✓ Conda is available from the terminal.
✓ The PHYLUCE environment can be activated.
✓ PHYLUCE commands respond to --help.
✓ You know the location of your paired-end *.fastq.gz files.
✓ You have the appropriate UCE probe/bait FASTA for your capture design.
✓ A project directory has been chosen.

References and official documentation

Software documentation

PHYLUCE 1.7.3 documentation

PHYLUCE 1.7.3 — Installation

PHYLUCE v1.7.3 — Official GitHub release

PHYLUCE 1.7.3 — Daily use documentation

Recommended citations

Faircloth BC. 2016. PHYLUCE is a software package for the analysis of conserved genomic loci. Bioinformatics 32:786–788. doi:10.1093/bioinformatics/btv646

Faircloth BC, McCormack JE, Crawford NG, Harvey MG, Brumfield RT, Glenn TC. 2012. Ultraconserved elements anchor thousands of genetic markers spanning multiple evolutionary timescales. Systematic Biology 61:717–726. doi:10.1093/sysbio/sys004

Reference policy for this tutorial

PHYLUCE commands will be checked against the v1.7.3 documentation or source release before being added. External tools used later in the workflow will also be versioned and linked to their primary documentation.

← Tutorial overview Next: Organizing FASTQ files →