If using fastq-specific compression methods, check file type with irods isysmeta or with file extension:
# under if __name__ == '__main__'
(base, ext) = os.path.splitext(args.ipath)
if ext != '.fastq':
raise IOError(("`ipath` file extension is not '.fastq':\n" +
"--ipath {ipath}").format(ipath=args.ipath))
If using fastq-specific compression methods, check file type with irods
isysmeta
or with file extension: