Computational protocol: Working-for-Food Behaviors: A Preclinical Study in Prader-Willi Mutant Mice

Similar protocols

Protocol publication

[…] Time series of nose poking activity were extracted by collapsing to time bins of 6 min, then normalizing to the maximum value, and averaging over 24 hr. For each subject, a changing point detection was performed following the bootstrap procedure described in ) excluding hours of food availability (from 12 am to 6 pm). Briefly, to avoid outliers, we analyzed ranked values instead of the actual activity. Because each time series X = X1,X2,…,Xn consists of N = 180 time points, we have given a rank of N to the highest value of the series, N − 1 to the second largest and so on. Let us call the series of ranks R = R1,R2,…,Rn. From this series, we computed a CUMSUM chart, defined as:{S0=0Sk=Sk−1+Rk−R¯(1)Where R¯ is the average value of the series R.The CUMSUM chart increases if the time series is above its own average for a prolonged period, and decreases if the time series is below its average. An estimator of change could be:Sdiff=Smax−Smin(2)where Smax=maxK=1,…,NSk, and where Smin=minK=1,…,NSk.We implemented a bootstrap procedure to test the hypothesis of no changes as follows:Generate a sample of N values, R0= {R01,R02,…,R0N}.Compute the CUMSUM chart from this series, and extract the estimator.Repeat points 1 and 2 a number of times (we repeated it 105 times) to obtain an empirical distribution of the estimator under the hypothesis that no change in the series occurred.If the estimator from the original CUMSUM chart, Sdiff, exceeds the 95% percentile of the bootstrap sample distribution, we reject the hypothesis that no change has occurred.If a change is detected, an estimator of the time where the change has occurred can be obtained by minimizing the mean square error:m^=min(MSE(m))=min(∑k=1m(Rk−R1¯))2+∑k=m+1N(Rk−R2¯)2(3)where R1¯=1m∑1=1mRi and R2¯=1N−m∑1=mNRi.To find multiple changing points, we split the time series in two,R1,R2,…,Rn and Rm+1,R2,…,Rn, and repeat the procedure for the series. We split the data and repeated the procedure until significant changes were detected. Once all changing points were extracted, we estimated the 5th and 95th percentile of the distribution of time series in each of the intervals between consecutive changing points. All the procedures were implemented in Python, using the packages scipy, numpy, and matplotlib. […]

Pipeline specifications

Software tools SciPy, Numpy, matplotlib
Applications Miscellaneous, WGS analysis
Organisms Mus musculus