How to Build a Reference Genome
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:
- seqname: Sequence name, usually chromosome or Contig ID.
- source: Annotation source, such as a database name (e.g., RefSeq) or software name (e.g., GeneScan). Can be empty or a dot (.).
- feature: Feature type corresponding to the interval. Common types include: gene, transcript, CDS, exon, start_codon, stop_codon, etc.
- start: Start position of the feature.
- end: End position of the feature.
- score: Confidence score of the feature's existence and coordinates. Can be a float or integer. "." indicates no score.
- strand: Strand of the reference genome where the feature is located (+ or -).
- 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.
- 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:
| attribute | Meaning |
|---|---|
| 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, andexonfeatures. - For
genefeatures, theattributescolumn must includegene_idandgene_type. Ifgene_nameis missing,gene_idwill be used asgene_name. - For
transcriptfeatures, theattributescolumn must includetranscript_id. - For
exonfeatures, theattributescolumn must includeexon_idto ensure correct handling when Reads map to multiple genes. - The GTF file must not contain empty lines.
- Mitochondrial gene
gene_namein 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):
/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.gtfTIP
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 50396003370Option 2: Install
STAR v2.7.1aand 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 bechr1.
