Computation of cohomology of vertex algebras