seandavi / GEOquery

The bridge between the NCBI Gene Expression Omnibus and Bioconductor
http://seandavi.github.io/GEOquery/
Other
88 stars 36 forks source link

new line in matrix file meta-data breaks functions #66

Closed kalugny closed 6 years ago

kalugny commented 6 years ago

While running

GEOquery::getGEO('GSE781')

I get

Found 2 file(s)
GSE781-GPL96_series_matrix.txt.gz
Using locally cached version: /tmp/RtmpBt71Hk/GSE781-GPL96_series_matrix.txt.gz
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 1 did not have 18 elements
Traceback:

1. GEOquery::getGEO("GSE781")
2. getAndParseGSEMatrices(GEO, destdir, AnnotGPL = AnnotGPL, getGPL = getGPL, 
 .     parseCharacteristics = parseCharacteristics)
3. parseGSEMatrix(destfile, destdir = destdir, AnnotGPL = AnnotGPL, 
 .     getGPL = getGPL)
4. read.table(fname, sep = "\t", header = FALSE, nrows = samples_header_row_count, 
 .     skip = series_header_row_count)
5. scan(file = file, what = what, sep = sep, quote = quote, dec = dec, 
 .     nmax = nrows, skip = 0, na.strings = na.strings, quiet = TRUE, 
 .     fill = fill, strip.white = strip.white, blank.lines.skip = blank.lines.skip, 
 .     multi.line = FALSE, comment.char = comment.char, allowEscapes = allowEscapes, 
 .     flush = flush, encoding = encoding, skipNul = skipNul)

Looking at the file manually I saw that it had newlines in one of the !Series_summary headers. The lines are quoted, so it should have been ignored, but it breaks the function. Manually deleting the newlines and running

GEOquery:::parseGSEMatrix('GSE781-GPL96_series_matrix.txt')

works fine.

kalugny commented 6 years ago

Thanks!

On Wed, 31 Jan 2018 at 16:26 Sean Davis notifications@github.com wrote:

Closed #66 https://github.com/seandavi/GEOquery/issues/66 via de3231f https://github.com/seandavi/GEOquery/commit/de3231fe341fa3ba2f57b610d3f7f79e7ec2b778 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/seandavi/GEOquery/issues/66#event-1450850658, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUd_bhZVkMuodGM-mj_d9ns0FC40OFaks5tQHgTgaJpZM4Rz-gD .

seandavi commented 6 years ago

You have been great about reporting and your reports lead directly to fixes. Thanks for taking the time.