By intersecting a small three-dimensional sphere which surrounds a singular point of a planar curve, with the curve, one obtains a link in three-dimensional space. In my talk I explain a conjectural formula for the Khovanov-Rozansky homology of the link which interprets the ranks in terms of topology of some natural stratification on the moduli space of torsion free sheaves on the curve. In particular I will present a formula for the ranks of the Khovanov-Rozansky homology of the torus knots which generalizes Jones formula for HOMFLY invariants of the torus knots. The talk presents joint work with Vivek Shende and Jake Rasmussen.