guma44 / GEOparse

Python library to access Gene Expression Omnibus Database (GEO)
BSD 3-Clause "New" or "Revised" License
137 stars 51 forks source link

Debugging everything #59

Closed liugaocn closed 5 years ago

liugaocn commented 5 years ago

When i do the following: gse = GEOparse.get_GEO(filepath="GPL17021_family.soft.gz") print(type(gse)) it prints out a long list of Debug...., like: 13-Jul-2019 22:47:09 DEBUG GEOparse - SAMPLE: GSM1189087 13-Jul-2019 22:47:09 DEBUG GEOparse - SAMPLE: GSM1189088 13-Jul-2019 22:47:09 DEBUG GEOparse - SAMPLE: GSM1189089 13-Jul-2019 22:47:09 DEBUG GEOparse - SAMPLE: GSM1189090 13-Jul-2019 22:47:09 DEBUG GEOparse - SAMPLE: GSM1189091

I guess it didn't read my soft file correctly. Or maybe it is because I don't know how to use it yet.

guma44 commented 5 years ago

Let me check this. By your description I am not sure if this is a bug or not.

liugaocn commented 5 years ago

I am not sure if it is a but, too. When I do print(type(gse)), it prints like that. I attached my file here, so you can test it. GPL17021_family.soft.gz

guma44 commented 5 years ago

So the output has nothing to do with the print(type(gse)) statement - it comes from the get_GEO function. BTW, the type of the object is not GSE but GPL - ie. the library with all its experiments. If you do not want to see the debug information you have to set the verbosity correctly:

from GEOparse import get_GEO
from GEOparse.logger import set_verbosity
# Set the verbosity
set_verbosity("INFO")
# Parse the file
gpl = get_GEO(filepath="./GPL17021_family.soft.gz")
# check the GSE that it contains eg.
print(len(gpl.gses.values()))
print([g for g in gpl.gses.values()][:10])