If there are no enrichments (e.g. nothing out of meme), the subsequent lines of code cause a "ValueError: cannot set a frame with no defined index and a scalar" since there are no results (enr is an empty dataframe).
# collect enrichments
if serial:
# read/parse, label and append
for name, df, function, kwargs, suffix, _ in possible_steps:
if name in steps:
enr = function(
get_this_file_or_timestamped(
os.path.join(comparison_dir, suffix)),
**kwargs)
if not enr.empty:
enr.loc[:, "comparison_name"] = comp
enr.loc[:, "direction"] = direction
enr.loc[:, "label"] = "{}.{}".format(
comp, direction)
df.append(enr)
toolkit/ngs_toolkit/analysis.py
Lines 5149 to 5161 in 3f828b2
If there are no enrichments (e.g. nothing out of meme), the subsequent lines of code cause a "ValueError: cannot set a frame with no defined index and a scalar" since there are no results (enr is an empty dataframe).
The solution would be to add this tiny if statement -
if not enr.empty: