Mercurial > repos > agpetit > calculate_diameter
changeset 11:a4097272ade0 draft
"planemo upload for repository https://github.com/mesocentre-clermont-auvergne/aubi_piaf commit 9167288bf44ec486f68dade6f4fca41728690dd6-dirty"
author | agpetit |
---|---|
date | Tue, 14 Jun 2022 13:26:07 +0000 |
parents | afd0260e676f |
children | 066606280457 |
files | calculate_pore_diameter_aqp.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/calculate_pore_diameter_aqp.py Tue Jun 07 12:04:45 2022 +0000 +++ b/calculate_pore_diameter_aqp.py Tue Jun 14 13:26:07 2022 +0000 @@ -83,7 +83,7 @@ "--xtc_file_ext", type=str, nargs=1, help="""My input .xtc file""" ) parser.add_argument( - "-w", "--work_directory", type=str, nargs=1, + "-w", "--work_directory", type=str, default="./", help="""It's work Directory""" ) parser.add_argument( @@ -1054,8 +1054,10 @@ df_final = create_final_dataframe(resid_arr1, resid_arr2, resid_npa1, resid_npa2, u) if len(output_directory) > 2: - if not os.path.exists(output_directory): - os.makedirs(output_directory) + try: + os.makedirs(output_directory, exist_ok=True) + except OSError: + print("Directory '%s' can not be created") os.chdir(output_directory) if len(output) > 2: df_final.to_csv(output, sep="\t", index=False)