Commit 37a3693d authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team
Browse files

models/task.py: 'grep_reads' mode, the result file is seq/clone.fa-1

This result file is now stored in db.results_file, like the usual results files.
parent d76d9ddd
...@@ -126,13 +126,19 @@ def run_vidjil(id_file, id_config, id_data, id_fuse, grep_reads, ...@@ -126,13 +126,19 @@ def run_vidjil(id_file, id_config, id_data, id_fuse, grep_reads,
sys.stdout.flush() sys.stdout.flush()
db.commit() db.commit()
## récupération du fichier data.json généré ## Get result file
results_filepath = os.path.abspath(out_folder+'/'+output_filename+".vidjil") if grep_reads:
out_results = out_folder + '/seq/clone.fa-1'
else:
out_results = out_folder + '/' + output_filename + '.vidjil'
print "===>", out_results
results_filepath = os.path.abspath(out_results)
try: try:
stream = open(results_filepath, 'rb') stream = open(results_filepath, 'rb')
except IOError: except IOError:
print "!!! Vidjil failed, no .vidjil file" print "!!! Vidjil failed, no result file"
res = {"message": "[%s] c%s: Vidjil FAILED - %s" % (id_data, id_config, out_folder)} res = {"message": "[%s] c%s: Vidjil FAILED - %s" % (id_data, id_config, out_folder)}
log.error(res) log.error(res)
raise IOError raise IOError
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment