Conversation
Contributor
|
how come first PR of multiWGCNA we reverted was about 1.2k lines added and now 117? |
Member
Author
I am trying to revert to timepoint. Something got lost in wgcna-upd2, perhaps at reverting or at merging. |
Contributor
|
ok got it, let us know when its ready to be tested again |
Member
Author
|
wait... in wgcna-upd2 17 files changed (many man though). Now I have only 2 files, so I need to check and bring the changes into upd3 correctly. |
Member
Author
|
OK I updated upd3 with needed changes from up2. I left out some unrelated changes and will PR seperately from: ai-llm.R (adding tidyprompt), and pgx-plotting.R (some layout changes). |
Closed
- add guard after lasagna.prune_graph that detects 0-vertex result and renders an informative blank plot instead of crashing with "need finite 'xlim' values" - message includes context-aware hints based on the active filters (edge threshold, prune, edge.sign) so the user knows what to adjust - triggered when SP weighting + consensus + high edge threshold collectively zero out all edge weights, leaving no nodes to plot
- cor() returns NaN for constant trait columns, which occurs when
splitting by Condition (each group has only one condition value,
giving zero variance for that trait)
- NaN propagated into the second cor(kme) call used for hclust,
crashing with 'NaN dissimilarity value'
- fix 1: strip all-NaN columns from kme after the first cor(X,Y)
- fix 2: guard the hclust cor() with !is.finite() to catch any
remaining NaN/Inf regardless of origin
- affected plot: consensus WGCNA Dendrograms with Condition split
- lapply over stats[p2] used x[, trait] which crashes when foldChange lacks the selected trait column — happens when splitting by Condition because constant-within-group traits are excluded from foldChange but still present in traitSignificance - replace bare column indexing with safe_col() helper that pads missing columns with NA instead of erroring out - fixes subscript out of bounds in consensus WGCNA Features Table when grouping by Condition
- wgcna.runPreservationWGCNA was calling wgcna.runConsensusWGCNA without summary=FALSE, triggering the AI annotation block added in 6b919d5 which references DEFAULT_LLM before it is defined, crashing with 'object DEFAULT_LLM not found' - preservation WGCNA does not need AI module summaries, so passing summary=FALSE and ai_model=NULL is correct
- safe_col returned a matrix when length(tr)==1, causing do.call(cbind) to name all columns after the trait instead of the p2 stat names (traitSignificance, TSPvalue, foldChange, foldChangePvalue); fix by returning a named vector so list element names are used as col names - wgcna.getConsensusGeneStats now returns NULL early if any layer's wgcna.getGeneStats returns NULL (trait absent from that layer's stats)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates needed for OPG PR bigomics/omicsplayground#1715 (Improvements multiwgcna)
Note: this was previously wgcna-upd2 but something got corrupted in merging. This is a new branch tag.