This repository contains R scripts and data used for investigating rhythmic behaivor of fruit flies. Flies and experimental condition should be referred to: Masayoshi Ikarashi and Hiromu Tanimoto (2021) "Drosophila acquires seconds-scale rhythmic behavior"(under revision).
Rdata
This folder contains data, like velocity and result of behavioral classification, that can be analyzed by following R scripts.
Script_Wavelet_Analysis.R
This is a R-script for wavelet analysis. Behavioral output can be also visualized as ethogram or histogram.
The wavelet analysis is performed by using the R-package called "Rwave".
You can also visualize input-signal like behavioral time series and spectrogram by the same script.
https://cran.r-project.org/web/packages/Rwave/index.html
Script_Bootstrapped_SEM.R
This is a R-script for calculating bootstrapped standard error of the means.
You can also visualize the result.
Script_Permutation_Test.R
This is a R-script for performing permutation-test.
Description of variables
In matrix data, each row represents each time point (59.94fps) and each column represents each fly. Fisrt stimulus started in 10 times inter-stimulus-interval (i.e. Firts stimulus started at 20 sec in 2 sec inter-stimulus-group).
*_exp: experimental group
*_con: control group
mat_*: matrix of the resulut of behavioral classification. 1: jumping, 2: walking, 3: small movement, 4: resting.
lv_*: matrix of linear velocity. [millimeter/sec]
side_*: matrix of sideways velocity. [millimeter/sec]
ecc_*: matrix of eccentricity of ellipse.
dir_*: matrix of direction of major axis of ellipse against horizontal axis.