Description Usage Arguments Value Note Author(s) Examples
Calls all the functions necessary to get the functional modules from the Seurat data and PValues and then graphs in Cytoscape.
1 | getCyGraphs(SData, Ps,NSLB = 100, EWLB = 0.05, cnames = NULL)
|
SData |
A Seurat object containing preprocessed data |
Ps |
Pvalues containing the Pvalues for each gene in the clusters |
NSLB |
Lower bound for Node Score filtering |
EWLB |
Lower Bound For Edge Weight filtering |
cnames |
A list containing names for each of the clusters. Defaults to NULL and uses C1, C2... instaed |
No return value instead creates a filtered and unfiltered network in Cytoscape for each cluster
Requires Cytoscape to be opened and installed. Calls getClusterList, getFM, getEdgeWeightsG, GraphInCytoscape, and CyFilter
Matt Heffernan, University of Illinois at Chicago
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
getCyGraphs(SData=SData, Ps=Ps,NSLB = 100, EWLB = 0.05, cnames = NULL)
## The function is currently defined as
function(SData, Ps,NSLB = 100, EWLB = 0.05, cnames = NULL)
{
countTable <- SData[["RNA"]]@data
CList <- getClusterList(SData, Ps, cnames)
FMList <- list()
i = 0
for(c in CList)
{
pValues <- c$p_val
names(pValues) <- c$gene
FMList[[paste("FM", as.character(i),sep="")]] <- getFM(pValues)
i = i+1
}
networkList <- list()
i = 0
for(f in FMList)
{
networkList[[paste("N", as.character(i),sep="")]] <- getEdgeWeightsG(f,countTable)
i = i+1
}
i = 1
nClusters <- length(CList)
hasnames = TRUE
if(is.null(cnames) || length(cnames) != nClusters)
{
hasnames = FALSE
}
while(i <= nClusters)
{
if(hasnames)
{
GraphInCytoscape(FMList[[i]], name=cnames[i])
CyFilter(FMList[i], name=cnames[i], NSLB = NSLB, EWLB = EWLB)
}
else
{
GraphInCytoscape(FMList[[i]], name=paste("C", as.character(i-1), sep=""))
CyFilter(FM, name=paste("C", as.character(i-1), sep=""), NSLB = NSLB, EWLB = EWLB)
}
i = i+1
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.