The metallicity effect on line-depth ratios in APOGEE H-band spectra