ningshi / ATEN

And/Or Tree Ensemble for inferring accurate Boolean network topology and dynamics
GNU General Public License v2.0
3 stars 0 forks source link

Error in reconstruction of Boolean networks #1

Open julianSchwab opened 3 years ago

julianSchwab commented 3 years ago

There seems to be a problem with the reconstruction of Boolean functions from time-series of data (I suspect, when no adequate function could be found). The error comes up irregularly, but so far I could not reconstruct a complete network without having this error. It also happens for the given example. In the following I post the error message and a screen shot of the session info. the final Boolean function of node 12 is returned [1] "Gene83 || Gene25&Gene78 || !Gene29" [1] 13 only 1 prime implicant was found the final Boolean function of node 13 is returned Error in checkForRemoteErrors(val) : 95 nodes produced errors; first error: argument of length 0 In addition: There were 50 or more warnings (use warnings() to see the first 50)

image

I would be very glad, if there is a solution for this problem, as the package itself is of high potential interest.

ningshi commented 3 years ago

Sorry for such a long silence, I did couples of test cases and have not found the same error so far. I found one potential bug when printing the Boolean functions and it has been fixed.

zigapusnik commented 3 years ago

I'm not sure if my issue is connected to the one listed above, but replaceName returns Nan if condition Importances[1]>sum(Importances)*0.95 is true. The condition is in function findPIs.

  if(Importances[1]>sum(Importances)*0.95){  
      new_nameOfpis<-paste0(PIs[[1]],collapse = "&")      
      new_nameOfpis<-replaceName(new_nameOfpis,nameOfpis,nnodes)      
      rs<-sapply(new_nameOfpis,changeName,nnodes)
      rs<-paste0(rs,collapse = " || ")
      cat("the final Boolean function of node", target, "is returned \n")
      return(rs)
  }

Is replaceName call really needed here, since we take only first PI?

EDIT: sorry, I see now that this line is already commented out.