Skip to content

Add HDF5-backed CytoTalk cached runner script#1

Open
pooriass wants to merge 1 commit intomainfrom
codex/add-hdf5-backed-mi-support-for-cytotalk
Open

Add HDF5-backed CytoTalk cached runner script#1
pooriass wants to merge 1 commit intomainfrom
codex/add-hdf5-backed-mi-support-for-cytotalk

Conversation

@pooriass
Copy link
Owner

Summary

  • add an R script that builds a file-backed mutual information cache for CytoTalk runs
  • implement a streamed ARACNE DPI pruning routine to avoid loading full MI matrices into RAM
  • provide a cached runner helper and example invocation for a cell-type pair

Testing

  • not run (not applicable)

https://chatgpt.com/codex/tasks/task_b_68f2390e87dc8320a8e5e3af4d5d8d3b

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +193 to +199
if (length(idx_nz) >= 2L) {
for (a in seq_along(idx_nz)) {
j <- idx_nz[a]
if (!kept[a]) next
mij <- mi_i[j]
for (b in (a + 1L):length(idx_nz)) {
k <- idx_nz[b]

Choose a reason for hiding this comment

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

P0 Badge Iterate neighbor pairs without producing invalid indices

The inner DPI loop iterates for (b in (a + 1L):length(idx_nz)). In R the x:y operator returns a decreasing sequence when x > y, so when a reaches the final neighbor the loop yields indices greater than length(idx_nz) (e.g. 3:23, 2). Those out‑of‑range b values make kept[b] evaluate to NA, which triggers if (!kept[b]) to error with “missing value where TRUE/FALSE needed” as soon as a node has two or more neighbors. As a result, the default streaming ARACNE path fails on practically all nontrivial datasets. The loop needs to guard against a == length(idx_nz) (e.g. iterate only when a < length(idx_nz) or use seq.int(a + 1L, length(idx_nz)) with a check).

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant