def _open_file(in_file):
_, ext = os.path.splitext(in_file)<EOL>if ext == "<STR_LIT>":<EOL><INDENT>return gzip.open(in_file, '<STR_LIT:rb>')<EOL><DEDENT>if ext in ["<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>return open(in_file, '<STR_LIT:r>')<EOL><DEDENT>return open(in_file, "<STR_LIT:r>")<EOL>
From bcbio code