Add option to copy source files for a submission.
[htsworkflow.git] / encode_submission / trackhub.py
index 4ee206131728d1eaba9bc3661366c09e4eee8504..41f76d14f6d552f5a25eb0ee1bc74f9db32e18c6 100644 (file)
@@ -77,8 +77,11 @@ def main(cmdline=None):
         else:
             logger.warn("File %s doesn't exist.", a)
 
-    if opts.make_tree_from is not None:
-        results.make_tree_from(opts.make_tree_from)
+    if opts.make_link_tree_from is not None:
+        results.make_tree_from(opts.make_tree_from, link=True)
+
+    if opts.copy_tree_from is not None:
+        results.make_tree_from(opts.make_tree_from, link=False)
 
     if opts.fastq:
         logger.info("Building fastq extraction scripts")
@@ -121,9 +124,12 @@ def make_parser():
     parser.add_option_group(model)
     # commands
     commands = OptionGroup(parser, 'commands')
-    commands.add_option('--make-tree-from',
+    commands.add_option('--make-link-tree-from',
                       help="create directories & link data files",
                       default=None)
+    commands.add_option('--copy-tree-from',
+                      help="create directories & copy data files",
+                      default=None)
     commands.add_option('--fastq', default=False, action="store_true",
                         help="generate scripts for making fastq files")
     commands.add_option('--scan-submission', default=False, action="store_true",