Keywords
tic disorders,Tourette syndrome, reward, reinforcement, psychology, software
This article is included in the Tics collection.
tic disorders,Tourette syndrome, reward, reinforcement, psychology, software
This revision addresses questions raised by the reviewers. The introduction is expanded to clarify that the software does not detect the tics; rather, it facilitates an observer’s recording their timing. The introduction and conclusion also clarify that the intended use of the software is primarily for research in the office setting. Future adaptations of the software for clinical utility are possible, and discussed in conclusions. Finally, we now provide in the implementation section a direct link to the GitHub page for the python script that can be used to parse the log files.
See the authors' detailed response to the review by Patrick Haggard
See the authors' detailed response to the review by Danielle C. Cath
Woods and Himle developed a tic suppression paradigm (TSP) that could be used in the experimental setting to demonstrate and quantify the effects of intentional tic suppression on tic rate in Tourette syndrome (TS) and other tic disorders1–5. In this paradigm, each participant is observed during several experimental conditions, baseline and differential reinforcement of zero-rate ticcing (DRO), and sometimes also verbal instruction to suppress tics and/or noncontingent reinforcement (NCR).
In the course of conducting a longitudinal study of children with Provisional Tic Disorder6, we found that tic suppression is seen within the first few months after a child’s first tic7. We also found that the TSP required substantial investigator effort, and we started writing software with the following goals:
automated tic counting, timing and record-keeping;
automated reward delivery in the DRO condition;
automated reward delivery in the NCR condition.
The overall motivations included not only convenience but also improvement in accuracy. Note that “automated tic counting” here refers to minimizing an expert observer’s record-keeping (simply pushing a button for each tic observed), not to machine detection of the tics. This software, and optional connection to hardware, were intended for use in the research session with the TSP as described above; later in Conclusions we describe possible adaptations for other settings. We present the software here to facilitate its use by others.
TicTimer first has the user set up the details for a session, then it runs a clock for the specified session time while writing significant events to a log file. The program writes a line to the log file for each of the following events: session started and ended, tic detected, ten seconds passed without tics, and reward dispensed. Each line includes the time of the event. By parsing through each line in a log file, a python script (also available on GitHub) can extract and summarize the key data.
The hardware allows reward tokens to be dispensed automatically to the study participant. One end of the long cable enters the token dispenser and its two wires attach to the two pins in the Passive Connection Panel that, when shorted, trigger release of a reward token. The Student Trainer Interface box provides power to the token dispenser box and a remote pushbutton for manually triggering token release. The other end of the long cable connects to the two normally open pins on the relay inside of the small plastic box. The USB to TTL serial cable attaches to the input pins on the relay, with the USB end of the cable leaving the box to attach to the computer running TicTimer. Figure 1 shows the final assembly.
Parts list:
Med Associates token dispenser box, Part #ENV-703
Med Associates SG-595 Student Trainer Interface
Med Associates SG-215D3 Passive Connection Panel
5V Relay module (SainSmart part # 20-018-100)
USB to TTL serial cable (Adafruit part # 954)
Plastic project enclosure box (Velleman part # WCAH2855)
~6m cable with at least one pair of wires free
System software requirements are Java 8 and RXTX for Java, a library for serial port communication. Binaries for Windows and Linux are provided by fizzed.com. Python 3 was used for the log file reader script.
The program can be run with or without the relay and USB cable. If the hardware is set up and connected to the computer, the program can start in “link mode.” Otherwise, TicTimer can still be run in “button mode,” in which the automatic reward system is replaced by a human who presses the push button attached to the Student Trainer Interface when prompted by a beep and a red flash on the computer screen.
The following procedure applies to both reward modes. First, the user presses “Setup” to choose which type of session is being run and to specify where the session log should be saved. For the NCR condition, the user is also prompted to identify the log file from a previously completed DRO session in the same subject (which provides the timing for the rewards dispensed in the NCR condition). Once setup is completed, the session can be started. During a session, the person observing the subject records tics by clicking the “Tic Detected” button or by pressing “T” or the space bar. If the session type includes rewards (DRO and NCR), they are dispensed appropriately. The session ends when the predetermined time elapses or when the user ends it manually by pressing “End Session” or by closing the window.
If a session is ended manually and restarted, the new session log will be appended to the old one unless a new file was chosen in setup. If a log file contains multiple sessions, only the last session will be used by the NCR mode (which requires a DRO session file in setup) and the data reader script.
To summarize the data from a TicTimer log file, run the accompanying python script (TT_Data.py) with one or more log files as arguments. For each log file given, the script reports the length of the session and the number of tics, 10-second tic-free intervals, and rewards dispensed during the session. The choice of 10 seconds as the duration of rewarded tic-free intervals was made to replicate Woods and Himle’s (2004) original methods, and because we have used that duration in all of our own studies.
We have provided 8 sample session log files as Supplementary Files (Supplementary files 1–Supplementary file 8) (subject100_session*_TicTimer_log.txt). These are examples of the files that TicTimer creates during a session. Each line in a log file contains an event and the time at which it occurred. Log files are written in plain English, so they can be read directly if desired. These sample data originated from a participant in the study described by Greene et al.7, but all identifying data were removed and these files no longer comprise human subjects data.
The file TT_Data_output.txt (Supplementary file 9) contains output from the python script, summarizing those session files. This output is again in plain text, reporting the session length and the number of each type of event recorded for each log file.
The TicTimer program, now connected to the reward token dispenser, has simplified implementing the TSP and improved the accuracy of reward delivery (given inevitable limitations of human attention and response time in button mode). The software, while designed for our purposes in tic disorder research, may find other uses. The most obvious of these may be for research on traditional habit disorders; for instance, hair pulling and skin picking appear in the “Obsessive-compulsive and related disorders” section of DSM-58. The most obvious application to the clinical setting may be in documenting suppression ability in the office, before and after treatment. However, we have created loosely related web-based software designed for a potential clinical application10. Another potential future modification would be to add machine detection of tics, e.g. by online video analysis or accelerometry; such an improvement would be quite welcome but is difficult to reduce to practice.
The source code is available on GitHub under a BSD 3-clause license.
The current release is available on Zenodo, at DOI 10.5281/zenodo.837884.
Software development and manuscript preparation were funded in part by the U.S. National Institutes of Health (NIH), grant numbers K24 MH087913, R21 NS091635, and R01 MH104030.
The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
The first 8 supplementary files are the output from running 8 TicTimer sessions in one subject.
Supplementary File 1: Baseline Log 1
This file came from the first baseline session.
Click here to access the data.
Supplementary File 2: Verbal Log 1
Output from the first session with only verbal instruction to resist tics.
Click here to access the data.
Supplementary File 3: DRO Log 1
Output from the first DRO session.
Click here to access the data.
Supplementary File 4: NCR Log 1
Output from the first NCR session.
Click here to access the data.
Supplementary File 5: Verbal Log 2
Output from the second session with only verbal instruction to resist tics.
Click here to access the data.
Supplementary File 6: Baseline Log 2
Output from the second baseline session.
Click here to access the data.
Supplementary File 7: DRO Log 2
Output from the second DRO session.
Click here to access the data.
Supplementary File 8: NCR Log 2
Output from the second NCR session.
Click here to access the data.
Supplementary File 9: Data Reader Script Output
Output from the command "python TT_Data.py *_log.txt" in the directory containing the 8 sample log files. It summarizes the data contained in those files.
Views | Downloads | |
---|---|---|
F1000Research | - | - |
PubMed Central
Data from PMC are received and updated monthly.
|
- | - |
Competing Interests: No competing interests were disclosed.
Is the rationale for developing the new software tool clearly explained?
Yes
Is the description of the software tool technically sound?
Partly
Are sufficient details of the code, methods and analysis (if applicable) provided to allow replication of the software development and its use by others?
Yes
Is sufficient information provided to allow interpretation of the expected output datasets and any results generated using the tool?
Yes
Are the conclusions about the tool and its performance adequately supported by the findings presented in the article?
Partly
Competing Interests: No competing interests were disclosed.
Reviewer Expertise: Neurocognition of human sensorimotor function
Is the rationale for developing the new software tool clearly explained?
Partly
Is the description of the software tool technically sound?
Yes
Are sufficient details of the code, methods and analysis (if applicable) provided to allow replication of the software development and its use by others?
Yes
Is sufficient information provided to allow interpretation of the expected output datasets and any results generated using the tool?
Partly
Are the conclusions about the tool and its performance adequately supported by the findings presented in the article?
Yes
Competing Interests: No competing interests were disclosed.
Reviewer Expertise: Science practioner, specialised in research and clinics of diagnosis and treatment of tics and Tourettes Disorder
Alongside their report, reviewers assign a status to the article:
Invited Reviewers | ||
---|---|---|
1 | 2 | |
Version 2 (revision) 22 Dec 17 |
read | |
Version 1 24 Aug 17 |
read | read |
Provide sufficient details of any financial or non-financial competing interests to enable users to assess whether your comments might lead a reasonable person to question your impartiality. Consider the following examples, but note that this is not an exhaustive list:
Sign up for content alerts and receive a weekly or monthly email with all newly published articles
Already registered? Sign in
The email address should be the one you originally registered with F1000.
You registered with F1000 via Google, so we cannot reset your password.
To sign in, please click here.
If you still need help with your Google account password, please click here.
You registered with F1000 via Facebook, so we cannot reset your password.
To sign in, please click here.
If you still need help with your Facebook account password, please click here.
If your email address is registered with us, we will email you instructions to reset your password.
If you think you should have received this email but it has not arrived, please check your spam filters and/or contact for further assistance.
Comments on this article Comments (0)