jpayne@68: """ jpayne@68: Module for handling paths. jpayne@68: jpayne@68: This is kept separate from helpers module in order to avoid circular imports in jpayne@68: setting the bedtools path. jpayne@68: """ jpayne@68: jpayne@68: import pybedtools jpayne@68: from pybedtools import bedtool jpayne@68: from . import settings jpayne@68: from importlib import reload jpayne@68: jpayne@68: jpayne@68: def _set_bedtools_path(path=""): jpayne@68: old_path = settings._bedtools_path jpayne@68: settings._bedtools_path = path jpayne@68: if old_path != path: jpayne@68: reload(bedtool) jpayne@68: reload(pybedtools) jpayne@68: return True jpayne@68: jpayne@68: jpayne@68: def _get_bedtools_path(): jpayne@68: return settings._bedtools_path jpayne@68: jpayne@68: jpayne@68: def _set_R_path(path=""): jpayne@68: settings._R_path = path