GithubHelp home page GithubHelp logo

sumitram / peromyscus-pup-vocal-evolution Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nickjourjine/peromyscus-pup-vocal-evolution

0.0 0.0 0.0 39.46 MB

This repository contains code for the manuscript "Two pup vocalization types are genetically and functionally separable in deer mice"

License: BSD 3-Clause "New" or "Revised" License

Python 9.09% R 0.11% Jupyter Notebook 90.80%

peromyscus-pup-vocal-evolution's Introduction

Peromyscus pup vocal evolution

This repository contains code for reproducing results and figures from

Nicholas Jourjine, Maya L. Woolfolk, Juan I. Sanguinetti-Scheck, John E. Sabatini, Sade McFadden, Anna K. Lindholm, Hopi E. Hoekstra, Two pup vocalization types are genetically and functionally separable in deer mice, Current Biology, 2023 https://doi.org/10.1016/j.cub.2023.02.045

How to use

Code to reproduce analyses for all figures is in the scripts directory. This directory contains six jupyter notebooks and one R script, each of which is written to carry out a specific set of analyses described below. The notebooks use a set of helper functions located in the .py files in the src directory. You can install this code by navigating to your local copy of the repository and running pip install -e .

The raw data analyzed by this code is located in a Dryad database at https://doi.org/10.5061/dryad.g79cnp5ts Please see the README file associated with that dataset for more information about the raw data.

Jupyter Notebooks

Segmenting and UMAP.ipynb

This notebook carries out the segmenting and UMAP embedding in Figure 1 panel C and Supplemental Figure 1.

Annotate from UMAP.ipynb

This notebook produces the annotations analyzed in Figure 2.

warbleR_feature_extraction.R

This script uses the R package warbleR to calculate acoustic features of vocalization segments produced by the Segmenting and UMAP.ipynb notebook. It takes three inputs: species (the species to calculate features from); wavs.dir (the directory containing the segmented vocalizations from that species with one .wav file per vocalization); and analysis.dir (the directory where a csv with acoustic features calculated for each of those wav files will be saved). It is written to be called from the command line along with these inputs, e.g. R path/to/warbleR_feature_extraction.R species wavs.dir analysis.dir

Prepare warbleR Job Scripts.ipynb

We calculated acoustic features for vocalizations using a computing cluster. This notebook produces the job scripts required to do this. If you have access to a computing cluster, this is the easiest way to calculate features for all the vocalizations of all the species.

Train Models on Features.ipynb

This notebook trains the machine learning models in Figure 2 and Supplemental Figure 2 using acoustic features calculated by warbleR_feature_extraction.R

Analyse Playback.ipynb

This notebook produces the analyses in Figure 3.

Analyze Vocalizations.ipynb

This notebook produces the anlayses for all other main and supplemental Figures.

Anaconda Environments

The conda environments used to produce the results in the paper are located in r-env.yml, which contains all of the R packages used for statistical analyses, and article-env.yml, which contains python packages used to carry out all other analyses. You can reproduce these environments by running conda env create -f r-env.yml and conda env create -f article-env.yml, respectively.

Two letter species codes

We use two-letter codes as shorthand to refer to the different taxa we analyze. They are:

code taxon
BW P. maniculatus bairdii
BK P. maniculatus gambelli
SW P. maniculatus rubidus
NB P. maniculatus nubiterrae
PO P. polionotus subgriseus
LO P. polionotus leucocephalus
GO P. gossypinus
LL P. leucopus
MU Mus musculus domesticus (C57Bl6/j)
MZ Mus musculus domesticus (wild)

peromyscus-pup-vocal-evolution's People

Contributors

nickjourjine avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.