It's been done (The Durk did it) but it is a ton of work. If you paid a shop to do it, plan on it costing several thousand dollars. It is a very labor intensive job but it can be done.
If you do it yourself and have the equipment to do it, I can't imagine that it would cost too much minus the stuff that is going to break and/or needs to be replaced.
How bad is the frame? Many frames can be saved but that will also cost some money if you can't do it yourself.
Good luck either way.