Interpret a protein across factorial contrasts
interpret_protein_factorial.RdExtracts per-contrast statistics for a single protein from a DAList-like object fitted with a factorial (e.g., BioID) design, and returns a compact table plus a human-readable summary.
Usage
interpret_protein_factorial(
DA_results,
protein,
protein_col = NULL,
alpha = 0.05,
contrast_map = c(Avg_Treat_Bio_vs_DMSO = "Avg_Treat_Bio_vs_DMSO",
Interaction_CHLA_vs_SKNF1 = "Interaction_CHLA_vs_SKNF1", TreatEffect_CHLA90 =
"TreatEffect_CHLA90", TreatEffect_SKNF1 = "TreatEffect_SKNF1",
CHLA90_Bio_vs_SKNF1_Bio = "CHLA90_Bio_vs_SKNF1_Bio", CHLA90_DMSO_vs_SKNF1_DMSO =
"CHLA90_DMSO_vs_SKNF1_DMSO")
)Arguments
- DA_results
A DAList-like object with
$results(per-contrast result tables) and optionally$annotation.- protein
Character. Protein identifier (e.g., UniProt ID) to look up.
- protein_col
Optional character. Name of an explicit ID column in the per-contrast result tables. If
NULL, matching falls back to row names and/orDA_results$annotation.- alpha
Numeric. FDR threshold used to annotate the
effectcolumn. Default0.05.- contrast_map
Named character vector mapping display labels (names) to keys inside
DA_results$results. Defaults assume contrasts like average treatment effect, interaction, and per-cell effects.
Value
A list with:
tableA
data.framewith columnscontrast,logFC,adj.P.Val,effect,t,B,P.Value.summaryA single character string summarizing the key contrasts.
Details
Row matching is flexible:
If
protein_colnames a column in the per-contrast table, it is used directly.Otherwise, the function attempts to resolve the row using
rownames()orDA_results$annotation(preferringannotation$uniprot_idif available).
The returned table includes an effect label indicating direction
(up/down) and significance ("*" if adj.P.Val < alpha).