File: paths.py

package info (click to toggle)
python-pybedtools 0.10.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 16,620 kB
  • sloc: python: 10,030; cpp: 899; makefile: 142; sh: 57
file content (28 lines) | stat: -rw-r--r-- 569 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
Module for handling paths.

This is kept separate from helpers module in order to avoid circular imports in
setting the bedtools path.
"""

import pybedtools
from pybedtools import bedtool
from . import settings
from importlib import reload


def _set_bedtools_path(path=""):
    old_path = settings._bedtools_path
    settings._bedtools_path = path
    if old_path != path:
        reload(bedtool)
        reload(pybedtools)
        return True


def _get_bedtools_path():
    return settings._bedtools_path


def _set_R_path(path=""):
    settings._R_path = path