Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

fix error in i_set_edge_attr(x, attr(value, name), color code consist… #686

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alperdomo
Copy link

@alperdomo alperdomo commented Sep 6, 2023

Dear Suoqin Jin,

When using netVisual_diffInteraction(), the step to check if sum(edge.start[,2]==edge.start[,1])!=0 {} and assign values directly to the igraph edges attribute sometimes results in an error that is reiterative when plotting different pathways (See below). To overcome the issue, it would be much more convenient to check and overwrite the edges of the "loop.angle" variable before and pass it to the feature edge.loop.angle=loop.angle from plot().

I also added a step to select and define color.use before remove.isolate to preserve consistency in the cell state color code when plotting multiple pathways within a single dataset, across datasets with the same cell states, but also across other functions from CellChat, for instance, netVisual_chord_gene().

Best regards,

Alvaro

Error in i_set_edge_attr(x, attr(value, "name"), index = value, value = attr(value, : Length of new attribute value must be 1 or 17.
stop("Length of new attribute value must be ", if (length(index) != 1) "1 or ", length(index), ", the number of target edges, not ", length(value))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant