Diagnosing and treating autism spectrum disorder