unravel.cluster_stats.mean_IF module#

Use cstats_mean_IF from UNRAVEL to measure mean intensity of immunofluorescence staining in clusters.

Prereqs:
  • vstats

  • cstats_fdr

Inputs:
  • This can be run from the vstats directory (will process .nii.gz images in the current directory)

Outputs:
  • ./cluster_mean_IF_{cluster_index}/image_name.csv for each image

  • Columns: sample, cluster_ID, mean_IF_intensity

Next steps:
  • cd cluster_mean_IF…

  • utils_prepend -sk <path/sample_key.csv> -f # If needed

  • [cstats_index and cstats_table] # for an xlsx table and anatomically ordered clusters that can be used with cstats_prism

  • cstats_mean_IF_summary –order Control Treatment –labels Control Treatment -t ttest # Plots each cluster and outputs a summary table w/ stats

  • cstats_mean_IF_summary –order group3 group2 group1 –labels Group_3 Group_2 Group_1 # Tukey tests

Usage:#

cstats_mean_IF -ci path/rev_cluster_index.nii.gz [-ip ‘*.nii.gz’] [-c 1 2 3] [-v]

unravel.cluster_stats.mean_IF.parse_args()[source]#
unravel.cluster_stats.mean_IF.calculate_mean_intensity_in_clusters(cluster_index, img, clusters=None)[source]#

Calculates mean intensity in the img ndarray for each cluster in the cluster index ndarray and saves it to a CSV file.

unravel.cluster_stats.mean_IF.write_to_csv(data, output_file, sample)[source]#

Writes the data to a CSV file with sample name included.

unravel.cluster_stats.mean_IF.main()[source]#