Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save mtholder/83b9a9be8ca4d158d63b to your computer and use it in GitHub Desktop.

Select an option

Save mtholder/83b9a9be8ca4d158d63b to your computer and use it in GitHub Desktop.
force_oti_reindexing_of_non_namespaced_ids.py
#!/usr/bin/env python
import sys
from peyotl.api import APIWrapper
aw = APIWrapper(phylesystem_api_kwargs={'get_from':'api'})
pa = aw.phylesystem_api
o = aw.oti
for line in open(sys.argv[1], 'rU'):
ls = line.strip()
if '_' in ls:
continue
print o.trigger_unindex(ls)
print o.trigger_index(pa, 'pg_' + ls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment