def parse_gmt(self, gmt):
if gmt.lower().endswith("<STR_LIT>"):<EOL><INDENT>with open(gmt) as genesets:<EOL><INDENT>genesets_dict = { line.strip().split("<STR_LIT:\t>")[<NUM_LIT:0>]: line.strip().split("<STR_LIT:\t>")[<NUM_LIT:2>:]<EOL>for line in genesets.readlines()}<EOL><DEDENT>return genesets_dict<EOL><DEDENT>elif gmt in DEFAULT_LIBRARY:<EOL><INDENT>pass<EOL><DEDENT>elif gmt in self.get_libraries():<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>self._logger.error("<STR_LIT>"%gmt)<EOL>sys.exit(<NUM_LIT:0>)<EOL><DEDENT>tmpname = "<STR_LIT>" + gmt + "<STR_LIT>"<EOL>tempath = os.path.join(DEFAULT_CACHE_PATH, tmpname)<EOL>if os.path.isfile(tempath):<EOL><INDENT>self._logger.info("<STR_LIT>"%DEFAULT_CACHE_PATH)<EOL>return self.parse_gmt(tempath)<EOL><DEDENT>else:<EOL><INDENT>return self._download_libraries(gmt)<EOL><DEDENT>
gmt parser