Welcome Spring 2025 Students!

Lab#

Learning Objectives#

At the end of this learning activity you will be able to:

  • Practice creating statistical figures to answer biological questions.

  • Practice writing figure legends for statistical figures.

  • Practice writing descriptive reasonings about a figure.

Note: It is difficult to automatically grade figures as they are many “correct” answers. So, most questions will accept any figure or axis and then ask you to answer a question that should be obvious from a properly generated figure. For all questions, assume a 95% interval.

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

%matplotlib inline
cell_level_data = pd.read_csv('pHrodo_DMEM.csv')
cell_level_data.head()

How full is each cell?#

The strategy of using the number of beads in a cell as our count is that it is impacted by the size of the cell. Small cells can only eat a few beads, large cells can eat many. To address this we’ll create a new measurement, the fraction of the cell containing beads. This way, small cells that are ‘stuffed’ with beads will beat out large cells with only a few beads.

For this analysis we’ll use:

  • ObjectAreaCh1 - The area of the entire cell.

  • SpotTotalAreaCh2 - The area of the cell containing beads.

Q1: Create an fraction_area_covered column#

# What percentage of the cell's area is covered by phrodo beads

cell_level_data['fraction_area_covered'] = ...
# Create a barplot of the fraction_area_covered in each well

q1_plot = ...
grader.check("q1_area_covered")

Q2: Merge well_level_data with plate-map and visualize#

Points: 5

# Load in plate map
plate_map = ...
# Calculate the average `fraction_area_covered` for each well in the cell_level_data

well_level_data = ...
well_level_data.head()
# Merge well_level_data with the platemap
sample_level_data = ...
sample_level_data.head()
q2_plot = ...
# Which experimental condition (pHrodo_conc_ug) had less noise in the measurement?
# Answer 5.0 or 7.5
q2a = ...
# Does this graph show evidence that dopamine increases 
# the percentage of the cell that contains beadsd?
# Anwser 'yes' or 'no'
q2b = ...
grader.check("q2_merge")

This week we explored how to summarize large datasets by sample. This aggregation is often important for downstream inferential tests like t-tests and ANOVAs. However, this technique also looses a significant amount of information; ~525 numbers are compressed to a single value. We will also explore more nuanced techniques like regression which allows us to use each of these points individually.


Submission#

Check:

  • That all tables and graphs are rendered properly.

  • Code completes without errors by using Restart & Run All.

  • All checks pass.

Then save the notebook and the File -> Download -> Download .ipynb. Upload this file to BBLearn.