Edit on GitHub

starplast.verify

Check the shipped numbers against the repository they came from.

Task 05 asked whether the expression columns should be rebuilt from GEO's primary deposits instead of from the papers' supplementary tables. The answer taken here is neither, because each source fails in a way the other detects:

supplement-derived   exactly what the authors published, but not re-derivable by a reader and not
                     checkable against anything
GEO-primary          re-downloadable and automatable end to end, but a reprocessed series can
                     change under you silently, and GEO's matrix is not always the one the paper
                     used

So the GEO path is built and used as a CHECK. Where the two agree, the reader can re-derive the number, which is the property a paper needs. Where they disagree, the disagreement is the finding, and it is recorded rather than resolved by quietly preferring one.

That matters more than usual here because this exact series is the project's canonical example of a silent error. GSE108740_FPKM.xlsx reaches 16,520 and is genuine FPKM; the columns derived from it in the node table top out at 3.3 because they were logged upstream and kept the name. Log the first again and one gene stops dominating every distance; fail to log it and one gene dominates every distance. Neither mistake raises anything.

Comparison is on RANKS. The two forms of the same series are on different scales by construction -- that is the whole point -- so comparing values would report a difference that is only a transform. Spearman asks the question that actually matters: do the two sources order the genes the same way?

CORRESPONDENCE = {'GSE108740': {'file': 'transcription/RNAseq/GSE108740/GSE108740_FPKM.xlsx', 'id_column': 'ToxoDB ID', 'pairs': {'expr_tachy': ('Tachyzoites_T2 [FPKM]', 'Tachyzoites_T4 [FPKM]'), 'expr_cyst': ('Tissue_cysts_A [FPKM]', 'Tissue_cysts_B [FPKM]')}}, 'GSE206344': {'file': 'transcription/RNAseq/GSE206344/GSE206344_Normalized_data_ToxoDB_Release68.xlsx', 'sheet': '1', 'id_column': 'ToxoDB ID Release 68', 'pairs': {'expr_sporulated': ('Unsporulated R1', 'Unsporulated R2', 'Sporulating R1', 'Sporulating R2', 'Sporulated R1', 'Sporulated R2'), 'rna206344_Unsporulated_R1': ('Unsporulated R1',), 'rna206344_Sporulating_R1': ('Sporulating R1',), 'rna206344_Sporulated_R2': ('Sporulated R2',)}}}
AGREEMENT = 0.9
def compare_series( series: str, nodes: pandas.DataFrame, resolve=None, log=<built-in function print>) -> pandas.DataFrame:

Compare one GEO series' primary matrix against the shipped columns derived from it.

def verify_all( nodes: pandas.DataFrame, resolve=None, log=<built-in function print>) -> pandas.DataFrame:

Every series with a recorded correspondence. The table is the result, agreement or not.