# HG changeset patch # User charles-bernard # Date 1478254327 14400 # Node ID 2496883e588b68bc502aaaa894db2cb106a3809d # Parent c3f91012ac19c441cded1d41d44c5a33df111fe5 Uploaded diff -r c3f91012ac19 -r 2496883e588b ALFA/ALFA_wrapper.py --- 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]