Coolgenome / iTALK

55 stars 20 forks source link

Error: `order` should contain names of all sectors. when running LRPlot with DEG datatype #17

Open whitneyt1 opened 4 years ago

whitneyt1 commented 4 years ago

Hello,

I am trying to run differential expression between Tumor and Tcells LR pairs but am getting Error: order should contain names of all sectors

Screen Shot 2020-05-06 at 5 36 46 PM

I have converted my matrix numeric values to integers (although I received the error before converting as well)

The DEG commands I am running are

deg_Tumor<-DEG(data %>% filter(cell_type=='Tumor'),method='monocle',contrast=c("grouped_pd","grouped_pr")) deg_Tcells<-DEG(data %>% filter(cell_type=='T-cells'),method='monocle',contrast=c("grouped_pd","grouped_pr"))

When I run the for loop line by line I get the above error when running LRPlot(res_cat_1[1:20,],datatype='DEG',cell_col=cell_col,link.arr.lwd=res_cat$cell_from_logFC[1:20],link.arr.width=res_cat$cell_to_logFC[1:20])

the first comm_type is the "growth factor" and the resulting res_cat matrix has these rows:

Screen Shot 2020-05-06 at 5 36 46 PM

Additionally, my DEG objects contain NaNs and -Inf

Screen Shot 2020-05-06 at 5 43 22 PM

How does iTALK create these NaNs and NAs? How does iTALK consider the -Infs when running differential expression? Do I need to convert these to a minimum integer value?

grimwoo commented 3 years ago

I have similar error after I delete some rows from the matrix:

Error: `order` should contain names of all sectors.
In addition: Warning message:
Since you have set `order`, you should better set `grid.col` as a named vector where
sector names are the vector names (should contain all sectors). 
gevin-MB commented 3 years ago

try "highly_exprs_genes$cell_type<-as.character(highly_exprs_genes$cell_type) "