Problem: Currently ERC_results files take an incredibly long time to generate and there are no protections for overwriting them if a user submits a job with the same name and correlation flags twice. These files take a long time to generate and we also do not want user input required (which could stall a job submitted to a cluster).
Solution: Add logic that checks if the file already exists, if it does, check the last part of the string for a number, then either add or increment that number for a new filename.
Example: file ERC_results_BXB_spearman.tsv already exists, but another job in the same folder using BXB branch method and spearman correlation is run. A new filename will be generated called ERC_results_BXB_spearman_1.tsv
Problem: Currently ERC_results files take an incredibly long time to generate and there are no protections for overwriting them if a user submits a job with the same name and correlation flags twice. These files take a long time to generate and we also do not want user input required (which could stall a job submitted to a cluster).
Solution: Add logic that checks if the file already exists, if it does, check the last part of the string for a number, then either add or increment that number for a new filename.
Example: file ERC_results_BXB_spearman.tsv already exists, but another job in the same folder using BXB branch method and spearman correlation is run. A new filename will be generated called ERC_results_BXB_spearman_1.tsv