Starlitnightly/omicverse

TCGA module survial_init error

Opened this issue · 1 comments

Describe the bug
When I followed the tutorial of TCGA module with TCGA-BRCA data, an error emerged in the step of aml_tcga.survial_init().

To Reproduce
Steps to reproduce the behavior:

  1. Follow the tutorial
  2. Run aml_tcga.survial_init()
  3. See error

Screenshots
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[12], line 1
----> 1 aml_tcga.survial_init()

File ~/.conda/envs/omicverse/lib/python3.11/site-packages/omicverse/bulk/_tcga.py:99, in pyTCGA.survial_init(self)
97 pd_c=self.clinical_sheet
98 for i in pd_c.index:
---> 99 if pd_c.loc[i,'vital_status'].iloc[0]=='Alive':
100 day_li.append(pd_c.loc[i,'days_to_last_follow_up'].iloc[0])
101 elif pd_c.loc[i,'vital_status'].iloc[0]=='Dead':

AttributeError: 'str' object has no attribute 'iloc'`

Hi,

This erroe look like pd_c.loc[i,'vital_status'] is not a pd.Series. It seems that need a strict judgements when value is ''.

Sincerely