Skip to content

Conversation

@quinn-mccall
Copy link
Contributor

No description provided.

@quinn-mccall quinn-mccall requested a review from aarmey October 21, 2025 18:45
Copy link
Member

@aarmey aarmey left a comment

Choose a reason for hiding this comment

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

One comment, plus remove the built figure files (.png's), and check the build errors.

Copy link
Member

@aarmey aarmey left a comment

Choose a reason for hiding this comment

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

I'd like to better understand what is necessary to get the matching correlation values. The current none import code is strange. For instance, people always log-transform this type of data.

# Term 1: y * log(y / mu) = xlogy(y, y) - xlogy(y, mu)
# xlogy handles y=0 case correctly returning 0.
term1 = xlogy(y_ij, y_ij) - xlogy(y_ij, mu_ij)

Copy link
Member

Choose a reason for hiding this comment

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

I simplified the import code to make it easier to fix issues.

X = X[X.obs["SW"].isin(good_SW)]

# Convert matrix to dense for correlation computation
mat = X.X.toarray()
Copy link
Member

Choose a reason for hiding this comment

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

Now converted to dense on import, so this can go.


results = []

for sw, cells in df.groupby("SW"):
Copy link
Member

Choose a reason for hiding this comment

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

Please move the calculation of the results to a separate function that only takes in the data it needs for the work. Please add comments to the loops and key operations explaining what is being done.

Copy link
Member

@aarmey aarmey left a comment

Choose a reason for hiding this comment

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

Check the testing (lining) errors.

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