Gas and dust in the Ophiuchus region