diff --git a/picrust2/pipeline.py b/picrust2/pipeline.py index 0a22ef8..2a40f63 100755 --- a/picrust2/pipeline.py +++ b/picrust2/pipeline.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -from os import path +from os import path, symlink import sys from picrust2.default import (default_ref_dir_bac, default_ref_dir_arc, default_tables_bac, default_tables_arc, default_pathway_map) @@ -370,13 +370,15 @@ def full_pipeline_split(study_fasta, for pred in predicted_funcs_split: if func in pred: combining.append(pred) - + + out_file = path.join(output_folder, "combined_" + func + "_predicted.tsv.gz") if len(combining) == 1: predicted_funcs[func] = predicted_funcs_split[combining[0]] print("Warning: There was only one file for the function: "+ func + "\n" "Maybe that's fine if you used custom traits or there were no sequences " "matching one of the domains.", file=sys.stderr) - + os.symlink(predicted_funcs[func], out_file) + elif len(combining) > 2: sys.exit("More than two files were available for the function: " + func +"\n" "If you are using your own custom trait files, please check that you " @@ -384,7 +386,6 @@ def full_pipeline_split(study_fasta, else: print(combining, predicted_funcs_split) - out_file = path.join(output_folder, "combined_" + func + "_predicted.tsv.gz") combine_domain_predictions(predicted_funcs_split[combining[0]], predicted_funcs_split[combining[1]], out_file,