A trial court in Kerala's Kannur district on Saturday denied anticipatory bail to Dr M Kodanda Ram, a faculty member of the Kannur Dental College who is accused of having subjected first-year dental student Nithin Raj to caste-based harassment, leading to his death by suicide.