HenrikBengtsson / illuminaio

🔬 R package: This is the Bioconductor devel version of the illuminaio package.
http://bioconductor.org/packages/devel/bioc/html/illuminaio.html
6 stars 2 forks source link

fix negative nRunInfoBlocks error #15

Open zwdzwd opened 4 years ago

zwdzwd commented 4 years ago

Some IDAT gives negative number of blocks when gzipped (example: GSM4256802).

This fixes the following error: matrix(naValue, nrow = nRunInfoBlocks, ncol = 5), invalid nrow value < 0

kasperdanielhansen commented 4 years ago

Thanks. But why is it less than zero? The code assumes that a single integer gives you the variable, but why is that integer negative? Is it signed vs. unsigned? Is it shorter than we expect? Most importantly, is the rest of the file intact? Do you have an example IDAT?

Best, Kasper

On Sun, Jul 12, 2020 at 9:01 PM Wanding Zhou - Bioinformatics < notifications@github.com> wrote:

Some IDAT gives negative number of blocks when gzipped (example: GSM4256802).

This fixes the following error: matrix(naValue, nrow = nRunInfoBlocks, ncol = 5), invalid nrow value < 0

You can view, comment on, or merge this pull request online at:

https://github.com/HenrikBengtsson/illuminaio/pull/15 Commit Summary

  • Some IDAT gives negative number of blocks when gzipped (example: GSM4256802).

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HenrikBengtsson/illuminaio/pull/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABF2DH7XT6DIOGDCQ3ZZHNDR3JMGRANCNFSM4OYCCC5Q .

-- Best, Kasper

zwdzwd commented 4 years ago

Here are the two example IDATs. I think if you gunzip them, they are fine to read. I suppose it is not an IDAT issue but a gzip issue when the reading gets to the end? I tried unsigned but that didn't work for me either.

GSM4256802_202835220031_R06C01_Grn.idat.gz GSM4256802_202835220031_R06C01_Red.idat.gz

HenrikBengtsson commented 4 years ago

I suspect there's something wonky about those .gz files. Regardless, the ultimate validate test should be that one gets identical results regardless of whether you load `.idator*.idat.gz` - not that it throws an error or not.

zwdzwd commented 4 years ago

I agree. Most part of the data is the same. Just the run info becomes missing. Maybe it's better to throw a warning? In any case, looks like it only occurs to marginal cases...