Step-by-step guide

This page is aligned to the code layout in SpaceTracer/steps so users can map tutorials directly to implementation files.

For exact input/parameter interpretation, open each step page under this section.

Code-aligned execution map

Step tutorial Runtime step name Purpose Code step file
Step 0: Cluster Preparation cluster Load or compute spot/domain clusters. step0_cluster.py
Step 1: BAM Processing bam_processing Build in-tissue filtered BAM for downstream analysis. step1_bam_processing.py
Step 2: Pileup Candidate Sites mpileup Generate candidate loci and chunk metadata. step2_mpileup.py
Step 3: Count and Prior Construction umi_combine
cell_num
prior
Aggregate UMI-level count evidence, build cell-number support values, and construct prior information for candidate-site genotyping. step3_UMI_combine.py
step3_cell_number.py
step3_get_prior.py
Step 4: Genotyping genotyping Infer genotype evidence at multiple levels. step4_genotyping.py
Step 5: Feature Extraction and Phasing spatial_feature
mappability_feature
read_feature
RNA_feature
phasing
Extract spatial, mappability, read-level, and RNA-level features, then refine candidate sites with phasing evidence. step5_spatial_feature.py
step5_mappability_feature.py
step5_read_feature.py
step5_RNA_level_feature.py
step5_phasing.py
Step 6: Feature Merge and Filtration merge_feature Merge features and apply filtration tags/switches. step6_merge_all_features.py
Step 7: Mutation Prediction mutation_prediction Run model inference and export VCF results. step7_mutation_prediction.py

Post-processing outside SpaceTracer/steps:

How to run

SpaceTracer run --config config.yaml

Advanced: inspect by code step order

Use these pages in code order:

Important outputs by stage

  • Code step 4: genotype evidence files (for example ind_geno_filter_file, spot_geno_file, cluster_vaf_file)
  • Code step 6: merged/filtered feature tables (all_feature.txt and parquet mirror)
  • Code step 7: predicted VCF outputs from mutation prediction
  • Optional post-step phylogeny: lineage analysis from high-confidence loci

For practical rerun recipes (for example, rerun only RNA or spatial branches), see Single-Step Debug Cookbook.