Coccinella successfully classifies pharmacobehaviours.

a) Bespoke 3D printed arena can house 24 individual flies in a two-dimensional circular space. Each arena measures 11.5 mm in diameter and allows for back illumination either by visible or infrared light sources embedded in the ethoscope base. The red ellipse shows the data being extracted by the ethoscope in real time. w , h: width and height of the ellipse inscribing the animal. φ: the angle of the ellipse in reference to the region of interest. max. vel.: maximal velocity over the last 10 seconds. b) Flowchart describing the analytical pipeline and the tools that compose coccinella. c) Confusion matrices for treatments with 16 compounds and a solvent control, with drugs used at concentrations of 1000ppm (left), 100ppm (center), 1ppm (right). The target icon indicates calculated accuracy while the rolling die indicate the accuracy of a random classifier. d) Confusion matrix for the largest panel of 40 treatments at 100ppm.

Comparison between coccinella and the state-of-the-art.

a) Experimental pipeline illustrating the four experimental analysis. b) Confusion matrix for 12 treatments (11 drugs at 1000ppm and one solvent control) analysed using coccinella. c) Same experimental treatments as in b, analysed using the DeepLabCut → B-SoID → Random forest pipeline starting from high resolution images. The Random forest classifier was trained on a 4:1 training:testing ratio. d) Same as c but with Catch22 identification and SVM clustering after B-SoID grammar dissection. This is a hybrid treatment combining HCTSA feature extraction to the high resolution pipeline. e) Same as c but using K-nearest neighbours (KNN) as cluster algorithm. KNN required a much higher training:testing ratio of 9:1, dramatically reducing the size of the testing dataset. The accuracy of a random classifier for all matrices on this figure would be 8.3% (not shown on figures for lack of space).

Coccinella finds differences in type of sleep rebound after sleep deprivation.

a) Sleep profile of flies over the period of three days. A 12 hours sleep deprivation regime starts at the beginning of the dark phase of day 0 (purple bar). The three-hours windows labelled with green boxes were analysed by coccinella in search of meaningful differences. The letters above refer to the panels using data in those time windows b) Extent of rebound as observed following sleep deprivation as performed in a. Panel a and b reproduce data from25. c) Confusion matrix showing the classification using coccinella of the baseline time-series. No accuracy gain compared to the random classifier. d) Confusion matrix of the rebound data. The classification finds two clusters, separated by the 300 seconds threshold (thick black lines).

a) Explanatory drawing of how confusion matrices present the data. The blue diagonal boxes indicate the number of flies correctly classified (true positives). The vertical cells indicate the number of flies wrongly classified (false positives). The horizontal cells indicate the number of flies that should have been classified (false negatives). b) Survival curves upon treatment with a panel of 12 drugs administered at different concentrations, indicated above each figure (1ppm, 100ppm, 1000ppm). c) Confusion matrices for treatments with 11 compounds and a solvent control, with drugs used at concentrations of 1000ppm (left), 100ppm (middle), 1ppm (right). The target icon indicates calculated accuracy. Accuracy of a random classifier would be 8.3%.

a) Confusion matrix classifying the action of two selected drugs (DDT 100ppm and Dieldrin 100ppm) or solvent on wild type flies (WT) or mutants with known resistance to those drugs. The LD100 of Dieldrin is 0.1-1ppm and the LD100 of DDT is 10-100ppm. The three purple dotted boxes highlight the three experimental clusters (wild-type flies, para mutants, Rdl mutants)

List of all the compounds used in this study with bibliographic reference.