You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As for now, the library has one reader ([readfile.py](https://github.com/CellMigStandOrg/cell_track_dpkg/blob/master/dpkg/readfile.py)), which reads file input depending on tracking software used:
def read_file(f, track_dict):
"""Takes file from command line.
Keyword arguments:
f -- the file (from command line)
track_dict -- only needed for some file formats!
"""
# check for file extension
if f.endswith('.xls'):
# first thing, try to convert it to a plain csv
try:
xls_to_csv(f)
name, extension = os.path.splitext(f)
f = name + '.csv'
print('XLS converted into csv...')
except XLRDError:
# copy the file and save it as csv
import shutil
name, extension = os.path.splitext(f)
shutil.copyfile(f, name + '.csv')
f = name + '.csv'
print('Not an excel file.' + ' Copied and simply renamed to csv.')
elif f.endswith('.xml'):
# right now XML associated only to TrackMate, might not be the case in
# the future
(objects, links) = read_trackMate(f)
print('Successfully parsed a TrackMate XML file...')
if f.endswith('.csv'):
It would be much more clear and less error-prone to force the usage of a specific reader for each of the tracking software covered by the library.
The text was updated successfully, but these errors were encountered:
As for now, the library has one reader (
[readfile.py](https://github.com/CellMigStandOrg/cell_track_dpkg/blob/master/dpkg/readfile.py)
), which reads file input depending on tracking software used:It would be much more clear and less error-prone to force the usage of a specific reader for each of the tracking software covered by the library.
The text was updated successfully, but these errors were encountered: