The important ratio for mortgages is debt to income, and they use gross income for that, so don't fuss about AGI.
Not all income sources are treated equally, W2 income gets less scrutiny. If you are self-employed, they'll use tax returns for the last 2 years to assist in determining how much of your income they'll count toward mortgage qualification purposes. If you own rental property, they typically only count 70% of your income and only do so after you've been collecting rent for 2 years. Not all lenders are identical.
I suggest sitting down with a lender (I prefer local credit unions, but there are plenty of lenders out there) and talking through some qualification scenarios. I wouldn't authorize a credit inquiry, but they should be willing to help you get an idea of how much you'll qualify for. I also suggest buying way below the max they'll lend if at all possible, much more comfortable with some breathing room in the budget.