Repository navigation
LogicComm 0.13.0
Pre-release
Pre-release
LogicComm 0.13.0
Breaking change: removed the transitional neighborhood / spatial-range output
The inert neighborhood/local/distal/range fields that v0.12 kept as
back-compatible stubs are now removed, so the output schema matches what the
cell-type co-expression method actually computes. This resolves a direct
contradiction in which the method documentation disavowed spatial
juxtacrine/paracrine claims while the output still carried n_juxtacrine,
n_paracrine, n_distal, communication_range, and "local vs global graph
support" labels referencing a per-cell graph that no longer exists.
summarize_celltype_communication()lr_tableno longer contains
lcs_neighborhood,lcs_primary_mode,communication_range,
n_active_neighborhood,active_edge_weight_sum,local_active,
distal_candidate,global_candidate_active, orcandidate_active. The
honest cell-type columns remain (lcs,lcs_global,lcs_unweighted,
n_edges/edge_weight_sum= the sender x receiver opportunity universe,
n_active_edges= co-expression support, the per-side active counts/fractions,
andactive).pair_summaryandpathway_summarydropcommunication_support_label,
local_support_fraction_active,n_local_active,n_distal_candidate,
n_global_candidate_active,n_juxtacrine,n_paracrine,n_distal,
dominant_communication_range,sum_active_edge_weight, and
active_edge_weight_sum.summarize_spatial_communication()is removed. After the v0.12 neighborhood
removal it was a placeholder that built coordinates, warned, and returned
ordinary cell-type co-expression -- it never used a spatial graph and produced
no spatially resolved result. The spatial utilitiesbuild_spatial_graph()
(kNN/radius graph construction) andplot_spatial_logic()(per-spot REO
visualization) remain; usesummarize_celltype_communication()/
discover_celltype_communication()for communication scores. A genuine spatial
edge scorer would require physical-distance edges and a spatial permutation
null, and is intentionally out of scope rather than faked by a wrapper.plot_communication_range_summary()is removed; it visualized a signaling
"range" the method no longer resolves.plot_celltype_network()drops its
color_edges_by = "range"mode and distal/global edge styling and now colours
edges by top pathway.plot_lr_bubble_advanced()and
plot_lr_activity_balance()colour by LCS instead of range.summarize_communication_findings()dropsdistal_candidate_pairsand the
graph-support guide rows;write_communication_report()drops the
distal-candidate section and the KNN/neighborhood cautions.logic_grade_evidence()now grades on the evidence the cell-type model
produces -- an active co-expression call, optionally corroborated by attached
orthogonal validation -- rather than the removed local/distal/global graph
distinction (grade A = active + validation, B = active, otherwise
insufficient).diagnose_celltype_communication()no longer reportsn_distal_candidates.
Documentation
- Aligned every prose description of the method with the actual cell-type
co-expression model. The manuscript (inst/manuscript) no longer presents the
removed per-cell KNN/SNN neighborhood scoring as a current feature (abstract,
introduction, methods, and figure captions were corrected, the stale test
count updated, and the PBMC empirical sections flagged for regeneration against
the v0.13 scorer); the README dropped the "KNN/SNN graph: optional but
recommended" claim; and theLogicComm-introoverview no longer describes a
"neighboring receiver cell". DESCRIPTIONno longer advertises "weighted graph scoring" or spatial
communication "modules"; it describes cell-type REO co-expression scoring, the
discovery workflow, and the spatial graph/visualization utilities.
Fixes
- Fixed
logic_summarize_celltypes()emitting a spurious "knn_mat, graph_name,
remove_self_edges are deprecated and ignored" warning on every call. The
wrapper still declared and unconditionally forwarded those (now removed)
neighborhood parameters, and the deprecation shim warns on argument
presence, so even a default call with no neighborhood intent warned. The dead
parameters (knn_mat,graph_name,mode,remove_self_edges) were dropped
from the wrapper; scoring options now flow through..., and an explicitly
supplied legacy argument still warns (correctly) at
summarize_celltype_communication(). - Fixed
score_receiver_response()(and therefore
add_receiver_response_score()), which errored with "subscript out of bounds"
in the standard workflow. It indexedct_comm$cell_labelsby
colnames(reo_mat), so any reo_mat cell absent from the labels (the normal
case oncesummarize_celltype_communication()has filtered cells with
missing/empty labels and the original reo_mat is passed back) producedNA
labels andNAcell names that leaked into the receiver-cell selection. Labels
andreo_matare now aligned to their shared cells first. Regression test added. - Fixed
calc_rank_shift()to rank each gene within the cell's full
transcriptome, as its documentation describes (and ascalc_REO_matrix()
anchors), instead of within the small L-R panel. The matrix was being subset to
the ~120 L-R genes before ranking, so a transcriptome-dominant ligand was
scored as mid-ranked among the panel and the transcriptome-wide rank shift the
method is designed to detect was lost (on a 200-gene example the normalized rank
of a dominant gene differed ~37-fold between the two definitions). The fix ranks
over all expressed genes per cell while storing only the target genes' ranks, so
memory stays bounded. Also correctedmean_expr_*/log2fc_exprto average each
gene over the samples that contain it rather than the full sample count.
Regression test added. - Fixed cell-type role assignment so that Mediator and Influencer can actually
be dominant roles.dominant_role(andsecondary_role/ role separation)
are now derived from the four role scores rescaled to a common [0, 1] scale
across cell types, matchingplot_celltype_role_radar(). Previously the raw
scores were compared directly even though they live on incomparable scales
(Sender/Receiver are summed LCS, mediator betweenness is normalized to [0, 1],
and the PageRank influencer score sums to 1 over cell types, ~1/n each), so
almost every cell type collapsed to Sender or Receiver and a textbook bridge
cell type was mislabelled. The rawsender_role_score,receiver_role_score,
mediator_role_score, andinfluencer_role_scorecolumns are unchanged; only
the derived role labels improve. Regression test added. run_multisample()no longer takes the dead neighborhood parameters
(knn_list,graph_name,remove_self_edges,graph_symmetrize,
edge_weight_mode). They had no effect since the v0.12 neighborhood removal --
IdentifyLogicConsensus()scores from global REO co-expression -- yet were
silently accepted andmatch.arg-validated. They are now accepted via...
and ignored with a deprecation warning, consistent with
IdentifyLogicConsensus()andsummarize_celltype_communication().- Removed a duplicate internal
.resolve_complex_rank(). Two definitions
existed; because R sources package files in the C locale, the canonical
modulators.Rversion (NA for missing subunits, conservative "min"
aggregation) always shadowed thecelltype_communication.Rcopy, which was
therefore dead code whose survival depended on file collation order. Cell-type
rank weighting only reads ranks where the complex logic is active (all subunits
present, hence finite), so results are unchanged. R CMD checkis clean: regenerated staleman/pages (codoc mismatches for
summarize_celltype_communication(),permute_celltype_communication(),
IdentifyLogicConsensus(), andlogic_score_lr()), documented
discover_celltype_communication(), added the missing@paramentries on the
volcano and discovery plots, removed orphan internal Rd files, and registered
thesignificanceggplot aesthetic as a global variable.