Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions analysis_utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion analysis_utils/parse_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from typing import List, Tuple

REQUIRED_METADATA = ['ExptNumber', 'sex', 'Strain']
REQUIRED_METADATA = ['ExptNumber', 'Sex', 'Strain']
# Extra metadata is nice to have but may not be identical per-animal and ID marking can't be used to pick out individuals from metadata yet...
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Writing is not fully clear here; maybe try breaking the sentences up for clarity - "Extra metadata is nice to have but may not be identical between animals." and "ID marking is unable to be used to sort individuals from metadata"

EXTRA_METADATA_DEFAULT = ['Location', 'birthDate', 'MDSEnrichment1', 'MDSEnrichment2', 'MDSEnrichment3', 'ExptDoneBy', 'MDSFoodWater', 'MDSBedding', 'MDSLight', 'Set1', 'Set2', 'RecipientMouseNumber']

Expand Down
39 changes: 39 additions & 0 deletions plots/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Plotting Instructions

This folder contains scripts for generating plots from behavioral summary data.

## How to Run

To generate strain-level plots, you will need the following information:

1. **Behavior Name**
- The name of the behavior you want to analyze (e.g., `Feeding`, `Drinking`, etc.).

2. **Path to a Summary CSV File**
- This file is generated using the `generate_behavior_tables` script.
- It contains the summary statistics for the behavior of interest.

3. **Metadata File from Tom**
- This is an Excel file containing experiment metadata (e.g., animal IDs, strain, sex, room, etc.).
- There are older versions of this file around the HPC. You can use the default one, but if you are analyzing experiments more recent than the date of this file (2023-09-07), you will not find them here.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line could be rewritten for clarity. What do the older version of the file do for you? Where is the default file, is that what you're linking out to?
"Experiments analyzed after 2023-09-07 will not have their metadata captured in the default file shared above"


## Example Command

```bash
python3 plots/generate-strain-plots.py \
--behavior Feeding \
--results_file /path/to/behavior_Feeding_summaries.csv \
--jmcrs_data /path/to/metadata_file.xlsx \
--remove_experiments MDB0003,MDX0008 \
--output_dir /path/to/output/plots/
```

- `--behavior`: Name of the behavior (string)
- `--results_file`: Path to the summary CSV file
- `--jmcrs_data`: Path to the metadata Excel file
- `--remove_experiments`: (Optional) Comma-separated list of experiment IDs to exclude
- `--output_dir`: Output directory for all plot files (will be created if it does not already exist)

## Notes
- Make sure you have the correct Python environment with all dependencies installed (see the main project README for details).
- If you encounter issues with missing experiments in the metadata, check if your metadata file is up to date.
Loading