Allow chunksize to be greater than the number of records in the input file without raising the following error:
Traceback (most recent call last):
File "/srv/galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/split_file_to_collection/6cbe2f30c2d7/split_file_to_collection/split_file_to_collection.py", line 281, in <module>
main()
File "/srv/galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/split_file_to_collection/6cbe2f30c2d7/split_file_to_collection/split_file_to_collection.py", line 52, in main
split_by_record(args, in_file, out_dir, top, ftype)
File "/srv/galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/split_file_to_collection/6cbe2f30c2d7/split_file_to_collection/split_file_to_collection.py", line 169, in split_by_record
new_file = open(newfile_names[new_file_counter], "a")
IndexError: list index out of range
Allow an empty file to be split without raising the following error:
Traceback (most recent call last):
File "/srv/galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/split_file_to_collection/6cbe2f30c2d7/split_file_to_collection/split_file_to_collection.py", line 281, in <module>
main()
File "/srv/galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/split_file_to_collection/6cbe2f30c2d7/split_file_to_collection/split_file_to_collection.py", line 52, in main
split_by_record(args, in_file, out_dir, top, ftype)
File "/srv/galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/split_file_to_collection/6cbe2f30c2d7/split_file_to_collection/split_file_to_collection.py", line 141, in split_by_record
if sep_at_end and not last_line_matched:
UnboundLocalError: local variable 'last_line_matched' referenced before assignment
Allow chunksize to be greater than the number of records in the input file without raising the following error:
Allow an empty file to be split without raising the following error: