changeset 28:2496883e588b draft

Uploaded
author charles-bernard
date Fri, 04 Nov 2016 06:12:07 -0400
parents c3f91012ac19
children c8acc8808b52
files ALFA/ALFA_wrapper.py
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ALFA/ALFA_wrapper.py	Fri Nov 04 06:11:49 2016 -0400
+++ b/ALFA/ALFA_wrapper.py	Fri Nov 04 06:12:07 2016 -0400
@@ -44,10 +44,12 @@
     args = parser.parse_args()
     return args
 
-def mv_and_rename_user_indexes(stranded_index, unstranded_index):
+def symlink_user_indexes(stranded_index, unstranded_index):
     index='index'
-    shutil.copy(stranded_index, index + '.stranded.index')
-    shutil.copy(unstranded_index, index + '.unstranded.index')
+    os.symlink(stranded_index, index + '.stranded.index')
+    os.symlink(unstranded_index, index + '.unstranded.index')
+    #shutil.copy(stranded_index, index + '.stranded.index')
+    #shutil.copy(unstranded_index, index + '.unstranded.index')
     return index
 
 def get_input2_args(reads_list, format):
@@ -99,17 +101,14 @@
 
     if not (args.output_pdf or args.output_png or args.output_svg or args.output_indexes or args.output_count):
         exit_and_explain('Error: no output to return\nProcess Aborted\n')
-
     tmp_dir = tempfile.mkdtemp(prefix='tmp', suffix='')
-
     logging.basicConfig(level=logging.INFO, filename=args.log_report[0], filemode="a+", format='%(message)s')
-
     alfa_path = os.path.join(args.GALAXY_TOOL_DIR[0], 'ALFA.py')
 
     #INPUT1: Annotation File
     if args.indexes:
         # The indexes submitted by the user must exhibit the suffix '.(un)stranded.index' and will be called by alfa by their prefix
-        index = mv_and_rename_user_indexes(args.indexes[0], args.indexes[1])
+        index = symlink_user_indexes(args.indexes[0], args.indexes[1])
         input1_args = '-g %s' % index
     elif args.bi_indexes:
         input1_args = '-g %s' % args.bi_indexes[0]