cmap / cmapPy

Assorted tools for interacting with .gct, .gctx files and other Connectivity Map (Broad Institute) data/tools
https://clue.io/cmapPy/index.html
BSD 3-Clause "New" or "Revised" License
124 stars 74 forks source link

get row id in cmappy in gctx Files #51

Closed FarshidShekari closed 5 years ago

FarshidShekari commented 5 years ago

I want to get row ids in cmapPy like l1Ktools this below code in L1ktools GTEx = map(lambda x: x.split('.')[0], GTEx_gctobj.get_rids()) How do it in cmappy?

oena commented 5 years ago

Hi @FarshidShekari, if you have a GCToo object my_gctoo you can access the row IDs either from the data_df: my_gctoo.data_df.index or (if present) from the row_metadata_df: my_gctoo.row_metdata_df.index.

In the future, if you have similar questions it might also be helpful to refer to the package's documentation or tutorial first, both of which can be found here: clue.io/code.