X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=blobdiff_plain;f=htsworkflow%2Fsubmission%2Fresults.py;fp=htsworkflow%2Fsubmission%2Fresults.py;h=50077523aca3970a517973adbd69f119f4f17e3d;hp=36c2c78e7b2b0aac0613217ec2171f84a3c727ba;hb=beb3cd40fd1446357399f755f6188968b55fb2df;hpb=d4f592d5c162b136cdf38a5626cea97b9e7844df diff --git a/htsworkflow/submission/results.py b/htsworkflow/submission/results.py index 36c2c78..5007752 100644 --- a/htsworkflow/submission/results.py +++ b/htsworkflow/submission/results.py @@ -45,7 +45,7 @@ class ResultMap(MutableMapping): lib_path = os.path.join(basepath, lib_path) self[lib_id] = lib_path - def make_tree_from(self, source_path, destpath = None): + def make_tree_from(self, source_path, destpath = None, link=True): """Create a tree using data files from source path. """ if destpath is None: @@ -76,7 +76,10 @@ class ResultMap(MutableMapping): raise IOError( "{0} does not exist".format(source_pathname)) if not os.path.exists(target_pathname): - os.symlink(source_pathname, target_pathname) + if link: + os.symlink(source_pathname, target_pathname) + else: + os.copy(source_pathname, target_pathname) LOGGER.info( 'LINK {0} to {1}'.format(source_pathname, target_pathname))