Skip to content

Deconv updates - #32

Closed
nbedanova wants to merge 5 commits into
mainfrom
deconv-updates
Closed

Deconv updates#32
nbedanova wants to merge 5 commits into
mainfrom
deconv-updates

Conversation

@nbedanova

Copy link
Copy Markdown
Contributor

No description provided.

@nbedanova
nbedanova requested a balanced review from Copilot August 27, 2026 22:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

A_centered = A - cytokine_medians
X.uns["Pf2_A"] = A_centered

W, H, _ = deconvolution_cytokine_admm(A_centered, alpha_h=0.05, alpha_w=0.05, rho=2)
Comment on lines +46 to +64
def filter_components_by_cytokine_quantile(
threshold: float,
csv_path: str = "/home/nicoleb/Pf2-scRNAseq-1/pf2rnaseq/Data/donor_vs_cytokine_variability_sd.csv",
) -> np.ndarray:
"""Return 0-indexed components whose cytokine_quantile is at/above a threshold.

Parameters
----------
threshold : float
Minimum cytokine_quantile value a component must have to be kept.
csv_path : str
Path to the CSV with columns component, donor_sd, cytokine_sd,
donor_quantile, cytokine_quantile.

Returns
-------
np.ndarray
0-indexed component numbers with cytokine_quantile >= threshold.
"""
Comment on lines +614 to +616
print(f" Min value: {W.min():.4f}")
print(f" Max value: {W.max():.4f}")
print(f" Diagonal: all 1.0 (constrained)")
cond="cytokine",
log_scale=False,
)
ax[1].set_title("Original Effects (A)", fontsize=12, fontweight="bold")
Comment on lines +622 to +624
print(f" Min value: {H.min():.4f}")
print(f" Max value: {H.max():.4f}")
print(f" Negative values: {np.sum(H < 0)} ({100 * np.sum(H < 0) / H.size:.1f}%)")
@nbedanova nbedanova closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants