In particular, did Napoleon and/or the French government really think they could invade Egypt without expressly antagonizing the Ottomans? In my glancing study of the French Revolutionary and Napoleonic Wars, I have often come across the notion that the invasion of Egypt was justified as aiming to overthrow the Mamluk administration rather than the Ottomans, but I'm unclear as to whether the French truly thought that the province was so autonomous as to be de facto independent and thus that the invasion wouldn't cause war with the Ottomans, or if they simply thought that the strategic advantage of controlling Egypt and possibly disrupting British trade and control in India was worth fighting the Ottomans and alienating a possible ally against Russia?
I have often come across the notion that the invasion of Egypt was justified as aiming to overthrow the Mamluk administration rather than the Ottomans
This is what the French published (in Arabic) as the justification for their arrival when they landed. I have never come across any suggestion that this was anything other a legal fiction for their actual purposes, though other commenters may be more familiar with the objectives of the French than I am. From what I've read they were far more focused on turning Egypt into a colony and using it as a potential launchpad for checking the British in India as you mentioned. Though the men of the army might well have believed that they were spreading liberte, egalite and fraternite for the orientals, it was no more true in Egypt than it was for Napoleon's campaigns in Europe.
whether the French truly thought that the province was so autonomous as to be de facto independent and thus that the invasion wouldn't cause war with the Ottomans
I can't speak to the French, but the Egyptians apparently found the notion to be baffling. The "Mamluks" (and the term itself is imprecise at this point as by this point it included local notables who were not actually Mamluks in the proper sense at all) certainly had an incredible amount of autonomy (they were in the unfortunate habit of murdering the Ottoman governors shortly after arrival) but as soon as Napoleon invaded they sent a letter to the Sultan asking for assistance and rallied the Ottoman Turkish troops in the country alongside their own. The Ottomans, unsurprisingly, ended up sending an expedition south to take back their suzerain.
There's a great first-hand account of this from the Egyptian historian Abd ar-Rahman al-Jabarti, a partial translation of which has been published in English.
Otherwise I would read Juan Cole's Napoleon's Egypt for more.