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
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.
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))