Collapse graph using PAGA 1.2 algorithm, Wolf et al 2019, Genome Biology (2019) <https://genomebiology.biomedcentral.com/articles/10.1186/s13059-019-1663-x>
collapseGraphPaga(graph, groups, linearize = TRUE, winsorize = FALSE)
igraph graph object Graph to be collapsed
factor on vertices describing cluster assignment (can specify integer vertex ids, or character vertex names which will be matched)
should normally be always TRUE (default=TRUE)
winsorize final connectivity statistics value (default=FALSE) Note: Original PAGA has it as always TRUE, but in this case there is no way to distinguish level of connectivity for highly connected groups.
collapsed graph