If you were simply doing a single fixed-effects 2 x 2 factorial ANOVA with unequal numbers of cases among the 4 cells, the formula for partitioning the sums of squares would be fairly simple.*
But you are not doing a single fixed-effects 2 x 2 factorial ANOVA with unequal numbers of cases among the 4 cells. You are doing thousands of such comparisons based on data that themselves hide a good deal of technical and statistical pre-processing. (Your data are presently "relative abundance": relative to what? To a single one of your no-treatment/WT samples? If so, that puts a lot of importance on one single sample. How were differences in mass-tag purity handled? How about differences in peptide-tagging efficiency among samples?)
Proceeding as you propose would be substantially suboptimal.
The tandem-mass-tagged (TMT) proteomics data represent thousands of results (on individual peptides) analyzed in parallel on only 10 samples. Furthermore, you presumably don't care so much about about the peptides detected by the Q Exactive Plus mass spectrometer as you care about the full-length proteins from which the peptides were derived. You may care even more about the biologic pathways in which these proteins participate, to see for example how KO affects the response to treatment at a systems-biology scale.
These are the types of problems that were faced by those performing microarray analysis of RNA expression, now dating back 20 or more years. A large body of work over that time has developed ways to analyze such data efficiently and with a view toward their biological basis, for example in the Bioconductor project. This work now includes workflows for proteomics, which can process the data into forms that nicely fit into the biologically oriented analyses originally developed for microarrays.
Consider the simple issue of estimating within-cell error. Rather than doing this one cell at a time so that the estimates vary wildly from cell to cell, ANOVA pools the within-cell errors among all 4 cells of your design to get a more efficient estimate. The
limma package in Bioconductor goes a step further, taking advantage of the data structure (thousands of types of observations, a few samples) to compute moderated standard error estimates based on the entire data set, then using these moderated errors to provide rankings of differential expression for comparisons of interest involving WT/KO and treatment. It includes appropriate statistical correction for the thousands of individual peptides or proteins you would examine. Bioconductor and other bioinformatic systems are also designed to help put together the data on individual proteins into a biological context based on Gene Ontology or biochemical pathway analysis.
So yes, you could write your own code to do a 2-way factorial ANOVA with unequal numbers of cases among the cells. But do you also want to write the code to map peptides to proteins, get moderated standard error estimates within cells, do corrections for multiple comparisons, do the rank-ordering of expression, and map the proteins to pathways? If not, you will be better off learning (or working with someone who already knows) a well vetted and established system for analysis of such data. And you might be better off going back to a level of data processing earlier than the relative expression data, which depend heavily on the question of "relative to what?"
*As the unequal numbers of cases are not related to characteristics of the underlying populations, you could do an unweighted-means ANOVA analysis. Although in general this analysis is only approximate, in the case of factorial designs with 2 levels for each factor (as in your case), Speed and Monlezun (American Statistician 33: 15-18, 1979) showed that unweighted-means provides exact F-tests.
You calculate the within-cell mean square from the deviations of individual observations from their corresponding cell means (in your case with 10-4=6 degrees of freedom). For sums of squares for KO, treatment, and their interaction, you start with the cell means in ANOVA as if they were individual observations, then multiply each sum of squares by the harmonic mean of the numbers of cases per cell (12/5 in your case). From there, standard hypothesis tests and associated p-values apply. I used my 1971 copy of Winer's "Statistical Principles in Experimental Design" as a reference, but any reference on unweighted-means should do.
I'm not sure that this gets around issues of Type I/II/III sums of squares in terms of interpreting the partitioned sums of squares if you were strictly doing a classic ANOVA. You presumably, however, are more interested in simple main effects instead (effect of treatment within each of KO and WT, effect of KO in absence of treatment), which is effectively in this case a set of t-tests that use the pooled within-cell error estimate along with the actual number of observations in the cells being compared.