Closed jordanwhitlock closed 2 years ago
Hi @jordanwhitlock 👋
Can you share your data + code?
Hi @marouenbg! I really appreciate your quick response.
I think I just fixed it by specifying the parameters instead of just listing the inputs in the same order as the vignettes. Previously I was running panda(motif, expression, ppi_input, progress = TRUE, mode = "union") Running the same line of code except specifying each parameter panda(motif = motif, expr = expression, ppi = ppi_input, progress = TRUE, mode = "union") seems to have surpassed the error as my progress output has gotten past "Initializing and validating" to "Using tanimoto similarity" showing that the network is being constructed.
Awesome! Yes, it is a good practice to specify the parameters by name-key because the order can change through versions, and also to specify other parameters even those that we don't use because their default value can change.
@jordanwhitlock by the way, if you want ti get some feedback on your work, you're welcome to present in our lab meeting, here is my email address benguebila@hsph.harvard.edu
Thank you!
Hi there!
I am running pandaR through the netZooR library on some expression data I have generated. I used the prior network for motifs to construct my TF_Motif input data and stringDB for PPI inputs. When running panda on the three inputs I receive the following error:
[1] "Initializing and validating" Error in tfCoopNetwork[Idx] <- ppi[, 3] : NAs are not allowed in subscripted assignments
I have already run the ToyData using panda and it does not reproduce this error. Upon stepping through the pandaR source code with my inputs (https://rdrr.io/bioc/pandaR/src/R/algorithm_functions.R) it appears that during the #PPI Matrix section (shown below) creation of Idx2 using the match function results in an introduction of an NA at row 1001 in my data
PPI matrix
tfCoopNetwork <- matrix(0,num.TFs,num.TFs) #makes a matrix that has as many rows and columns colnames(tfCoopNetwork)=tf.names rownames(tfCoopNetwork)=tf.names Idx1 <- match(ppi[,1], tf.names); Idx2 <- match(ppi[,2], tf.names); #HAS AN NA IN Idx2 AT POSITION 1001 Idx <- (Idx2-1)num.TFs+Idx1; tfCoopNetwork[Idx] <- ppi[,3]; Idx <- (Idx1-1)num.TFs+Idx2; tfCoopNetwork[Idx] <- ppi[,3];
removing row 1001 containing the NA and re-stepping the above #PPI matrix code portion avoids this error. However, if I take the same ppi input with row 1001 removed and attempt running panda using the function on my three inputs in default union mode, the error reproduces itself.
Any help would be greatly appreciated!