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)))
})
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