iscc.data.reads.emit_scrna_reads ¶
emit_scrna_reads(cell_data, obs_fidelity=0.5, protocol='10x', error_rate=0.001, seed=42, cell_subset=None, emit_fastq=False, read_length=90, transcriptome=None, reference=None, template_bam=None, outdir='scrna_reads_out', genome_seed=20240601, **scrna_kwargs)
End-to-end mutation-aware scRNA: counts -> observed alt/ref UMI matrices -> reads.
Runs the scRNA assay to get the expression count matrix (fixing UMI totals), pulls the
engine's cell_rna_vaf, and produces the count-level observed allele matrices via
observed_allele_counts. Surfaces the true DNA-VAF (cell_snv) alongside, for the
scDNA-vs-scRNA benchmark.
Reads (emit_fastq=True): a self-contained 10x-style paired FASTQ on a synthetic
transcriptome (write_scrna_fastq) — barcodes + UMIs, one read per UMI so totals are
conserved, the alt base carried on alt UMIs. No external binary (mirrors the DNA
SyntheticReference). Supplying a real reference + template_bam selects the scReadSim seam
instead (realism on real sequence), skipped gracefully when the binary is absent.
Returns a dict: alt/ref/total/obs_vaf (cells x genes), dna_vaf (true,
aligned), obs_fidelity, status, fastq (paths when emitted) and n_reads.