troutpy.pl.genes_over_noise

troutpy.pl.genes_over_noise#

troutpy.pl.genes_over_noise(sdata, scores_by_genes, layer='extracellular_transcripts', output_path='', save=True, format='pdf')#

Plot the log fold change per gene over noise as a boxplot grouped by codeword category.

Parameters:
  • sdata (SpatialData) – Spatial data object containing the extracellular transcript layer.

  • scores_by_genes (DataFrame) – DataFrame containing gene scores with a feature_name and a log_fold_ratio column.

  • layer (str (default: 'extracellular_transcripts')) – Key of the points layer in sdata with feature names and codeword categories.

  • output_path (str (default: '')) – Directory in which to save the figure. A figures subdirectory is created within it.

  • save (bool (default: True)) – Whether to save the figure to output_path.

  • format (str (default: 'pdf')) – File format used when saving the figure.

Return type:

None

Returns:

None