PoonLab / sierra-local

Retrieve HIVdb algorithm as XML and apply locally to HIV sequences
GNU General Public License v3.0
6 stars 3 forks source link

Failure to update HIVDB and APOBEC DRMS #66

Closed Kanyerezi30 closed 1 year ago

Kanyerezi30 commented 1 year ago

Hello here,

I am trying to update the HIVDB and APOBEC DRMs to version 9.3 using the updater.py script but i get the error below

Unable to update HIVDB XML. Try manually downloading the HIVdb ASI2. list index out of range Unable to update APOBEC DRMs. Try manually downloading the APOBEC DRM TSV into data/apobec.tsv

I also tried downloading the files directly from stanford and specifying the paths but i get the error below

searching path /home/kanye/.local/lib/python3.6/site-packages/sierralocal/data/apobec*.tsv
HIVdb version 9.3
Traceback (most recent call last):
  File "/home/kanye/.local/bin/sierralocal", line 11, in <module>
    exit_code = main.main()
  File "/home/kanye/.local/lib/python3.6/site-packages/sierralocal/main.py", line 179, in main
    cleanup=args.cleanup, forceupdate=args.forceupdate)
  File "/home/kanye/.local/lib/python3.6/site-packages/sierralocal/main.py", line 108, in sierralocal
    writer = JSONWriter(algorithm)
  File "/home/kanye/.local/lib/python3.6/site-packages/sierralocal/jsonwriter.py", line 22, in __init__
    self.database = self.algorithm.parse_drugs(self.algorithm.root)
  File "/home/kanye/.local/lib/python3.6/site-packages/sierralocal/hivdb.py", line 212, in parse_drugs
    cond_dict = self.parse_condition(condition)                 # dictionary of parsed drug conditions
  File "/home/kanye/.local/lib/python3.6/site-packages/sierralocal/hivdb.py", line 252, in parse_condition
    self._parse_scores(self.drms, drm, drm, iter)
  File "/home/kanye/.local/lib/python3.6/site-packages/sierralocal/hivdb.py", line 279, in _parse_scores
    drm_lib.append({'group': mut_list, 'value': int(scores[iter])})
IndexError: list index out of range

Kindly help out

ArtPoon commented 1 year ago

I've reproduced the problem. Probably the URL has been changed with the latest HIVdb update. Investigating.

ArtPoon commented 1 year ago

URLs have indeed been changed. More importantly, however, the algorithm and APOBEC data files are now available as a GitHub repository at https://github.com/hivdb/hivfacts/tree/main/data/algorithms

We need to make this a submodule and rewrite the updater script @WilliamZekaiWang @GopiGugan

GopiGugan commented 1 year ago

URLs have indeed been changed. More importantly, however, the algorithm and APOBEC data files are now available as a GitHub repository at https://github.com/hivdb/hivfacts/tree/main/data/algorithms

We have a working solution in the iss64 branch where we have this repository as a submodule. @ArtPoon should we merge those changes to master now or after resolving #65?

ArtPoon commented 1 year ago

yes please push to master branch

ArtPoon commented 1 year ago

Test submodule before closing