Coolgenome / iTALK

57 stars 22 forks source link

Error in `E<-`(`*tmp*`, value = `*vtmp*`) : invalid indexing #10

Open PaulaVac opened 4 years ago

PaulaVac commented 4 years ago

Hi! I am trying to use the iTALK package, specifically the code for the example with my data to see how it works. Could someone help here?:

find the ligand-receptor pairs from highly expressed genes

comm_list <- c("growth factor","other","cytokine","checkpoint") cell_col<-structure(c("#4a84ad","#4a1dc6","#e874bf","#b79eed", "#ff636b", "#52c63b"),names=unique(data$cell_type))

par(mfrow=c(1,2)) res<-NULL for(comm_type in comm_list){ res_cat<-FindLR(highly_exprs_genes,datatype='mean count',comm_type="cytokine") res_cat<-res_cat[order(res_cat$cell_from_mean_exprsres_cat$cell_to_mean_exprs,decreasing=T),]} res_cat[order(res_cat$cell_from_mean_exprsres_cat$cell_to_mean_exprs,decreasing=T),]

plot by ligand category

overall network plot

NetView(res_cat,col=cell_col,vertex.label.cex=1,arrow.width=1,edge.max.width=5)

In the last command (NetView) I get the error: Error in E<-(*tmp*, value = *vtmp*) : invalid indexing

I think the problem must be in the created data file "res_cat" because the description says that it has 0 observations.

ywang65 commented 4 years ago

Yes. Examples here are just showing how to use these functions.