ComBat-seq icon indicating copy to clipboard operation
ComBat-seq copied to clipboard

Error in .compressOffsets(y, lib.size = lib.size, offset = offset) : offsets must be finite values

Open maximinio opened this issue 3 years ago • 1 comments

Hi there,

I previously used the sva::ComBat function and it worked perfectly:

adjusted <- sva::ComBat(dat=raw_counts,
                        batch=metadata$source,
                        mod=cbind(metadata$tissue_coded))

But since I would love to use DESeq2 for downstream analysis I was now trying the new function:

adjusted <- sva::ComBat_seq(counts=raw_counts,
                            group=NULL,
                            batch=metadata$source)

Unfortunatly, as you can see, I got this error:

Error in .compressOffsets(y, lib.size = lib.size, offset = offset) : 
  offsets must be finite values
In addition: Warning message:
In DGEList(counts = counts) : library size of zero detected

What am I doing wrong? Thank you in advance! Luca

maximinio avatar Jan 13 '21 11:01 maximinio

Hi Luca, thank you for providing such detailed error information. It looks like there are samples with only 0 in your data (library size of zero means all gene counts in some sample add up to 0). Would you check if that is the case? Thanks. -Yuqing

zhangyuqing avatar Jan 14 '21 22:01 zhangyuqing