integrativenetworkbiology / DeClust

A reference-free deconvolution method to infer cancer cell-intrinsic subtypes and tumor-type-specific stromal profiles
1 stars 2 forks source link

always got an Error when running DeClust #1

Open hfl112 opened 3 years ago

hfl112 commented 3 years ago

Hi developers, I encountered the same error when using the TCGA data to test. I have use nneg to remove the negative values, and also use 0 replace the NA But I always have this error:

> deClustFromMarker(k_ng[,1:10],2)
[1] 0.1
[1] 0.1
[1] 0.2
[1] 0.1
[1] 0.3
[1] 0.1
[1] 0.4
[1] 0.1
[1] 0.5
[1] 0.1
[1] 0.6
[1] 0.1
[1] 0.7
[1] 0.1
[1] 0.8
[1] 0.1
[1] 0.9
[1] 0.1
[1] 0.2
[1] 0.3
[1] 0.4
[1] 0.5
[1] 0.6
[1] 0.7
[1] 0.8
[1] 0.9
[1] 1
[1] 1
[1] 0.1
[1] 0.2
[1] 0.3
[1] 0.4
[1] 0.5
[1] 0.6
[1] 0.7
[1] 0.8
[1] 0.9
[1] 1
Error in { :
  task 1 failed - "NA/NaN/Inf in foreign function call (arg 1)"

How to deal with the input expression data? should I use other format like raw reads count? (Here, I use the RNASEQV2 data of TCGA samples)

Thanks, Funan

youngjaewoo commented 3 years ago

The input data should be something like TPM without negative value, and try removing genes with SD of zero.

hfl112 commented 3 years ago

The input data should be something like TPM without negative value, and try removing genes with SD of zero.

I tried, but still got this error:

library(DeClust)
Ibrary(NMF)
library(genefilter) 

test = read.table("UCS.raw.exp.txt", header=T, row.names=1, sep ='\t')

#filter SD
test_sd<-rowSds(test)
test = test[names(test_sd[test_sd>1.5]), ]

#input should be non-log-normalized & non-negative
k_ng = as.matrix(test)
k_ng = nneg(k_ng)

r<-deClustFromMarker(k_ng,2)

> r<-deClustFromMarker(k_ng,2)
[1] 0.1
[1] 0.1
[1] 0.2
[1] 0.1
[1] 0.3
[1] 0.1
[1] 0.4
[1] 0.1
[1] 0.5
[1] 0.1
[1] 0.6
[1] 0.1
[1] 0.7
[1] 0.1
[1] 0.8
[1] 0.1
[1] 0.9
[1] 0.1
[1] 1
[1] 0.1
Error in { :
  task 1 failed - "NA/NaN/Inf in foreign function call (arg 1)"
In addition: Warning message:
executing %dopar% sequentially: no parallel backend registered