seandavi / GEOquery

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

fix table parser when table is empty #120

Closed assaron closed 2 years ago

assaron commented 2 years ago

metadata_rows were incorrectly set, should be all lines when there is no table

Here is an example of the error it fixes:

f <- getGEOfile("GPL17021")
tail(readLines(f)) # the last series_id entry is GSE186800
gpl <- parseGPL(f)

tail(gpl@header$series_id) # the last series_id is NOT GSE186800
print(gpl@header$data_row_count) # NULL, should be 0
file.remove(f)

f <- getGEOfile("GPL17021", amount = "data")
gpld <- parseGPL(f) # error
file.remove(f)