salzman-lab / SpliZ

Nextflow implementation of SpliZ
MIT License
12 stars 7 forks source link

ERROR 'The truth value of a DataFrame is ambiguous' #25

Open wook2014 opened 1 year ago

wook2014 commented 1 year ago

Description of the bug

An error occurred when running with spliz nextflow pipeline

ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

It seemed that the problem can be located in file calc_splizvd.py line 387

df["cov"] = df["gene"].map(grouped.apply(lambda x: x['z_Start'].cov(x['z_End'])))

And it should be like this

df["cov"] = df["gene"].map(grouped.apply(lambda x: x['z_Start'].cov(x['z_End'])).to_dict())

The very same problem also exists as mentioned in https://github.com/juliaolivieri/SpliZ_pipeline/issues/10