Edit on GitHub

starplast.interaction_studies

Parsing published proximity-labeling and pulldown supplements into gene lists.

97 studies with a tagged Toxoplasma protein were catalogued from the abstract corpus and their supplementary files downloaded. This module turns the machine-readable ones into a table of (study, gene) membership plus a guess at which protein was tagged.

What it can and cannot do, measured rather than assumed:

  • 38 of 97 studies yield identifiers. 32 carry accessions in a spreadsheet; reading the PDFs and DOCX adds six more, and recovers 1,124 accessions plus 465 symbols from documents that a spreadsheet parser saw as empty. The remaining 59 are recorded with parsed = False rather than silently omitted — 40 of them because Europe PMC held no supplementary files at all, not because parsing failed.
  • Some papers name proteins only by symbol. One yielded 68 symbols and zero accessions. Symbol matching carries the usual guard: a digit-free symbol must appear in upper case, since HOOK, CLAMP, CLIP, SPARK and REMIND are all real symbols and all real English words.
  • TGGT1_ accessions are more common than TGME49_ here (40 files against 39), so everything goes through the identity layer. Parsing on TGME49_ alone would lose more than half of what is available.
  • A supplement is not a hit list. These files mix hits with controls, background, primers and full-proteome backgrounds, and the sheet that means "enriched" is named differently in every paper. This module therefore reports membership — this gene appears in this study's supplement — and does not claim enrichment. Turning membership into interaction edges needs per-paper curation, and pretending otherwise would manufacture thousands of false interactions.

The bait guess comes from the paper title matched against ToxoDB symbols, which works for the many papers titled after the protein they tagged ("...IMC29...", "...PDI8...") and fails quietly otherwise.

ACC = re.compile('TG[A-Z0-9]{2,6}_\\d{5,6}', re.IGNORECASE)
MAX_SHEETS = 8
MAX_ROWS = 20000
def parse_studies( root: str, resolve=None, log=<built-in function print>) -> pandas.DataFrame:

One row per (study, gene) found in a study's supplementary tables.

def guess_baits( studies: pandas.DataFrame, symbol_to_gene: dict, log=<built-in function print>) -> pandas.DataFrame:

Guess the tagged protein from the paper title, via ToxoDB symbols.

Titles like "IMC29 Plays an Important Role..." or "...disulfide isomerase PDI8..." name the bait directly. This is a heuristic and is labeled as one: bait_confidence is title when a symbol was found and empty otherwise, so nothing downstream can treat a guess as an annotation.

def study_gene_counts(members: pandas.DataFrame, nodes_index) -> pandas.Series:

How many interaction studies name each gene -- a per-gene node column.

def host_interactions( base: str, resolve=None, log=<built-in function print>) -> pandas.DataFrame:

Curated Toxoplasma-protein to host-protein interactions.

Deliberately the curated table rather than anything mined from the 97 supplements. Those publish complete quantification tables -- median 754 genes, largest 7,866 -- so extracting host targets from them automatically would invent thousands of interactions. 31 curated pairs with a stated mode, confidence and reference are worth more than that, and can be defended one by one.

The parasite side is given by symbol (ROP16, GRA24), so it goes through the identity layer.