Closed Camillula closed 2 years ago
Hey, thanks !
Looking at your df, FCIndex should be 3 and pValIndex should be 6 (instead of 2 and 5). These represent the column numbers
Cheers,
Aurelien
Hi Aurelien! Thanks a lot, I changed the order as you suggest (see screenshot) but the issue persists, not the error is
Error in $<-.data.frame
(*tmp*
, "couleur", value = "0") :
replacement has 1 row, data has 0
In addition: Warning messages:
1: In max(abs(df[, FCIndex])) :
no non-missing arguments to max; returning -Inf
2: In max(abs(df[, FCIndex])) :
no non-missing arguments to max; returning -Inf
3: In max(abs(-log(df[, pValIndex]))) :
Error in $<-.data.frame
(*tmp*
, "couleur", value = "0") :
replacement has 1 row, data has 0
Can you subset your dataframe before passing it to the function ? To make sure that the dataframe that is passed to the function isn't empty.
Dear Aurelien, Thanks this solved my issue, indeed the dataframe passed to the function was empty, as it did not recognize the rownames of the regulon targets. For users who might have the same problem, I solved renaming rows and the one column of my target
Probably there is an even easier way to do it, but still now I have my nice graphs. Thanks thanks thanks! 👯
targets_STAT1 <- as.data.frame(targets_STAT1) rownames(targets_STAT1)<- targets_STAT1[,"targets_STAT1"] colnames(targets_STAT1)<- c("ID") subset <- sDEG[sDEG$ID %in% targets_STAT1$ID,]
volcano_nice(as.data.frame(sDEG[sDEG$ID %in% targets_STAT1$ID,]), FCIndex = 2, pValIndex = 5, IDIndex = 1,nlabels = 20, label = TRUE, straight = FALSE)
Hi! First of all, thanks for the great tutorial. I managed to run the script and get until the bar plot with top 25 normalized enrichment scores (NES) for TFs. I also managed to load all the supporting functions. However, when I run the volcano nice in this way
I get the following error
Error in if (xpos(x) < -log(y)) { : missing value where TRUE/FALSE needed In addition: Warning messages: 1: In log(df[, pValIndex]) : NaNs produced 2: In log(y) : Error in if (xpos(x) < -log(y)) { : missing value where TRUE/FALSE needed
Would you be able to tell me what's wrong?
I will add a screenshot of what my dataframes look like