def calculate_deg_fold_change(data1_df, data2_df, fc_cutoff=1, 
                              alternative='two-sided'):
  """
  This function calculates differentially expressed genes (DEGs) 
  between two DataFrames or Series based on fold-change.

  Parameters
  ----------
  data1_df : DataFrame or Series
    gene expression data 1 (row: genes, col: samples)
  data2_df : DataFrame or Series
    gene expression data 2 (row: genes, col: samples)
  fc_cutoff : float, optional
    log2 fold-change cutoff. Default is 1.
  alternative : {'greater', 'less', 'two-sided'}, optional
    indicates the way to compare the two data. Default is 'two-sided'.

  Returns
  -------
  gene_arr : ndarray
    differentially expressed genes.
  
  """
  if data1_df.ndim == 2:
    diff_sr = data1_df.mean(axis=1) - data2_df.mean(axis=1)
  else:
    diff_sr = data1_df - data2_df
  if alternative == 'two-sided':
    gene_arr = diff_sr[diff_sr.abs() > fc_cutoff].index.values
  elif alternative == 'greater':
    gene_arr = diff_sr[diff_sr > fc_cutoff].index.values
  elif alternative == 'less':
    gene_arr = diff_sr[diff_sr < -fc_cutoff].index.values
  else:
    raise ValueError("<alternative> must be 'greater', 'less', or 'two-sided'.")
  return gene_arr