GRP, GMT (set_io)¶
set_io contains simple scripts for parsing two other common file types used by the Connectivity Map: GRP and GMT files. The GRP file is used for storing a single set of things (e.g. a single gene set), while the GMT file is used for storing multiple sets of things (e.g. several gene sets).
Further details on GRP and GMT files can be found here.
Reading GRP files¶
Read a grp file at the path specified by in_path.
- in_path (string): path to GRP file
- grp (list)
Writing GRP files¶
Write a GRP to a text file.
- grp (list): GRP object to write to new-line delimited text file out_path (string): output path
Reading GMT files¶
Read a gmt file at the path specified by file_path.
- file_path (string): path to gmt file
- gmt (GMT object): list of dicts, where each dict corresponds to one
- line of the GMT file
Verifying GMT integrity¶
Make sure that set ids are unique.
- gmt (GMT object): list of dicts