If depreciation was never deducted then a Form 3115 needs to be filed correcting the depreciation
which would allow the deduction of the combined years of depreciation in the current year.
Then the sale of the house could be recorded using the correct accumulated depreciation.
"Form 3115, Change in Accounting Method, is used to correct most other depreciation errors, including the omission of depreciation. If you forget to take depreciation on an asset, the IRS treats this as the adoption of an incorrect method of accounting, which may only be corrected by filing Form 3115."