Skip to content

How to Build a Reference Genome ​

Author: SeekGene
Time: 5 min
Words: 896 words
Updated: 2026-10-13
Reads: 0 times
SeekSoul™ Tools

Prepare Files Required for Genome Building ​

To perform transcriptome and scFAST-seq analysis with SeekSoul™ Tools, you must prepare the reference genome sequence and the corresponding GTF annotation file for the species. The required file formats are described below:

Genome Sequence ​

The genome sequence must be in FASTA format. Chromosome IDs must match the first column (seqname) of the GTF file. The GTF seqnames must be a subset of the FASTA chromosome IDs. Ensure the file contains no empty lines.

GTF File ​

TIP

We recommend downloading GTF files from authoritative databases (such as Ensembl, RefSeq) and ensuring they are consistent with the FASTA file version.

The GTF file format specifications are:

  1. seqname: Sequence name, usually chromosome or Contig ID.
  2. source: Annotation source, such as a database name (e.g., RefSeq) or software name (e.g., GeneScan). Can be empty or a dot (.).
  3. feature: Feature type corresponding to the interval. Common types include: gene, transcript, CDS, exon, start_codon, stop_codon, etc.
  4. start: Start position of the feature.
  5. end: End position of the feature.
  6. score: Confidence score of the feature's existence and coordinates. Can be a float or integer. "." indicates no score.
  7. strand: Strand of the reference genome where the feature is located (+ or -).
  8. frame: Reading frame. 0 indicates the first complete codon is at the 5' end; 1 indicates one extra base before the first complete codon; 2 indicates two extra bases. Note that frame is not the remainder of the CDS length divided by 3. If the strand is '-', the first base value of the region is 'end' because the coding region is from end to start on the antisense strand.
  9. attribute: Format: attributes_name "attributes_values";. Each attribute must end with a semicolon and be separated from the next by a space. Values must be in double quotes. Includes three key attributes:
attributeMeaning
gene_id "value";Unique ID of the gene locus. gene_id and value are separated by a space. Empty value means no corresponding gene.
transcript_id "value";Unique ID of the predicted transcript. transcript_id and value are separated by a space. Empty value means no transcript.
gene_type "value";Biological type of the gene, e.g., protein coding, lncRNA.

Guidelines for GTF Preparation:

  • For each gene, the GTF file must contain entries for gene, transcript, and exon features.
  • For gene features, the attributes column must include gene_id and gene_type. If gene_name is missing, gene_id will be used as gene_name.
  • For transcript features, the attributes column must include transcript_id.
  • For exon features, the attributes column must include exon_id to ensure correct handling when Reads map to multiple genes.
  • The GTF file must not contain empty lines.
  • Mitochondrial gene gene_name in the GTF file must start with "Mt-" or "mt-"; otherwise, mitochondrial statistics in the report will be zero.

TIP

Chromosome names in the GTF and FASTA files must be identical to avoid alignment failures or downstream analysis errors.

Scenario 1: Building a Reference Genome Compatible with Multiple Platforms ​

TIP

We recommend using 10x Cell Ranger to build the reference genome. SeekSoul™ Tools is directly compatible with indices built by Cell Ranger.

If you analyze data from both 10x Genomics and SeekOne® platforms, we recommend using 10x Cell Ranger to build the reference genome. SeekSoul™ Tools is compatible with Cell Ranger reference genomes.

Use the following commands to process the gene annotation file (GTF):

shell
/path/to/cellranger mkgtf Homo_sapiens.GRCh38.ensembl.gtf Homo_sapiens.GRCh38.ensembl.filtered.gtf \
    --attribute=gene_biotype:protein_coding \
    --attribute=gene_biotype:lncRNA \
    --attribute=gene_biotype:antisense \
    --attribute=gene_biotype:IG_LV_gene \
    --attribute=gene_biotype:IG_V_gene \
    --attribute=gene_biotype:IG_V_pseudogene \
    --attribute=gene_biotype:IG_D_gene \
    --attribute=gene_biotype:IG_J_gene \
    --attribute=gene_biotype:IG_J_pseudogene \
    --attribute=gene_biotype:IG_C_gene \
    --attribute=gene_biotype:IG_C_pseudogene \
    --attribute=gene_biotype:TR_V_gene \
    --attribute=gene_biotype:TR_V_pseudogene \
    --attribute=gene_biotype:TR_D_gene \
    --attribute=gene_biotype:TR_J_gene \
    --attribute=gene_biotype:TR_J_pseudogene \
    --attribute=gene_biotype:TR_C_gene
cellranger mkref --genome=GRCh38 --fasta=GRCh38.fa --genes=GRCh38-filtered-ensembl.gtf
cd GRCh38/genes
gunzip -dc genes.gtf.gz > genes.gtf

TIP

  • The built-in reference genomes on the platform were all generated using cellranger 5.0.1 (STAR v2.7.1a).

  • We recommend using 10x CellRanger to build the reference genome. SeekSoul™ Tools is directly compatible with indices built by CellRanger.

  • If you encounter a mismatch between the STAR version bundled in SeekSoul™ Tools and the STAR version used to build the reference genome, you can use either of the following solutions:

    • Option 1: Rebuild the STAR index using the STAR executable bundled with the current software

      shell
      /path/to/seeksoultools/bin/STAR \
        --runMode genomeGenerate \
        --runThreadN 8 \
        --genomeDir GRCh38/star \
        --genomeFastaFiles GRCh38/fasta/genome.fa \
        --sjdbGTFfile GRCh38/genes/genes.gtf \
        --sjdbOverhang 149 \
        --limitGenomeGenerateRAM 50396003370
    • Option 2: Install STAR v2.7.1a and specify it at runtime using the following parameter

      --star_path /path/to/STAR-2.7.1a/bin/Linux_x86_64/STAR

  • Chromosome names in the FASTA file must match those in the GTF file. For example, if chromosome 1 in FASTA is chr1, then chromosome 1 in the GTF file must also be chr1.


0 comments·0 replies