Chapter 5 Run the STAR workflow

5.1 Run runall

iobrpy runall \
  --fastq data/fastq \
  --outdir results/PRJDB16684 \
  --mode star \
  --index /path/to/index/dir/star \
  --threads 4 \
  --batch_size 1 \
  --project PRJDB16684

5.2 What is already included

Do not rerun these components in separate chapters. STAR mode runall already performs:

  1. fastp quality control;
  2. STAR alignment and gene counting;
  3. merged gene counts, count-to-TPM conversion, and log2 transformation of the TPM matrix;
  4. signature scoring;
  5. six-method TME panel: run CIBERSORT, IPS, ESTIMATE, MCPcounter, quanTIseq, and EPIC, then merge their outputs;
  6. ligand-receptor scoring;
  7. TRUST4 TCR/BCR analysis.

5.3 Output contract

results/PRJDB16684/
├── 01-qc/
├── 02-star/
│   ├── <sample>_Aligned.sortedByCoord.out.bam
│   ├── <sample>_ReadsPerGene.out.tab
│   └── PRJDB16684.STAR.count.tsv.gz
├── 03-tpm/
│   ├── count2tpm.csv
│   └── tpm_matrix.csv
├── 04-signatures/calculate_sig_score.csv
├── 05-tme/
│   ├── cibersort_results.csv
│   ├── IPS_results.csv
│   ├── estimate_results.csv
│   ├── mcpcounter_results.csv
│   ├── quantiseq_results.csv
│   ├── epic_results.csv
│   └── deconvo_merged.csv
├── 06-LR_cal/lr_cal.csv
└── 07-TCRBCR/
    ├── <sample>/<sample>_report.tsv
    ├── trust4_immdata.csv
    └── trust4_immune_indices.csv

The standalone analyses chapter reuses three outputs:

  • 03-tpm/tpm_matrix.csv for the BayesPrism teaching run;
  • 05-tme/cibersort_results.csv for TME clustering;
  • 02-star/*_Aligned.sortedByCoord.out.bam for HLA typing.