def gsea_cls_parser(cls):
if isinstance(cls, list) :<EOL><INDENT>classes = cls<EOL>sample_name= unique(classes)<EOL><DEDENT>elif isinstance(cls, str) :<EOL><INDENT>with open(cls) as c:<EOL><INDENT>file = c.readlines()<EOL><DEDENT>classes = file[<NUM_LIT:2>].strip('<STR_LIT:\n>').split("<STR_LIT:U+0020>")<EOL>sample_name = file[<NUM_LIT:1>].lstrip("<STR_LIT>").strip('<STR_LIT:\n>').split("<STR_LIT:U+0020>")<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>return sample_name[<NUM_LIT:0>], sample_name[<NUM_LIT:1>], classes<EOL>
Extract class(phenotype) name from .cls file.

    :param cls: the a class list instance or .cls file which is identical to GSEA input .
    :return: phenotype name and a list of class vector.