library(stringr)
library(dplyr)
"""
# Generate concatenated worm_track data using the following
for folder in `ls -d *\/`; do
for file in `ls $folder/worm*`; do
cat $file | awk -v file=$file '{print file","$1}' >> worm_track_all.txt
done;
done;
"""
names(worm_track_all) <- c("Folder","time","x","y","blps","mmps")
worm_track_all[,c("Folder", "Filename")] <- str_split_fixed(worm_track_all$Folder, "///",2)