As np.nan != np.nan, group_df in _get_grouped_df is an empty dataframe being pass to skbio.diversity.beta_diversity
Expected behavior
2 solutions :
either drop np.nan from the possible group -> choosing this solution because I don't think grouping and analysing np.nan is relevant
or find another way to keep only samples whose studied variable is np.nan
Additional context
DissimilarityMatrixError Traceback (most recent call last)
(...)
in _get_grouped_df(self, metadata_series)
309 for group in metadata_series.unique():
310 group_df = self.df.loc[:, metadata_series[metadata_series == group].index]
--> 311 beta_div_multi_indexed_df = self.compute_beta_diversity(group_df).to_series().to_frame()
312 if beta_div_multi_indexed_df.empty: # Happens if only one item from the group
313 continue
in compute_beta_diversity(self, df)
375 """
376 # steps to compute the index
--> 377 return skbio.diversity.beta_diversity("braycurtis", df.transpose(), df.columns)
378
379
(...)
DissimilarityMatrixError: Data must be at least 1x1 in size.
Describe the bug
As np.nan != np.nan, group_df in _get_grouped_df is an empty dataframe being pass to skbio.diversity.beta_diversity
Expected behavior
2 solutions :
Additional context