if not 'DJANGO_SETTINGS_MODULE' in os.environ:
os.environ['DJANGO_SETTINGS_MODULE'] = 'htsworkflow.settings'
-
from htsworkflow.util import api
from htsworkflow.util.rdfhelp import \
dafTermOntology, \
logger.warn("File %s doesn't exist.", a)
if opts.make_link_tree_from is not None:
- results.make_tree_from(opts.make_tree_from, link=True)
+ results.make_tree_from(opts.make_link_tree_from, link=True)
if opts.copy_tree_from is not None:
- results.make_tree_from(opts.make_tree_from, link=False)
+ results.make_tree_from(opts.copy_tree_from, link=False)
if opts.fastq:
logger.info("Building fastq extraction scripts")
"""
from collections import MutableMapping
import os
+import shutil
import logging
from collections import namedtuple
if not os.path.exists(source_pathname):
raise IOError(
"{0} does not exist".format(source_pathname))
- if not os.path.exists(target_pathname):
+ if not (os.path.exists(target_pathname) or os.path.isdir(source_pathname)):
if link:
os.symlink(source_pathname, target_pathname)
else:
- os.copy(source_pathname, target_pathname)
+ shutil.copy(source_pathname, target_pathname)
LOGGER.info(
'LINK {0} to {1}'.format(source_pathname,
target_pathname))