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 29 30 31 32 33 34 35 36 37 38 39 40
|
import logging
import os
from pbcore.util.Process import backticks
from pbcore.io.dataset.utils import BamtoolsVersion
log = logging.getLogger(__name__)
def _pbtestdata():
try:
import pbtestdata
return True
except ImportError:
return False
def _check_constools():
if not BamtoolsVersion().good:
log.warn("Bamtools not found or out of date")
return False
cmd = "pbindex"
o, r, m = backticks(cmd)
if r != 1:
return False
cmd = "samtools"
o, r, m = backticks(cmd)
if r != 1:
return False
cmd = "pbmerge"
o, r, m = backticks(cmd)
if r != 1:
return False
return True
def _internal_data():
if os.path.exists("/pbi/dept/secondary/siv/testdata"):
return True
return False
|