tanghaibao / goatools

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

Error when importing wr_xlsx_gos #167

Closed tanghaibao closed 3 years ago

tanghaibao commented 4 years ago

Received the following issue via email.

Dear Author,

We are using your GOATools from GO enrichment analysis and we found it very helpful! I’m trying to group the GO terms into immune, cell death, etc. for the last step. A question regarding the paper “GOATOOLS: A Python library for Gene Ontology analyses” is that:

import collections as cx

from goatools.test_data.goatools_goea_consistent_increase import goea_results

from goatools.test_data.sections.gjoneska_pfenning import SECTIONS

from goatools.grouper.grouper import wr_xlsx_gos

xlsx1 = "goids_consistent_increase.xlsx"

xlsx2 = "goids_consistent_increase_dcnt.xlsx"

wr_xlsx_gos(xlsx1, goids, sections=SECTIONS, gaf=‘gene_assocation.mgi’)

It will turns error when importing wr_xlsx_gos, I checked the Github folder, and I’ve imported wrxlsx instead. But then when I’m using:

w=WrXlsxSortedGos()

w.wr_xlsx_gos(xlsx1, goids, sections=SECTIONS, gaf=‘gene_assocation.mgi’)

It turns error as well with : wr_xlsx_gos() takes 2 positional arguments but 3 were given

I delete one of the option, and then it will still occur error with : no attribute ‘sortobj’

May I ask how I can do the grouping for GO terms with this? Another question is: how I can upload my GO terms results in this situation? I’ve successfully got the enrichment results for BP, MF, etc. already.

Thank you so much for the help!!

Best,

Ye

tanghaibao commented 3 years ago

Closing issue as this issue was tracked via email conversations.