Error in corrMat[tf, targets] : subscript out of bounds #251
Unanswered
KabitaBaral1
asked this question in
[R]
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I ran into the error:
Error in corrMat[tf, targets] : subscript out of bounds
right in this step and it still persists even when I changed code from :
tfModules_withCorr_byTF <- lapply(tfModules_byTF[tfs], function(tfGeneSets)
{
tf <- as.character(unique(tfGeneSets$TF))
targets <- as.character(tfGeneSets$Target)
cbind(tfGeneSets, corr=c(as.numeric(corrMat[tf,targets] > 0.03) - as.numeric(corrMat[tf,targets] < -0.03)))
})
to:
tfModules_withCorr_byTF <- lapply(tfModules_byTF[tfs], function(tfGeneSets)
{
tf <- unique(tfGeneSets$TF)
targets <- tfGeneSets$Target
targets <- as.character(tfGeneSets$Target)
cbind(tfGeneSets, corr=c(as.numeric(corrMat[tf,targets] > 0.03) - as.numeric(corrMat[tf,targets] < -0.03)))
})
as suggested. Any idea on what might be the reason behind it?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions