Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor bugs in GO-Elite: Mm MPhenoOntology and Hs WikiPathways parsing #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

mpmath/**/*.pyc
*.pyc
*.zip
4 changes: 2 additions & 2 deletions GeneSetDownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def importPhenotypeOntologyGeneAssociations():
t = string.split(data,'\t')
hs_symbol=t[0]; hs_entrez=t[1]; mm_symbol=t[2]; mgi=t[3]; pheno_ids=t[4]
if 'MP' not in pheno_ids:
try: pheno_ids = t[5]
try: mm_symbol=t[3]; mgi=t[4]; pheno_ids=t[5]
except Exception: pass
hs_symbol = string.lower(hs_symbol)
mm_symbol = string.lower(mm_symbol)
Expand Down Expand Up @@ -1243,4 +1243,4 @@ def buildAccessoryPathwayDatabases(selected_species,additional_resources,force):
additional_resources+=['miRNA Targets','GOSlim','Disease Ontology','Phenotype Ontology','KEGG','RVista Transcription Factor Sites']
additional_resources=['BioGRID']
buildAccessoryPathwayDatabases(selected_species,additional_resources,force)

3 changes: 2 additions & 1 deletion gene_associations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ def __init__(self,system_name,geneID,pathway):
except Exception: null=[]
def GeneID(self): return str(self.geneID)
def System(self): return str(self.system_name)
def Pathway(self): return str(self.pathway)
def Pathway(self): return self.pathway ## Returning str() threw an error for non-ASCII characters in HsWikiPathways
def setGraphID(self,graphID): self.graphID = graphID
def setGroupID(self,groupid): self.groupid = groupid
def GraphID(self): return self.graphID
Expand Down Expand Up @@ -1396,6 +1396,7 @@ def exportWikiPathwayData(species_name,pathway_db,type):
values +=[wpd.Uniprot(), wpd.Unigene(), wpd.Refseq(), wpd.MOD(), wpd.Pubchem(), wpd.CAS(), wpd.Chebi()]
values = string.join(values,'\t')
values = string.replace(values,'\n','') ###Included by mistake
values = values.encode('UTF-8', 'replace') ## Need this line to prevent non-ASCII characters from HsWikiPathways throwing an error
export_data.write(values+'\n')
export_data.close()
#print 'WikiPathways data exported to:',export_dir
Expand Down