Each patient’s niche slopes in long form (R patientSlopes).
The slopes engine estimates every patient’s own niche slopes (a one-step negative binomial estimate from the shared fit); this returns them with their variances, e.g. to plot how a gene’s slope varies between patients and conditions.
Parameters
Name
Type
Description
Default
obj
SpiDEFit or SpiDEResults
A fit (or the results of one) from the slopes engine.
required
gene
str or sequence of str
Keep only these genes.
None
index
str or sequence of str
Keep only these index cell types.
None
niche
str or sequence of str
Keep only these niche cell types.
None
Returns
Name
Type
Description
pandas.DataFrame
gene, index, niche, patient, slope, var_spatial (the within-patient spatial sandwich variance), var_model, ncells plus the patient-level columns recorded by fit_spide; ordered by index, gene, niche, patient.
See Also
patient_intercepts : The patients’ intercepts. fit_spide : Estimates the slopes.