gagneurlab / OUTRIDER

OUTRIDER: OUTlier in RNA-seq fInDER is an R-based framework to find aberrantly expressed genes in RNA-seq data
MIT License
49 stars 11 forks source link

BiocParallel errors: first error: L-BFGS-B needs finite values of 'fn' #25

Closed yhoogstrate closed 2 years ago

yhoogstrate commented 4 years ago

Dear OUTRIDER authors,

I am pleased with the software package you made publicly available and absolutely like this way of looking into RNA-Seq data. I am working on a large dataset (n=240 samples), targeted panel RNA-seq (TruSight Tumor 170 Pan-Cancer panel), therefore sequenced ultra-deep. This dataset thus only targets 170 oncogenes, often dysregulated by amplifications and delations. The resulting data matrix is 240x170 (sampls x genes), meaning that the number of genes is smaller than the number of samples.

When I used the entire matrix with OUTRIDER I get the following error:

Error: BiocParallel errors
  element index: 27
  first error: L-BFGS-B needs finite values of 'fn'

Which disapears when I reduce the number of samples to <= 209 or reduce the number of genes (see table below). Could you look into this issue and try to resolve it? If I can be of any help, for instance by providing test data, feel free to ask(!)

Kind regards,

Youri

s x g     |  error
----------+--------
171 170     no
206 170     no
208 170     no
209 160     no
209 170     yes
211 170     yes
215 170     yes
223 170     yes
240 170     yes
loipf commented 4 years ago

Dear Youri,

great to hear you use the package! sorry, it took some time to respond.

The smaller sample than gene size is a nice guess but should have no impact since the mathematical operations behind it do not really care. We are rather not really sure, how this ultra-deep sequencing could influence the data to cause inf values.

However, the fact that you reduce the number of samples and it works leads to a first guess of having some kind of corrupt sample in there. Can you please check the size factors of your samples by running:

ods <- OutriderDataSet(countData = counts_input)
ods <- OUTRIDER::estimateSizeFactors(ods)
sizeFactors(ods)

in RNA-seq they all should have values around 0.7-1.2

Thank you and best wishes, Stefan

bw2 commented 4 years ago

I also ran into this issue. Removing samples with size factor < 0.3 solved it. Looking at RNAseQC/MultiQC metrics, these samples had obvious issues like only 70-80% aligned reads, and relative few genes detected (fewer than 15k genes having 5 or more reads).