pyXenium.contour.compare_contour_transcript_de#
- compare_contour_transcript_de(sdata, *, contour_key, groupby, contour_query=None, cell_query=None, transcript_query=None, feature_key='gene_name', genes=None, assignment='coordinates', comparisons=('global', 'one_vs_rest'), case=None, reference=None, min_total_transcripts_per_contour=1, min_contours_per_group=2, include_zero_counts=False, return_contour_gene=True)#
Compare contour groups with transcript-count pseudobulk normalization.
Transcript coordinates are assigned directly to contour polygons, converted to contour x gene counts, normalized as CPM and log1p(CPM), and compared across contour groups. By default transcripts are assigned by their x/y coordinates. Set
assignment="cell_id"to aggregate cell-associated transcripts through the contour membership of each cell centroid, which is useful for whole-transcriptome screening. Setreturn_contour_gene=Falsefor whole-transcriptome scans where the full contour-gene long table would be unnecessarily large.- Parameters:
- Return type: