High spatial resolution observations with ALMA and VLT/SPHERE show gaps and rings in continuum emission of protoplanetary disks, possibly indicating ongoing planet formation. However, it is still unclear if the gas follows the dust distribution. We present radiation thermo-chemical models for the disk of HD 163296 to study the impact of dust and gas gaps on the chemistry and molecular line emission. We compare a model with only dust gaps to a model that also has gas gaps. In both models, rings and gaps are visible in (sub)mm molecular line emission. Due to chemistry, certain molecules are sensitive to dust gaps where others are more sensitive to gas depletion. Observations of multiple molecules might allow to accurately determine the degree...