tanghaibao / goatools

Python library to handle Gene Ontology (GO) terms
BSD 2-Clause "Simplified" License
783 stars 210 forks source link

study (geneIDs) cannot be a numpy array #214

Closed wu-diana closed 2 years ago

wu-diana commented 3 years ago

Running GOEnrichmentStudyNS.run_study with a numpy array as study (geneIDs) gives the following error: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

This is caused by lines 299-300 in GOEnrichmentStudyNSif not study: return []

I recommend updating if not study: to a statement that is flexible for generic iterators.

tanghaibao commented 3 years ago

@wu-diana

Should have been fixed in the commit referenced here. Thanks for the heads up.