aertslab / SCENIC

SCENIC is an R package to infer Gene Regulatory Networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
396 stars 94 forks source link

Error in corrMat[tf, targets] : subscript out of bounds #130

Closed KabitaBaral1 closed 2 years ago

KabitaBaral1 commented 4 years ago

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