R/getShortestPaths.R

Defines functions getShortestPaths

Documented in getShortestPaths

getShortestPaths <-
function (Network,SelectedGenes=0)
{
	optionValue<-getOption("stringsAsFactors")
	options(stringsAsFactors=F)
	if (SelectedGenes==0)
	{
		SelectedGenes<-rownames(Network$DEGenes)
	}
	CombinedScores<-Network$Edges[which(Network$Edges$Interaction=="combined_score"),c("node1","node2","Score")]
	BetweenNodesDistances=convertToDistGraph(CombinedScores) 
	ShortPathsNetwork=findShortestPathways(BetweenNodesDistances,SelectedGenes) 
	FinalNetwork<-ShortPathSTRINGNet(ShortPathsNetwork,Network$DEGenes,Network$Annotations)
	options(stringsAsFactors=optionValue)
	return(FinalNetwork)
}

Try the stringgaussnet package in your browser

Any scripts or data that you put into this service are public.

stringgaussnet documentation built on May 29, 2017, 10:50 a.m.