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_combinecell_numprior |
Aggregate UMI-level count evidence, build cell-number support values, and construct prior information for candidate-site genotyping. | step3_UMI_combine.pystep3_cell_number.pystep3_get_prior.py |
| Step 4: Genotyping | genotyping |
Infer genotype evidence at multiple levels. | step4_genotyping.py |
| Step 5: Feature Extraction and Phasing | spatial_featuremappability_featureread_featureRNA_featurephasing |
Extract spatial, mappability, read-level, and RNA-level features, then refine candidate sites with phasing evidence. | step5_spatial_feature.pystep5_mappability_feature.pystep5_read_feature.pystep5_RNA_level_feature.pystep5_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¶
Recommended: one-command workflow¶
SpaceTracer run --config config.yaml
Advanced: inspect by code step order¶
Use these pages in code order:
- Step 0: Cluster Preparation
- Step 1: BAM Processing
- Step 2: Pileup Candidate Sites
- Step 3: Count and Prior Construction
- Step 4: Genotyping
- Step 5: Feature Extraction and Phasing
- Step 6: Feature Merge and Filtration
- Step 7: Mutation Prediction
- Post-step: Phylogeny (optional)
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.txtand 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.