Methods and systems are described to automatically obtain and analyze a lung airway gas sample from the breath of a person for compositional analysis. These techniques may provide an improved method for example for accurately and reliably measuring nitric oxide for asthma assessment in young children and non-cognizant patients.