-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetadata.py
30 lines (21 loc) · 878 Bytes
/
metadata.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from cmapPy.pandasGEXpress.parse import parse
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
# Specify the path to the .gctx file
gctx_file = "/home/batman/Downloads/level5_beta_trt_misc_n8283x12328.gctx"
metadata = parse(gctx_file)
df = metadata.data_df
print(df)
# gctoo = parse(metadata, rid = pert_id)
# print(gctoo)
print("==================================================================")
col_gctoo = parse(gctx_file, cid = "ABY001_A375_XH:ADO-TRASTUZUMAB_EMTANSINE:0.3125:24")
col_gctoo_df = col_gctoo.data_df
print(col_gctoo_df.shape)
print(col_gctoo_df)
print("==================================================================")
row_gctoo = parse(gctx_file, rid = "10")
row_gctoo_df = row_gctoo.data_df
print(row_gctoo_df.shape)
print(row_gctoo_df)
print("==================================================================")