The GUI
The goal of the GUI was to be able to analyze many cages over multiple days, and output a single file containing the data for further analysis.
The GUI starts by loading a .tab file which contains the feeding data. The code for this was actually easy, as the data is just a tab-delimited text file. (It takes a little longer than I expected, a few seconds, due to datetime parsing.)
Once the data is loaded, the GUI asks the users for information about which cages to analyze, which dates, times, and how to bin the data by time. If you are interested in the data from 10 cages, binned at one hour increments, over 5 days, you can simply input those numbers. Once everything is set, you can then save the data to a .csv, which will have the same base filename as the input data. The .csv will contain columns for:
date and time
cage id
number of feeding bouts
average bout duration (in seconds)
total eaten (in grams)
number of meals
average meal duration (in seconds)
average meal size (in grams)
The GUI starts by loading a .tab file which contains the feeding data. The code for this was actually easy, as the data is just a tab-delimited text file. (It takes a little longer than I expected, a few seconds, due to datetime parsing.)
Once the data is loaded, the GUI asks the users for information about which cages to analyze, which dates, times, and how to bin the data by time. If you are interested in the data from 10 cages, binned at one hour increments, over 5 days, you can simply input those numbers. Once everything is set, you can then save the data to a .csv, which will have the same base filename as the input data. The .csv will contain columns for:
date and time
cage id
number of feeding bouts
average bout duration (in seconds)
total eaten (in grams)
number of meals
average meal duration (in seconds)
average meal size (in grams)
If you use BioDAQs to measure feeding, and are similarly frustrated with the software, you can give this GUI a try! You only need to download two python files, BioDAQGUI.py and BioDAQmain.py. To run the GUI, you can use either python 2.7 or 3+ (the Anaconda install should have all the relevant modules). Just open a command prompt, and type:
python BioDAQmain.py
I suggest comparing the output of the GUI to some pre-analyzed data, so you can verify that it works. If you find this helpful, let me know!
Hi Mike, This is PERFECT. Just what my client will need. I'll forward.
ReplyDeleteAlso, you could do me a huge favor. Can you possibly send me some raw data output files from BioDAQ.
If such files are under 10MB then send to wilant@gmail.com
If they are larger, then a Dropbox link would work, or www.wetransfer.com.
THANKS MUCH IN ADVANCE!
Wilant van Giessen
Account Manager (Southeast Region)
__________________________________________
Wilant van Giessen, M.Sc.
Noldus Information Technology, Inc.
Asheville, North Carolina
Southeast Regional Office - FL, GA, TN, SC, NC, AL
phone 703-840-2462 | mobile 828-712-9499
email wilant@noldus.com | web www.noldus.com | skype Wilant
Hi there! I would really like to use this program, but I am new to Python and I tried everything I could think of but it didn't work. I enlisted a Python veteran, but he also could not get the file to work. He recommended asking you for the file as an .exe. Can you send that to me to try? Thank you!!
ReplyDeleteMolly McDougle
Research Assistant
John B. Pierce Laboratory
mmcdougle@jbpierce.org
nice post
ReplyDelete