TalusBio / gopher

Gene ontology enrichment analysis using protein expression.
Apache License 2.0
4 stars 0 forks source link

Added go_filters parameter which allows to specify a subset of go terms to be used as a filter #1

Closed ricomnl closed 3 years ago

ricomnl commented 3 years ago

Adds the ability to add a go_filter parameter to the test_enrichment function where one can optionally specify a list of terms to filter for. There was a tiny bug which didn’t allow me to run the analysis which was fixed here: https://github.com/TalusBio/gopher/blob/small_bug_and_addition/gopher/enrichment.py#L96 Before it was

results.append(list(term) + [res[1]])

and I changed it to

results.append(list(term) + list(res[1]))

I think the result res from the mannwhitneyu test is an array if there are multiple columns and we want it to be a list. I had gotten this error when trying to create a DataFrame of the results before fixing it:

ValueError: 7 columns passed, passed data had 4 columns
wfondrie commented 3 years ago

Thanks! I never let it finish running because it was too slow 😆