goatools icon indicating copy to clipboard operation
goatools copied to clipboard

study (geneIDs) cannot be a numpy array

Open wu-diana opened this issue 3 years ago • 1 comments

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 GOEnrichmentStudyNS if not study: return []

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

wu-diana avatar Jun 05 '21 14:06 wu-diana

@wu-diana

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

tanghaibao avatar Jun 06 '21 07:06 tanghaibao