Basing on the representation theory of quantum toroidal algebras we propose a generalization of the refined topological vertex formalism incorporating additional “Higgsed” vertices and lines apparently corresponding to refined Lagrangian branes. We find rich algebraic structure associated to brane diagrams incorporating the new vertices and lines. In particular, we build the screening charges associated to W-algebras of types gl(n) and gl(n|m), and more generally to Y-algebras of Gaiotto and Rapcak. The resulting refined partition functions coincide with partition functions of certain interacting 5d-3d-1d systems of quiver gauge theories (including quivers associated with superalgebras). Our formalism also automatically incorporates Ruijsenaars-Schneider Hamiltonians and their supersymmetric generalizations which act on the refined partition functions.