netZoo / netZooR

netZooR is a network biology package implemented in R.
https://netzoo.github.io/
GNU General Public License v3.0
100 stars 39 forks source link

DRAGON "ggm" result diagonal elements not equal zero #305

Closed cchen22 closed 9 months ago

cchen22 commented 9 months ago

@katehoffshutta

get_partial_correlation_from_precision = function(Theta,selfEdges=FALSE)
{
  # by default, does not return self edges (diagonal is set to zero)
  ggm = -cov2cor(Theta)
  if(!selfEdges)
    ggm[diag(ggm)] = 0
  return(ggm)
}

ggm[diag(ggm)] = 0 needs to be changed to diag(ggm)=0

Thanks, Chen

marouenbg commented 9 months ago

@cchen22 , I just merged kate's PR, feel free to re-open the issue if this doesn't solve the issue.