tasks.py 619 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. """Executable tasks.
  2. To be called by pbsmrtpipe.
  3. pypeFLOW uses its own adaptors instead.
  4. """
  5. from .. import run_support as support
  6. import sys
  7. def help():
  8. print("""
  9. Usage:
  10. falcon-task [task] <[task-args]>
  11. tasks:
  12. make-fofn-abs
  13. """)
  14. sys.exit(2)
  15. def main_make_fofn_abs(i_fofn_fn, o_fofn_fn):
  16. support.make_fofn_abs(i_fofn_fn, o_fofn_fn)
  17. def main(argv=sys.argv):
  18. if len(argv) < 2 or argv[1].startswith('-'):
  19. help()
  20. task = argv[1]
  21. tasks = {
  22. 'make-fofn-abs': main_make_fofn_abs,
  23. }
  24. return tasks[task](*argv[2:])
  25. if __name__ == "__main__":
  26. main(sys.argv)