Skip to content

non_reference_genomes

Carolina Monzó edited this page May 20, 2026 · 1 revision

Working with non-reference genomes

Use SQANTI-browser with non-model organisms using .2bit genome files.


What is a .2bit File?

A .2bit file is a compact binary format that stores complete genome sequences. It allows UCSC Genome Browser to display reference DNA when zooming to the base level.

When you need it: Working with species not in UCSC (plants, non-model animals, de novo assemblies)


Quick Usage

python -m sqanti_browser \
    --gtf corrected.gtf \
    --classification classification.txt \
    --output my_hub \
    --genome my_species_v1 \
    --twobit genome.2bit

That's it! No need for --chrom-sizes - chromosome info is auto-extracted.


What Happens Automatically

When you provide --twobit, SQANTI-browser:

  1. Extracts chromosome sizes from the .2bit file (no separate chrom.sizes needed)
  2. Copies .2bit into hub (output/genome/genome.2bit) for portability
  3. Configures genomes.txt with:
    • twoBitPath pointing to bundled file
    • organism, description, scientificName set to "user-defined"
    • defaultPos showing first 5kb of largest chromosome
    • htmlPath linking to description page
  4. Creates description page listing all chromosomes and lengths

Result: Fully self-contained, portable track hub!


Creating a .2bit File

If you have a FASTA file, convert it to .2bit:

# Install tool (included in install_ucsc_tools.sh)
faToTwoBit genome.fasta genome.2bit

From conda:

conda install -c bioconda ucsc-fatotwobit

Complete Example

# 1. Convert FASTA to .2bit
faToTwoBit my_genome.fasta my_genome.2bit

# 2. Run SQANTI-browser
python -m sqanti_browser \
    --gtf corrected.gtf \
    --classification classification.txt \
    --output my_hub \
    --genome my_species_v1 \
    --twobit my_genome.2bit \
    --tables

# 3. Upload to web server (see Hosting Guide)
# 4. Load in UCSC

Prerequisites

The twoBitInfo tool must be installed:

# Automatic (recommended)
bash install_ucsc_tools.sh

# Or via conda
conda install -c bioconda ucsc-twobitinfo

Troubleshooting

Problem Solution
twoBitInfo not found Run bash install_ucsc_tools.sh
Invalid .2bit file Recreate from FASTA with faToTwoBit
Hub shows wrong genome Check --genome matches your .2bit filename convention

See Also


Clone this wiki locally