Pando
Pando copied to clipboard
Update grn.R
The NetworkTFs() function does not return a data frame or matrix with transcription factor names as column names. As a result, when the program tries to find transcription factors to use - tf_use <- colnames(motif2tf) - R returns an error of incorrect dimensions shortly after saying it's fitting a model. This is during the early part of the infer_grn step.
Instead, the NetworkTFs() function returns a named numeric, with names being the actual transcription factors. Therefore, my proposed edit is to change the line "tf_use <- colnames(motif2tf)" to "tf_use <- names(motif2tf) %>% na.omit()" and follow it with "motif2tf <- motif2tf[tf_use, drop = FALSE]."
The function NetworkTFs()
should return a sparse matrix with TFs a colnames, if this is not the case there is a chance something went wrong earlier in the workflow. What did you pass as motif_tfs
to find_motifs()
?