Ventilation is a simple physiological function that ensures the vital supply of oxygen and the elimination of CO2. The recording of the airflow through the nostrils of a mouse over time makes it possible to calculate the position of critical points, based on the shape of the signals, to compute the respiratory frequency and the volume of air exchanged. These descriptors only account for a part of the dynamics of respiratory exchanges. In this work we present a new algorithm that directly compares the shapes of signals and considers meaningful information about the breathing dynamics omitted by the previous descriptors. The algorithm leads to a new classification of inspiration and expiration, which reveals that mice respond and adapt differently to inhibition of cholinesterases, enzymes targeted by nerve gas, pesticide, or drug intoxication.