Some considerations here:
How has the data been collected?
If it's self-reporting, it's quite likely that most trans people will simply have replied with "male", "female", or other equivalent terms that give no indication of trans status. If it's reported by others, it's quite likely that the reporter will often not know that the person is trans.
If most of the trans men in your data are indistinguishable from cis men, and similarly for women, then - ignoring non-binary cases for the moment - your categorisation options are:
- "Cis men and trans men" vs. "cis women and trans women" (if you map "trans man" to "man", etc.)
- "Cis men, most trans men, and some trans women" vs. "cis women, most trans women, and some trans men" (if you map "trans man" to "women", etc.)
The first of those two seems clearly preferable, IMHO. It might not be the best delineation for every application, but at least it's fairly well defined. The alternative is just vague.
Are your decisions actually going to matter to the results?
It's quite likely that there won't be enough (identifiable) trans and non-binary people for you to get any useful data about "trans men", "trans women", or "non-binary people" as categories. It's also quite likely that these groups will be rare enough that they don't make a big difference to the overall stats for larger categories like "men" and "women", however defined.
If you weren't talking about open-source data, I'd also raise privacy issues with reporting for small sub-populations, but presumably that has already been considered.
What is the point of the analysis?
If you get past the above considerations... how does gender and trans status relate to whatever it is you're trying to understand? This is likely to be relevant to your decisions.
Should I just drop them from the dataset entirely, because they might distort it?
Cis people are likely to have much more influence on your results than trans people. Should we therefore drop cis people from the analysis for fear of distortion?
Trans people are people. If your aim is to produce statistics about "people" overall, then trans people should be included in those statistics. If some trans people are unusual (in whatever way) and this affects the statistics, then the statistics are simply reflecting the fact that some people are unusual.