Ticket #448 (closed wish: fixed)

Opened 5 years ago

Last modified 5 years ago

obiGene.NCBIGeneInfo("hsa") vrze exception

Reported by: blaz Owned by: ales
Milestone: 2.6 Component: orng_modules
Severity: minor Keywords:
Cc: Blocking:
Blocked By:

Description

Klic:

obiGene.NCBIGeneInfo("hsa")

vrze exception:

UnknownSpeciesIdentifier                  Traceback (most recent call last)

/Users/blaz/Documents/Workspace/genesim/<ipython console> in <module>()

/Users/blaz/Documents/Workspace/bioinformatics/obiGene.py in __init__(self, organism, genematcher)
     54         """
     55 
---> 56         self.taxid = self.organism_name_search(organism)
     57 
     58 

/Users/blaz/Documents/Workspace/bioinformatics/obiGene.py in organism_name_search(cls, org)
     99             taxids = set(obiTaxonomy.common_taxids()).intersection(obiTaxonomy.search(org, onlySpecies=False)) #onlySpecies=False needed to find correct dicty
    100         if len(taxids) == 0:
--> 101             raise obiTaxonomy.UnknownSpeciesIdentifier, org
    102         elif len(taxids) > 1:
    103             raise obiTaxonomy.MultipleSpeciesException, ", ".join(["%s: %s" % (id, obiTaxonomy.name(id)) for id in taxids])

UnknownSpeciesIdentifier: hsa

ceprav ne bi smel, saj spodnje dela lepo:

In [18]: obiTaxonomy.to_taxid("hsa")
Out[18]: set(['9606'])

Vir tega buga je, da spodnji klic ne vrne pravi rezultat:

In [19]: obiTaxonomy.to_taxid("hsa", mapTo=[obiTaxonomy.common_taxids()])
Out[19]: []

Change History

comment:1 Changed 5 years ago by ales

  • Status changed from new to closed
  • Resolution set to fixed

comment:2 Changed 5 years ago by blaz

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Severity changed from minor to immediate

ales, ta funkcija sedaj dela narobe. primer (za mmu vrne samo 2807 genov, ce pa grem v to funkcijo s pravim taxid, vrne pravilno):

In [66]: import obiGene

In [67]: gene_info = obiGene.NCBIGeneInfo("mmu")

In [68]: len(gene_info)
Out[68]: 2807

In [70]: import obiTaxonomy

In [71]: obiTaxonomy.to_taxid("mmu")
Out[71]: set(['10090'])

In [72]: gene_info = obiGene.NCBIGeneInfo("10090")

In [73]: len(gene_info)
Out[73]: 61889

comment:3 Changed 5 years ago by blaz

  • Type changed from bug to wish
  • Severity changed from immediate to minor

ok, ocitno je bil problem v starih verzijah podatkov s streznika. sem sedanje zbrisal. sedaj mi dela. se mi je pa pri spodnjem ukazu pojavilu:

In [6]: a = obiGene.NCBIGeneInfo("hsa")
[Errno 2] No such file or directory: '/Users/blaz/Library/Caches/orange/bigfiles/Taxonomy/ncbi_taxonomy.tar.gz/ncbi_taxonomy.db' Could not load taxonomy from local cache
Attempting to download from server.

predlagam, da je sistem tak, da poskusa najprej pridobiti podatke s streznika, ce pa povezave ni, javi, da datoteka manjka in da "unable to contact (download) Orange bioinformatics server".

Lahko prosim popravis ustrezno (kot zgoraj, oz. drugje)

comment:4 Changed 5 years ago by ales

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.