Transferring Assets Before A Bankruptcy
If you know at the time that you transfer an asset that you're unable to pay your debts in full, you are pretty sure to have a problem with that transfer if you later go into bankruptcy. When it's a transfer to a related party, any transfers in the 5 years before the bankruptcy are considered to be improper unless you received market value payment for the asset that was transferred.
So, if you sell your interest in the house to your wife (or someone else), and IF YOU RECEIVE FAIR MARKET VALUE FOR IT, this would be a valid transfer and generally couldn't be challenged if you later did a bankruptcy. You would, however, have to show what you did with the money you received as payment for your interest in the house. If you didn't use it to pay your creditors, you will likely have a problem in a bankruptcy.
If you transfer the asset as part of divorce proceedings, you may be able to show that the transaction was proper and not a problem in a bankruptcy. There are many variables in these kinds of transactions, so it's pretty hard to give you a clear answer without having some very specific details.
This is sort of the tip of the iceberg in describing which transactions are ok and which are not. If you are contemplating a transfer at a time you can't pay your debts in full, you should get some professional advice before you do anything.