Skip to content

Bug trying to run example (related to GNormPlus) #159

@juanmirocks

Description

@juanmirocks
python example_annotate.py -c /usr/local/bin/ -s "This is c.A1003G an example"
Due to a dependence on GNormPlus, running nalaf with -s and -d switches might take a long time.
Traceback (most recent call last):
  File "example_annotate.py", line 61, in <module>
    GNormPlusGeneTagger().tag(dataset, uniprot=True)
  File "/Users/jmcejuela/Work/hck/nalaf/nalaf/learning/taggers.py", line 153, in tag
    abstract = next(parts)
StopIteration

Today (2016-02-04)

python3 example_annotate.py -s "This is c.A1003G an example"
Due to a dependence on GNormPlus, running nalaf with -s and -d switches might take a long time.
starting feature generator: <class 'nalaf.features.simple.SimpleFeatureGenerator'>
starting feature generator: <class 'nalaf.features.stemming.PorterStemFeatureGenerator'>
starting feature generator: <class 'nalaf.features.window.WindowFeatureGenerator'>
reading from cache /Users/jmcejuela/.nalaf/GNormPlus_cache.json
writing the cache /Users/jmcejuela/.nalaf/GNormPlus_cache.json
Traceback (most recent call last):
  File "example_annotate.py", line 56, in <module>
    GNormPlusGeneTagger().tag(dataset, uniprot=True)
  File "/Users/jmcejuela/Work/hck/nalaf/nalaf/learning/taggers.py", line 148, in tag
    genes, gnorm_title, gnorm_abstract = gnorm.get_genes_for_pmid(doc_id, postproc=True)
  File "/Users/jmcejuela/Work/hck/nalaf/nalaf/utils/ncbi_utils.py", line 39, in get_genes_for_pmid
    while not lines[line_counter]:
IndexError: list index out of range

Same with file:

python3 example_annotate.py -d resources/example.txt
Due to a dependence on GNormPlus, running nalaf with -s and -d switches might take a long time.
starting feature generator: <class 'nalaf.features.simple.SimpleFeatureGenerator'>
starting feature generator: <class 'nalaf.features.stemming.PorterStemFeatureGenerator'>
starting feature generator: <class 'nalaf.features.window.WindowFeatureGenerator'>
reading from cache /Users/jmcejuela/.nalaf/GNormPlus_cache.json
writing the cache /Users/jmcejuela/.nalaf/GNormPlus_cache.json
Traceback (most recent call last):
  File "example_annotate.py", line 56, in <module>
    GNormPlusGeneTagger().tag(dataset, uniprot=True)
  File "/Users/jmcejuela/Work/hck/nalaf/nalaf/learning/taggers.py", line 148, in tag
    genes, gnorm_title, gnorm_abstract = gnorm.get_genes_for_pmid(doc_id, postproc=True)
  File "/Users/jmcejuela/Work/hck/nalaf/nalaf/utils/ncbi_utils.py", line 39, in get_genes_for_pmid
    while not lines[line_counter]:
IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions