  Valley filters are crucial to any device exploiting the valley degree of
freedom. By using an atomistic model, we analyze the mechanism leading to the
valley filtering produced by a line-defect in graphene and show how it can be
inverted by external means. Thanks to a mode decomposition applied to a
tight-binding model we can resolve the different transport channels in k-space
while keeping a simple but accurate description of the band structure, both
close and further away from the Dirac point. This allows the understanding of a
destructive interference effect (Fano resonance or antiresonance) on the p-side
of the Dirac point leading to a reduced conductance. We show that in the
neighborhood of this feature the valley filtering can be reversed by changing
the occupations with a gate voltage, the mechanism is explained in terms of a
valley-dependent Fano resonance splitting. Our results open the door for an
enhanced control of valley transport in graphene-based devices.
