Mercurial > repos > bgruening > split_file_to_collection
diff split_file_to_collection.py @ 3:2ddc36385d7a draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_to_collection commit 8d069684e155d2f5b6fae06d14d98ce41321da53"
author | bgruening |
---|---|
date | Tue, 10 Sep 2019 12:31:15 -0400 |
parents | d150ac3d853d |
children | 0850f2dfba13 |
line wrap: on
line diff
--- a/split_file_to_collection.py Wed Aug 28 10:55:25 2019 -0400 +++ b/split_file_to_collection.py Tue Sep 10 12:31:15 2019 -0400 @@ -140,7 +140,7 @@ new_file_base = [custom_new_file_name, custom_new_file_ext] newfiles = [ - open(out_dir + "/" + new_file_base[0] + "_" + str(count) + new_file_base[1], "w") + open(os.path.join(out_dir, "%s_%06d%s" % (new_file_base[0], count, new_file_base[1])) , "w") for count in range(0, numnew) ] @@ -159,7 +159,7 @@ # keep track in loop of number of records in each file # only used in batch records_in_file = 0 - + # open file with open(in_file, "r") as file: record = ""