op-amp level shifter
It sounds like you need a precision full wave rectifier like this: -



Where the ground connection in the above circuit is at 2.5 volts. This converts input voltages above 2.5 volts and input voltages below 2.5 volts to a positive voltage above 2.5 volts DC.

Then you would add a gain stage that incorporates subtraction of the 2.5 volts DC to give you an output that went between 0 volts and 10 volts. A circuit very similar to this one will subtract an offset whilst applying gain.